* [f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
@ 2024-05-17 11:26 ` Zhiguo Niu
0 siblings, 0 replies; 10+ messages in thread
From: Zhiguo Niu @ 2024-05-17 11:26 UTC (permalink / raw)
To: jaegeuk, chao
Cc: ke.wang, linux-kernel, linux-f2fs-devel, zhiguo.niu, Hao_hao.Wang
commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
missed this allocated path, fix it.
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
fs/f2fs/segment.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a0ce3d0..71dc8042 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
if (cs->next_blkoff) {
unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
- f2fs_allocate_new_section(sbi, type, true);
+ err = f2fs_allocate_new_section(sbi, type, true);
+ if (err)
+ return err;
f2fs_notice(sbi, "Assign new section to curseg[%d]: "
"[0x%x,0x%x] -> [0x%x,0x%x]",
type, old_segno, old_blkoff,
--
1.9.1
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
@ 2024-05-17 11:26 ` Zhiguo Niu
0 siblings, 0 replies; 10+ messages in thread
From: Zhiguo Niu @ 2024-05-17 11:26 UTC (permalink / raw)
To: jaegeuk, chao
Cc: linux-f2fs-devel, linux-kernel, niuzhiguo84, zhiguo.niu, ke.wang,
Hao_hao.Wang
commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
missed this allocated path, fix it.
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
---
fs/f2fs/segment.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index a0ce3d0..71dc8042 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
if (cs->next_blkoff) {
unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
- f2fs_allocate_new_section(sbi, type, true);
+ err = f2fs_allocate_new_section(sbi, type, true);
+ if (err)
+ return err;
f2fs_notice(sbi, "Assign new section to curseg[%d]: "
"[0x%x,0x%x] -> [0x%x,0x%x]",
type, old_segno, old_blkoff,
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
2024-05-17 11:26 ` Zhiguo Niu
@ 2024-05-17 16:55 ` Markus Elfring via Linux-f2fs-devel
-1 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring @ 2024-05-17 16:55 UTC (permalink / raw)
To: Zhiguo Niu, linux-f2fs-devel, kernel-janitors, Chao Yu,
Jaegeuk Kim
Cc: LKML, Hao_hao.Wang, 王科 (Ke Wang), Zhiguo Niu
…
> missed this allocated path, fix it.
* Will another imperative wording be desirable for an improved change description?
* Would you like to add the tag “Fixes”?
* How do you think about to append parentheses to the function name
in the summary phrase?
Regards,
Markus
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
@ 2024-05-17 16:55 ` Markus Elfring via Linux-f2fs-devel
0 siblings, 0 replies; 10+ messages in thread
From: Markus Elfring via Linux-f2fs-devel @ 2024-05-17 16:55 UTC (permalink / raw)
To: Zhiguo Niu, linux-f2fs-devel, kernel-janitors, Chao Yu,
Jaegeuk Kim
Cc: 王科 (Ke Wang), LKML, Hao_hao.Wang
…
> missed this allocated path, fix it.
* Will another imperative wording be desirable for an improved change description?
* Would you like to add the tag “Fixes”?
* How do you think about to append parentheses to the function name
in the summary phrase?
Regards,
Markus
_______________________________________________
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] 10+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
2024-05-17 11:26 ` Zhiguo Niu
@ 2024-05-20 1:21 ` Chao Yu
-1 siblings, 0 replies; 10+ messages in thread
From: Chao Yu @ 2024-05-20 1:21 UTC (permalink / raw)
To: Zhiguo Niu, jaegeuk; +Cc: Hao_hao.Wang, ke.wang, linux-kernel, linux-f2fs-devel
On 2024/5/17 19:26, Zhiguo Niu wrote:
> commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> missed this allocated path, fix it.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
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] 10+ messages in thread
* Re: [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
@ 2024-05-20 1:21 ` Chao Yu
0 siblings, 0 replies; 10+ messages in thread
From: Chao Yu @ 2024-05-20 1:21 UTC (permalink / raw)
To: Zhiguo Niu, jaegeuk
Cc: linux-f2fs-devel, linux-kernel, niuzhiguo84, ke.wang,
Hao_hao.Wang
On 2024/5/17 19:26, Zhiguo Niu wrote:
> commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> missed this allocated path, fix it.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
2024-05-17 11:26 ` Zhiguo Niu
@ 2024-05-20 19:52 ` Jaegeuk Kim
-1 siblings, 0 replies; 10+ messages in thread
From: Jaegeuk Kim @ 2024-05-20 19:52 UTC (permalink / raw)
To: Zhiguo Niu; +Cc: ke.wang, linux-kernel, linux-f2fs-devel, Hao_hao.Wang
On 05/17, Zhiguo Niu wrote:
> commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> missed this allocated path, fix it.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
> fs/f2fs/segment.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index a0ce3d0..71dc8042 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
> if (cs->next_blkoff) {
> unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
>
> - f2fs_allocate_new_section(sbi, type, true);
> + err = f2fs_allocate_new_section(sbi, type, true);
> + if (err)
> + return err;
I hesitate to apply this, since this may give mount failures forever. Do you see
a real issue with this?
> f2fs_notice(sbi, "Assign new section to curseg[%d]: "
> "[0x%x,0x%x] -> [0x%x,0x%x]",
> type, old_segno, old_blkoff,
> --
> 1.9.1
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
@ 2024-05-20 19:52 ` Jaegeuk Kim
0 siblings, 0 replies; 10+ messages in thread
From: Jaegeuk Kim @ 2024-05-20 19:52 UTC (permalink / raw)
To: Zhiguo Niu
Cc: chao, linux-f2fs-devel, linux-kernel, niuzhiguo84, ke.wang,
Hao_hao.Wang
On 05/17, Zhiguo Niu wrote:
> commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> missed this allocated path, fix it.
>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> ---
> fs/f2fs/segment.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> index a0ce3d0..71dc8042 100644
> --- a/fs/f2fs/segment.c
> +++ b/fs/f2fs/segment.c
> @@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
> if (cs->next_blkoff) {
> unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
>
> - f2fs_allocate_new_section(sbi, type, true);
> + err = f2fs_allocate_new_section(sbi, type, true);
> + if (err)
> + return err;
I hesitate to apply this, since this may give mount failures forever. Do you see
a real issue with this?
> f2fs_notice(sbi, "Assign new section to curseg[%d]: "
> "[0x%x,0x%x] -> [0x%x,0x%x]",
> type, old_segno, old_blkoff,
> --
> 1.9.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
2024-05-20 19:52 ` Jaegeuk Kim
@ 2024-05-21 0:56 ` Zhiguo Niu
-1 siblings, 0 replies; 10+ messages in thread
From: Zhiguo Niu @ 2024-05-21 0:56 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: ke.wang, linux-kernel, linux-f2fs-devel, Zhiguo Niu, Hao_hao.Wang
On Tue, May 21, 2024 at 3:52 AM Jaegeuk Kim <jaegeuk@kernel.org> wrote:
>
> On 05/17, Zhiguo Niu wrote:
> > commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> > missed this allocated path, fix it.
> >
> > Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> > ---
> > fs/f2fs/segment.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index a0ce3d0..71dc8042 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
> > if (cs->next_blkoff) {
> > unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
> >
> > - f2fs_allocate_new_section(sbi, type, true);
> > + err = f2fs_allocate_new_section(sbi, type, true);
> > + if (err)
> > + return err;
>
> I hesitate to apply this, since this may give mount failures forever. Do you see
> a real issue with this?
Hi Jaegeuk,
No I did not have a real issue related to this, just found it by code review.
it is ok not to apply this for me .
thanks a lot.
>
> > f2fs_notice(sbi, "Assign new section to curseg[%d]: "
> > "[0x%x,0x%x] -> [0x%x,0x%x]",
> > type, old_segno, old_blkoff,
> > --
> > 1.9.1
_______________________________________________
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] 10+ messages in thread
* Re: [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section
@ 2024-05-21 0:56 ` Zhiguo Niu
0 siblings, 0 replies; 10+ messages in thread
From: Zhiguo Niu @ 2024-05-21 0:56 UTC (permalink / raw)
To: Jaegeuk Kim
Cc: Zhiguo Niu, chao, linux-f2fs-devel, linux-kernel, ke.wang,
Hao_hao.Wang
On Tue, May 21, 2024 at 3:52 AM Jaegeuk Kim <jaegeuk@kernel.org> wrote:
>
> On 05/17, Zhiguo Niu wrote:
> > commit 245930617c9b ("f2fs: fix to handle error paths of {new,change}_curseg()")
> > missed this allocated path, fix it.
> >
> > Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> > ---
> > fs/f2fs/segment.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index a0ce3d0..71dc8042 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -5190,7 +5190,9 @@ static int fix_curseg_write_pointer(struct f2fs_sb_info *sbi, int type)
> > if (cs->next_blkoff) {
> > unsigned int old_segno = cs->segno, old_blkoff = cs->next_blkoff;
> >
> > - f2fs_allocate_new_section(sbi, type, true);
> > + err = f2fs_allocate_new_section(sbi, type, true);
> > + if (err)
> > + return err;
>
> I hesitate to apply this, since this may give mount failures forever. Do you see
> a real issue with this?
Hi Jaegeuk,
No I did not have a real issue related to this, just found it by code review.
it is ok not to apply this for me .
thanks a lot.
>
> > f2fs_notice(sbi, "Assign new section to curseg[%d]: "
> > "[0x%x,0x%x] -> [0x%x,0x%x]",
> > type, old_segno, old_blkoff,
> > --
> > 1.9.1
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2024-05-21 0:57 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-17 11:26 [f2fs-dev] [PATCH] f2fs: fix to check return value of f2fs_allocate_new_section Zhiguo Niu
2024-05-17 11:26 ` Zhiguo Niu
2024-05-17 16:55 ` Markus Elfring
2024-05-17 16:55 ` [f2fs-dev] " Markus Elfring via Linux-f2fs-devel
2024-05-20 1:21 ` Chao Yu
2024-05-20 1:21 ` Chao Yu
2024-05-20 19:52 ` [f2fs-dev] " Jaegeuk Kim
2024-05-20 19:52 ` Jaegeuk Kim
2024-05-21 0:56 ` [f2fs-dev] " Zhiguo Niu
2024-05-21 0:56 ` Zhiguo Niu
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.