f2fs: use BLKS_PER_SEG, BLKS_PER_SEC, and SEGS_PER_SEC
BugLink: https://bugs.launchpad.net/bugs/2073603 [ Upstream commit a60108f7dfb5867da1ad9c777d2fbbe47e4dbdd7 ] No functional change. Reviewed-by: Daeho Jeong <daehojeong@google.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> Stable-dep-of: aa4074e8fec4 ("f2fs: fix block migration when section is not aligned to pow2") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Portia Stephens <portia.stephens@canonical.com> Signed-off-by: Roxana Nicolescu <roxana.nicolescu@canonical.com>
This commit is contained in:
committed by
Roxana Nicolescu
parent
b2ddddaccd
commit
8e7d2a149b
+2
-2
@@ -2849,7 +2849,7 @@ int f2fs_restore_node_summary(struct f2fs_sb_info *sbi,
|
||||
int i, idx, last_offset, nrpages;
|
||||
|
||||
/* scan the node segment */
|
||||
last_offset = sbi->blocks_per_seg;
|
||||
last_offset = BLKS_PER_SEG(sbi);
|
||||
addr = START_BLOCK(sbi, segno);
|
||||
sum_entry = &sum->entries[0];
|
||||
|
||||
@@ -3166,7 +3166,7 @@ static int __get_nat_bitmaps(struct f2fs_sb_info *sbi)
|
||||
if (!is_set_ckpt_flags(sbi, CP_NAT_BITS_FLAG))
|
||||
return 0;
|
||||
|
||||
nat_bits_addr = __start_cp_addr(sbi) + sbi->blocks_per_seg -
|
||||
nat_bits_addr = __start_cp_addr(sbi) + BLKS_PER_SEG(sbi) -
|
||||
nm_i->nat_bits_blocks;
|
||||
for (i = 0; i < nm_i->nat_bits_blocks; i++) {
|
||||
struct page *page;
|
||||
|
||||
Reference in New Issue
Block a user