Linux-f2fs-devel Archive on lore.kernel.org
 help / color / Atom feed
* [f2fs-dev] [PATCH] Check all the data segments against all node ones.
@ 2019-08-23 22:40 Surbhi Palande
  2019-08-24  9:48 ` Chao Yu
  2019-09-02 22:45 ` Jaegeuk Kim
  0 siblings, 2 replies; 4+ messages in thread
From: Surbhi Palande @ 2019-08-23 22:40 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Surbhi Palande, Jaegeuk Kim

As a part of the sanity checking while mounting, distinct segment number
assignment to data and node segments is verified. Fixing a small bug in
this verification between node and data segments. We need to check all
the data segments with all the node segments.

Signed-off-by: Surbhi Palande <csurbhi@gmail.com>
---
 fs/f2fs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 6b959bb..1ec4d95 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2684,11 +2684,11 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi)
 		}
 	}
 	for (i = 0; i < NR_CURSEG_NODE_TYPE; i++) {
-		for (j = i; j < NR_CURSEG_DATA_TYPE; j++) {
+		for (j = 0; j < NR_CURSEG_DATA_TYPE; j++) {
 			if (le32_to_cpu(ckpt->cur_node_segno[i]) ==
 				le32_to_cpu(ckpt->cur_data_segno[j])) {
 				f2fs_msg(sbi->sb, KERN_ERR,
-					"Data segment (%u) and Data segment (%u)"
+					"Node segment (%u) and Data segment (%u)"
 					" has the same segno: %u", i, j,
 					le32_to_cpu(ckpt->cur_node_segno[i]));
 				return 1;
-- 
2.7.4



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [f2fs-dev] [PATCH] Check all the data segments against all node ones.
  2019-08-23 22:40 [f2fs-dev] [PATCH] Check all the data segments against all node ones Surbhi Palande
@ 2019-08-24  9:48 ` Chao Yu
  2019-08-28  1:40   ` Chao Yu
  2019-09-02 22:45 ` Jaegeuk Kim
  1 sibling, 1 reply; 4+ messages in thread
From: Chao Yu @ 2019-08-24  9:48 UTC (permalink / raw)
  To: Surbhi Palande, linux-f2fs-devel; +Cc: Surbhi Palande, Jaegeuk Kim

On 2019-8-24 6:40, Surbhi Palande wrote:
> As a part of the sanity checking while mounting, distinct segment number
> assignment to data and node segments is verified. Fixing a small bug in
> this verification between node and data segments. We need to check all
> the data segments with all the node segments.
> 

Fixes: 042be0f849e5f ("f2fs: fix to do sanity check with current segment number")

> Signed-off-by: Surbhi Palande <csurbhi@gmail.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [f2fs-dev] [PATCH] Check all the data segments against all node ones.
  2019-08-24  9:48 ` Chao Yu
@ 2019-08-28  1:40   ` Chao Yu
  0 siblings, 0 replies; 4+ messages in thread
From: Chao Yu @ 2019-08-28  1:40 UTC (permalink / raw)
  To: Chao Yu, Surbhi Palande, linux-f2fs-devel; +Cc: Surbhi Palande, Jaegeuk Kim

Hi Surbhi,

I guess this patch is okay, please wait Jaegeuk to merge it.

On 2019/8/24 17:48, Chao Yu wrote:
> On 2019-8-24 6:40, Surbhi Palande wrote:
>> As a part of the sanity checking while mounting, distinct segment number
>> assignment to data and node segments is verified. Fixing a small bug in
>> this verification between node and data segments. We need to check all
>> the data segments with all the node segments.
>>
> 
> Fixes: 042be0f849e5f ("f2fs: fix to do sanity check with current segment number")

I meant it will be better to add this line to indicate which patch introduced
this bug, it can help LTS kernel maintainer to recognize and backport the
necessary fixing patches.

BTW, it needs to update commit tile as format of "f2fs: check all...."

Anyway, thanks for the patch!

Thanks,

> 
>> Signed-off-by: Surbhi Palande <csurbhi@gmail.com>
> 
> Reviewed-by: Chao Yu <yuchao0@huawei.com>
> 
> Thanks,
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
> .
> 


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

* Re: [f2fs-dev] [PATCH] Check all the data segments against all node ones.
  2019-08-23 22:40 [f2fs-dev] [PATCH] Check all the data segments against all node ones Surbhi Palande
  2019-08-24  9:48 ` Chao Yu
@ 2019-09-02 22:45 ` Jaegeuk Kim
  1 sibling, 0 replies; 4+ messages in thread
From: Jaegeuk Kim @ 2019-09-02 22:45 UTC (permalink / raw)
  To: Surbhi Palande; +Cc: Surbhi Palande, linux-f2fs-devel

Hi Surbhi,

Applied as "f2fs: check all the data segments against all node ones".

Thanks,

On 08/23, Surbhi Palande wrote:
> As a part of the sanity checking while mounting, distinct segment number
> assignment to data and node segments is verified. Fixing a small bug in
> this verification between node and data segments. We need to check all
> the data segments with all the node segments.
> 
> Signed-off-by: Surbhi Palande <csurbhi@gmail.com>
> ---
>  fs/f2fs/super.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> index 6b959bb..1ec4d95 100644
> --- a/fs/f2fs/super.c
> +++ b/fs/f2fs/super.c
> @@ -2684,11 +2684,11 @@ int f2fs_sanity_check_ckpt(struct f2fs_sb_info *sbi)
>  		}
>  	}
>  	for (i = 0; i < NR_CURSEG_NODE_TYPE; i++) {
> -		for (j = i; j < NR_CURSEG_DATA_TYPE; j++) {
> +		for (j = 0; j < NR_CURSEG_DATA_TYPE; j++) {
>  			if (le32_to_cpu(ckpt->cur_node_segno[i]) ==
>  				le32_to_cpu(ckpt->cur_data_segno[j])) {
>  				f2fs_msg(sbi->sb, KERN_ERR,
> -					"Data segment (%u) and Data segment (%u)"
> +					"Node segment (%u) and Data segment (%u)"
>  					" has the same segno: %u", i, j,
>  					le32_to_cpu(ckpt->cur_node_segno[i]));
>  				return 1;
> -- 
> 2.7.4


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-23 22:40 [f2fs-dev] [PATCH] Check all the data segments against all node ones Surbhi Palande
2019-08-24  9:48 ` Chao Yu
2019-08-28  1:40   ` Chao Yu
2019-09-02 22:45 ` Jaegeuk Kim

Linux-f2fs-devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-f2fs-devel/0 linux-f2fs-devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-f2fs-devel linux-f2fs-devel/ https://lore.kernel.org/linux-f2fs-devel \
		linux-f2fs-devel@lists.sourceforge.net linux-f2fs-devel@archiver.kernel.org
	public-inbox-index linux-f2fs-devel


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/net.sourceforge.lists.linux-f2fs-devel


AGPL code for this site: git clone https://public-inbox.org/ public-inbox