summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode-map.c
diff options
context:
space:
mode:
authorByongho Lee <bhlee.kernel@gmail.com>2015-12-14 19:42:10 +0300
committerDavid Sterba <dsterba@suse.com>2016-01-07 16:38:02 +0300
commitee22184b53c823f6956314c2815d4068e3820737 (patch)
tree3791157549663f2804529ba83b36019ee3e2cd2a /fs/btrfs/inode-map.c
parent7928d672ffb06085d06fe3c27a93549d37e53ab3 (diff)
downloadlinux-ee22184b53c823f6956314c2815d4068e3820737.tar.xz
Btrfs: use linux/sizes.h to represent constants
We use many constants to represent size and offset value. And to make code readable we use '256 * 1024 * 1024' instead of '268435456' to represent '256MB'. However we can make far more readable with 'SZ_256MB' which is defined in the 'linux/sizes.h'. So this patch replaces 'xxx * 1024 * 1024' kind of expression with single 'SZ_xxxMB' if 'xxx' is a power of 2 then 'xxx * SZ_1M' if 'xxx' is not a power of 2. And I haven't touched to '4096' & '8192' because it's more intuitive than 'SZ_4KB' & 'SZ_8KB'. Signed-off-by: Byongho Lee <bhlee.kernel@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode-map.c')
-rw-r--r--fs/btrfs/inode-map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode-map.c b/fs/btrfs/inode-map.c
index 767a6056ac45..e5eb40cb2d53 100644
--- a/fs/btrfs/inode-map.c
+++ b/fs/btrfs/inode-map.c
@@ -282,7 +282,7 @@ void btrfs_unpin_free_ino(struct btrfs_root *root)
}
}
-#define INIT_THRESHOLD (((1024 * 32) / 2) / sizeof(struct btrfs_free_space))
+#define INIT_THRESHOLD ((SZ_32K / 2) / sizeof(struct btrfs_free_space))
#define INODES_PER_BITMAP (PAGE_CACHE_SIZE * 8)
/*