All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fsck.f2fs: do not check segment type of empty curseg
@ 2018-10-08 13:09 Sheng Yong
  2018-10-09 11:22 ` Sheng Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Sheng Yong @ 2018-10-08 13:09 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: linux-f2fs-devel

If a curseg is not used, its SIT entry may have an inconsistent type.
This will be fixed during recover.

Fixes: df8065e52928be ("fsck.f2fs: introduce fsck_chk_curseg_info")
Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
 fsck/fsck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsck/fsck.c b/fsck/fsck.c
index 85d9823..dd7f6ae 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -2485,7 +2485,7 @@ int fsck_chk_curseg_info(struct f2fs_sb_info *sbi)
 		se = get_seg_entry(sbi, curseg->segno);
 		sum_blk = curseg->sum_blk;
 
-		if (se->type != i) {
+		if (se->valid_blocks && se->type != i) {
 			ASSERT_MSG("Incorrect curseg [%d]: segno [0x%x] "
 				   "type(SIT) [%d]", i, curseg->segno,
 				   se->type);
-- 
2.17.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fsck.f2fs: do not check segment type of empty curseg
  2018-10-08 13:09 [PATCH] fsck.f2fs: do not check segment type of empty curseg Sheng Yong
@ 2018-10-09 11:22 ` Sheng Yong
  0 siblings, 0 replies; 2+ messages in thread
From: Sheng Yong @ 2018-10-09 11:22 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: linux-f2fs-devel

Sorry, this seems wrong, please ignore this :(

On 2018/10/8 21:09, Sheng Yong wrote:
> If a curseg is not used, its SIT entry may have an inconsistent type.
> This will be fixed during recover.
> 
> Fixes: df8065e52928be ("fsck.f2fs: introduce fsck_chk_curseg_info")
> Signed-off-by: Sheng Yong <shengyong1@huawei.com>
> ---
>   fsck/fsck.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fsck/fsck.c b/fsck/fsck.c
> index 85d9823..dd7f6ae 100644
> --- a/fsck/fsck.c
> +++ b/fsck/fsck.c
> @@ -2485,7 +2485,7 @@ int fsck_chk_curseg_info(struct f2fs_sb_info *sbi)
>   		se = get_seg_entry(sbi, curseg->segno);
>   		sum_blk = curseg->sum_blk;
>   
> -		if (se->type != i) {
> +		if (se->valid_blocks && se->type != i) {
>   			ASSERT_MSG("Incorrect curseg [%d]: segno [0x%x] "
>   				   "type(SIT) [%d]", i, curseg->segno,
>   				   se->type);
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-09 11:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-08 13:09 [PATCH] fsck.f2fs: do not check segment type of empty curseg Sheng Yong
2018-10-09 11:22 ` Sheng Yong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.