aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents_status.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2014-11-25 11:53:47 -0500
committerTheodore Ts'o <tytso@mit.edu>2014-11-25 11:53:47 -0500
commit624d0f1dd7c80d2bac4fc3066b2ff3947f890883 (patch)
tree46f138fb80ce3c179ee96b6b6ce039d47022ed26 /fs/ext4/extents_status.c
parentdd4759255188771e60cf3455982959a1ba04f4eb (diff)
downloadlinux-624d0f1dd7c80d2bac4fc3066b2ff3947f890883.tar.gz
ext4: cleanup flag definitions for extent status tree
Currently flags for extent status tree are defined twice, once shifted and once without a being shifted. Consolidate these definitions into one place and make some computations automatic to make adding flags less error prone. Compiler should be clever enough to figure out these are constants and generate the same code. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents_status.c')
-rw-r--r--fs/ext4/extents_status.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/extents_status.c b/fs/ext4/extents_status.c
index 8f2aac4006d24..30596498ed0b8 100644
--- a/fs/ext4/extents_status.c
+++ b/fs/ext4/extents_status.c
@@ -1174,6 +1174,8 @@ int ext4_es_register_shrinker(struct ext4_sb_info *sbi)
{
int err;
+ /* Make sure we have enough bits for physical block number */
+ BUILD_BUG_ON(ES_SHIFT < 48);
INIT_LIST_HEAD(&sbi->s_es_list);
sbi->s_es_nr_inode = 0;
spin_lock_init(&sbi->s_es_lock);