ext4: add MB_NUM_ORDERS macro
authorHarshad Shirwadkar <harshadshirwadkar@gmail.com>
Thu, 1 Apr 2021 17:21:26 +0000 (10:21 -0700)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 9 Apr 2021 15:34:59 +0000 (11:34 -0400)
commit4b68f6df105966f04f45f1eca0561b86f2b3551d
tree42ded997cc4aff8cd5c5404ebcd118bdccc3e492
parenta6c75eaf11032f4a3d2b3ce2265a194ac6e4a7f0
ext4: add MB_NUM_ORDERS macro

A few arrays in mballoc.c use the total number of valid orders as
their size. Currently, this value is set as "sb->s_blocksize_bits +
2". This makes code harder to read. So, instead add a new macro
MB_NUM_ORDERS(sb) to make the code more readable.

Signed-off-by: Harshad Shirwadkar <harshadshirwadkar@gmail.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Reviewed-by: Ritesh Harjani <ritesh.list@gmail.com>
Link: https://lore.kernel.org/r/20210401172129.189766-5-harshadshirwadkar@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c
fs/ext4/mballoc.h