mirror of
https://github.com/torvalds/linux.git
synced 2026-04-29 03:52:30 -04:00
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>
This commit is contained in:
committed by
David Sterba
parent
f15376df0d
commit
da17066c40
@@ -383,6 +383,7 @@ static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb,
|
||||
|
||||
static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
|
||||
{
|
||||
struct btrfs_fs_info *fs_info;
|
||||
unsigned long len;
|
||||
unsigned long *bitmap;
|
||||
struct extent_buffer *eb;
|
||||
@@ -397,13 +398,15 @@ static int test_eb_bitmaps(u32 sectorsize, u32 nodesize)
|
||||
len = (sectorsize < BTRFS_MAX_METADATA_BLOCKSIZE)
|
||||
? sectorsize * 4 : sectorsize;
|
||||
|
||||
fs_info = btrfs_alloc_dummy_fs_info(len, len);
|
||||
|
||||
bitmap = kmalloc(len, GFP_KERNEL);
|
||||
if (!bitmap) {
|
||||
test_msg("Couldn't allocate test bitmap\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
eb = __alloc_dummy_extent_buffer(NULL, 0, len);
|
||||
eb = __alloc_dummy_extent_buffer(fs_info, 0, len);
|
||||
if (!eb) {
|
||||
test_msg("Couldn't allocate test extent buffer\n");
|
||||
kfree(bitmap);
|
||||
|
||||
Reference in New Issue
Block a user