diff options
author | Jeff Mahoney <jeffm@suse.com> | 2016-06-15 09:22:56 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2016-12-06 16:06:58 +0100 |
commit | da17066c40472c2d6a1aab7bb0090c3d285531c9 (patch) | |
tree | f51910799ffea3bfe5af34d009a2967b9e99e6ad /fs/btrfs/tests/inode-tests.c | |
parent | f15376df0dc2b632eb689793a73d4adba8404987 (diff) | |
download | linux-next-da17066c40472c2d6a1aab7bb0090c3d285531c9.tar.gz |
btrfs: pull node/sector/stripe sizes out of root and into fs_info
We track the node sizes per-root, but they never vary from the values
in the superblock. This patch messes with the 80-column style a bit,
but subsequent patches to factor out root->fs_info into a convenience
variable fix it up again.
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests/inode-tests.c')
-rw-r--r-- | fs/btrfs/tests/inode-tests.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/btrfs/tests/inode-tests.c b/fs/btrfs/tests/inode-tests.c index 0bf46808ce8f..4d0f038e14f1 100644 --- a/fs/btrfs/tests/inode-tests.c +++ b/fs/btrfs/tests/inode-tests.c @@ -249,19 +249,19 @@ static noinline int test_btrfs_get_extent(u32 sectorsize, u32 nodesize) BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; BTRFS_I(inode)->location.offset = 0; - fs_info = btrfs_alloc_dummy_fs_info(); + fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize); if (!fs_info) { test_msg("Couldn't allocate dummy fs info\n"); goto out; } - root = btrfs_alloc_dummy_root(fs_info, sectorsize, nodesize); + root = btrfs_alloc_dummy_root(fs_info); if (IS_ERR(root)) { test_msg("Couldn't allocate root\n"); goto out; } - root->node = alloc_dummy_extent_buffer(NULL, nodesize, nodesize); + root->node = alloc_dummy_extent_buffer(fs_info, nodesize); if (!root->node) { test_msg("Couldn't allocate dummy buffer\n"); goto out; @@ -854,19 +854,19 @@ static int test_hole_first(u32 sectorsize, u32 nodesize) BTRFS_I(inode)->location.objectid = BTRFS_FIRST_FREE_OBJECTID; BTRFS_I(inode)->location.offset = 0; - fs_info = btrfs_alloc_dummy_fs_info(); + fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize); if (!fs_info) { test_msg("Couldn't allocate dummy fs info\n"); goto out; } - root = btrfs_alloc_dummy_root(fs_info, sectorsize, nodesize); + root = btrfs_alloc_dummy_root(fs_info); if (IS_ERR(root)) { test_msg("Couldn't allocate root\n"); goto out; } - root->node = alloc_dummy_extent_buffer(NULL, nodesize, nodesize); + root->node = alloc_dummy_extent_buffer(fs_info, nodesize); if (!root->node) { test_msg("Couldn't allocate dummy buffer\n"); goto out; @@ -950,13 +950,13 @@ static int test_extent_accounting(u32 sectorsize, u32 nodesize) return ret; } - fs_info = btrfs_alloc_dummy_fs_info(); + fs_info = btrfs_alloc_dummy_fs_info(nodesize, sectorsize); if (!fs_info) { test_msg("Couldn't allocate dummy fs info\n"); goto out; } - root = btrfs_alloc_dummy_root(fs_info, sectorsize, nodesize); + root = btrfs_alloc_dummy_root(fs_info); if (IS_ERR(root)) { test_msg("Couldn't allocate root\n"); goto out; |