Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 128635
b: refs/heads/master
c: 6f568d3
h: refs/heads/master
i:
  128633: ee5971d
  128631: 7f6db9f
v: v3
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 108d1d0 commit 3c65a2e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 291d673e6a22d9c6834e939f66c7cfef90669021
refs/heads/master: 6f568d35a045dbb8a13fe71bfc32e85e39a986cb
1 change: 1 addition & 0 deletions trunk/fs/btrfs/ctree.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ struct btrfs_fs_info {
u64 last_trans_committed;
unsigned long mount_opt;
u64 max_extent;
u64 max_inline;
u64 alloc_start;
struct btrfs_transaction *running_transaction;
struct btrfs_super_block super_copy;
Expand Down
1 change: 1 addition & 0 deletions trunk/fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -659,6 +659,7 @@ struct btrfs_root *open_ctree(struct super_block *sb)
fs_info->throttles = 0;
fs_info->mount_opt = 0;
fs_info->max_extent = (u64)-1;
fs_info->max_inline = 8192 * 1024;
fs_info->delalloc_bytes = 0;
fs_info->btree_inode = new_inode(sb);
fs_info->btree_inode->i_ino = 1;
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -2451,7 +2451,6 @@ sector_t extent_bmap(struct address_space *mapping, sector_t iblock,
goto out;

sector = (em->block_start + start - em->start) >> inode->i_blkbits;
printk("bmap finds %Lu %Lu block %Lu\n", em->start, em->len, em->block_start);
out:
free_extent_map(em);
return sector;
Expand Down
3 changes: 2 additions & 1 deletion trunk/fs/btrfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,8 @@ static int noinline dirty_and_release_pages(struct btrfs_trans_handle *trans,
*/
inline_size = end_pos;
if (isize >= BTRFS_MAX_INLINE_DATA_SIZE(root) ||
inline_size > 8192 ||
inline_size > root->fs_info->max_inline ||
(inline_size & (root->sectorsize -1)) == 0 ||
inline_size >= BTRFS_MAX_INLINE_DATA_SIZE(root)) {
u64 last_end;
u64 existing_delalloc = 0;
Expand Down
19 changes: 18 additions & 1 deletion trunk/fs/btrfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static void btrfs_put_super (struct super_block * sb)

enum {
Opt_subvol, Opt_nodatasum, Opt_nodatacow, Opt_max_extent,
Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_err,
Opt_max_inline, Opt_alloc_start, Opt_nobarrier, Opt_ssd, Opt_err,
};

static match_table_t tokens = {
Expand All @@ -73,6 +73,7 @@ static match_table_t tokens = {
{Opt_nodatacow, "nodatacow"},
{Opt_nobarrier, "nobarrier"},
{Opt_max_extent, "max_extent=%s"},
{Opt_max_inline, "max_inline=%s"},
{Opt_alloc_start, "alloc_start=%s"},
{Opt_ssd, "ssd"},
{Opt_err, NULL}
Expand Down Expand Up @@ -178,6 +179,22 @@ static int parse_options (char * options,
}
}
break;
case Opt_max_inline:
if (info) {
char *num = match_strdup(&args[0]);
if (num) {
info->max_inline =
btrfs_parse_size(num);
kfree(num);

info->max_inline = max_t(u64,
info->max_inline,
root->sectorsize);
printk("btrfs: max_inline at %Lu\n",
info->max_inline);
}
}
break;
case Opt_alloc_start:
if (info) {
char *num = match_strdup(&args[0]);
Expand Down

0 comments on commit 3c65a2e

Please sign in to comment.