summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ordered-data.h
diff options
context:
space:
mode:
authorJeff Mahoney <jeffm@suse.com>2016-06-15 09:22:56 -0400
committerDavid Sterba <dsterba@suse.com>2016-12-06 16:06:58 +0100
commitda17066c40472c2d6a1aab7bb0090c3d285531c9 (patch)
treef51910799ffea3bfe5af34d009a2967b9e99e6ad /fs/btrfs/ordered-data.h
parentf15376df0dc2b632eb689793a73d4adba8404987 (diff)
downloadlinux-da17066c40472c2d6a1aab7bb0090c3d285531c9.tar.gz
linux-da17066c40472c2d6a1aab7bb0090c3d285531c9.tar.bz2
linux-da17066c40472c2d6a1aab7bb0090c3d285531c9.zip
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/ordered-data.h')
-rw-r--r--fs/btrfs/ordered-data.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ordered-data.h b/fs/btrfs/ordered-data.h
index 451507776ff5..5f2b0ca28705 100644
--- a/fs/btrfs/ordered-data.h
+++ b/fs/btrfs/ordered-data.h
@@ -145,10 +145,10 @@ struct btrfs_ordered_extent {
* calculates the total size you need to allocate for an ordered sum
* structure spanning 'bytes' in the file
*/
-static inline int btrfs_ordered_sum_size(struct btrfs_root *root,
+static inline int btrfs_ordered_sum_size(struct btrfs_fs_info *fs_info,
unsigned long bytes)
{
- int num_sectors = (int)DIV_ROUND_UP(bytes, root->sectorsize);
+ int num_sectors = (int)DIV_ROUND_UP(bytes, fs_info->sectorsize);
return sizeof(struct btrfs_ordered_sum) + num_sectors * sizeof(u32);
}