Commit d6667462 authored by Chris Mason's avatar Chris Mason

Btrfs: Change st_blocksize to 4k

Some programs (python) do rwm cycles at the granularity returned by
stat.
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 73e48b27
...@@ -2701,7 +2701,7 @@ static int btrfs_getattr(struct vfsmount *mnt, ...@@ -2701,7 +2701,7 @@ static int btrfs_getattr(struct vfsmount *mnt,
{ {
struct inode *inode = dentry->d_inode; struct inode *inode = dentry->d_inode;
generic_fillattr(inode, stat); generic_fillattr(inode, stat);
stat->blksize = 256 * 1024; stat->blksize = PAGE_CACHE_SIZE;
return 0; return 0;
} }
......
...@@ -75,7 +75,14 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root ...@@ -75,7 +75,14 @@ int btrfs_update_root(struct btrfs_trans_handle *trans, struct btrfs_root
ret = btrfs_search_slot(trans, root, key, path, 0, 1); ret = btrfs_search_slot(trans, root, key, path, 0, 1);
if (ret < 0) if (ret < 0)
goto out; goto out;
BUG_ON(ret != 0);
if (ret != 0) {
btrfs_print_leaf(root, path->nodes[0]);
printk("unable to update root key %Lu %u %Lu\n",
key->objectid, key->type, key->offset);
BUG_ON(1);
}
l = path->nodes[0]; l = path->nodes[0];
slot = path->slots[0]; slot = path->slots[0];
ptr = btrfs_item_ptr_offset(l, slot); ptr = btrfs_item_ptr_offset(l, slot);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment