]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
Btrfs: Change st_blocksize to 4k
authorChris Mason <chris.mason@oracle.com>
Thu, 3 Jan 2008 19:51:00 +0000 (14:51 -0500)
committerChris Mason <chris.mason@oracle.com>
Thu, 25 Sep 2008 15:03:59 +0000 (11:03 -0400)
Some programs (python) do rwm cycles at the granularity returned by
stat.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/inode.c
fs/btrfs/root-tree.c

index 6e2d03626fb9e15c8f1c81d49e9893f8c8a52ee6..6d0cd9a7a615329bef40230753090dd5a64eb9e4 100644 (file)
@@ -2701,7 +2701,7 @@ static int btrfs_getattr(struct vfsmount *mnt,
 {
        struct inode *inode = dentry->d_inode;
        generic_fillattr(inode, stat);
-       stat->blksize = 256 * 1024;
+       stat->blksize = PAGE_CACHE_SIZE;
        return 0;
 }
 
index e2b9b86af696d6868eb1014041e70c66716ed12f..08f19ec8809281e556ac5f4dbc6024478418d707 100644 (file)
@@ -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);
        if (ret < 0)
                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];
        slot = path->slots[0];
        ptr = btrfs_item_ptr_offset(l, slot);