Skip to content

Commit c9667b1

Browse files
Daeho JeongJaegeuk Kim
authored andcommitted
f2fs: check zone write pointer points to the end of zone
We don't need to report an issue, when the zone write pointer already points to the end of the zone, since the zone mismatch is already taken care. Signed-off-by: Daeho Jeong <daehojeong@google.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
1 parent ac1ee16 commit c9667b1

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

fs/f2fs/segment.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4888,8 +4888,12 @@ static int check_zone_write_pointer(struct f2fs_sb_info *sbi,
48884888
break;
48894889
}
48904890

4891-
// The write pointer matches with the valid blocks
4892-
if (last_valid_block + 1 == wp_block)
4891+
/*
4892+
* The write pointer matches with the valid blocks or
4893+
* already points to the end of the zone.
4894+
*/
4895+
if ((last_valid_block + 1 == wp_block) ||
4896+
(zone->wp == zone->start + zone->len))
48934897
return 0;
48944898

48954899
if (last_valid_block + 1 == zone_block) {

0 commit comments

Comments
 (0)