Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33afa7fd authored by Jaegeuk Kim's avatar Jaegeuk Kim
Browse files

f2fs: allocate new segment aligned with sections



When allocating a new segment under the LFS mode, we should keep the section
boundary.

Reviewed-by: default avatarNamjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk.kim@samsung.com>
parent 56ae674c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -362,7 +362,8 @@ static void get_new_segment(struct f2fs_sb_info *sbi,
	if (!new_sec && ((*newseg + 1) % sbi->segs_per_sec)) {
		segno = find_next_zero_bit(free_i->free_segmap,
					TOTAL_SEGS(sbi), *newseg + 1);
		if (segno < TOTAL_SEGS(sbi))
		if (segno - *newseg < sbi->segs_per_sec -
					(*newseg % sbi->segs_per_sec))
			goto got_it;
	}
find_other_zone: