Re: [f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-04 Thread Zhiguo Niu
On Mon, Mar 4, 2024 at 5:19 PM Chao Yu wrote: > > On 2024/3/4 15:52, Zhiguo Niu wrote: > > On Mon, Mar 4, 2024 at 3:17 PM Chao Yu wrote: > >> > >> On 2024/3/4 11:33, Zhiguo Niu wrote: > >>> On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote: > > On 2024/3/1 19:36, Zhiguo Niu wrote: > >

Re: [f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-04 Thread Chao Yu
On 2024/3/4 15:52, Zhiguo Niu wrote: On Mon, Mar 4, 2024 at 3:17 PM Chao Yu wrote: On 2024/3/4 11:33, Zhiguo Niu wrote: On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote: On 2024/3/1 19:36, Zhiguo Niu wrote: new_curseg may return error if get_new_segment fail, so its result should be check

Re: [f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-03 Thread Zhiguo Niu
On Mon, Mar 4, 2024 at 3:17 PM Chao Yu wrote: > > On 2024/3/4 11:33, Zhiguo Niu wrote: > > On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote: > >> > >> On 2024/3/1 19:36, Zhiguo Niu wrote: > >>> new_curseg may return error if get_new_segment fail, so its result > >>> should be check in its caller

Re: [f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-03 Thread Chao Yu
On 2024/3/4 11:33, Zhiguo Niu wrote: On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote: On 2024/3/1 19:36, Zhiguo Niu wrote: new_curseg may return error if get_new_segment fail, so its result should be check in its caller f2fs_allocate_segment_for_resize, alos pass this results to

Re: [f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-03 Thread Zhiguo Niu
On Mon, Mar 4, 2024 at 11:19 AM Chao Yu wrote: > > On 2024/3/1 19:36, Zhiguo Niu wrote: > > new_curseg may return error if get_new_segment fail, so its result > > should be check in its caller f2fs_allocate_segment_for_resize, > > alos pass this results to free_segment_range. > > Zhiguo, > > What

Re: [f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-03 Thread Chao Yu
On 2024/3/1 19:36, Zhiguo Niu wrote: new_curseg may return error if get_new_segment fail, so its result should be check in its caller f2fs_allocate_segment_for_resize, alos pass this results to free_segment_range. Zhiguo, What about handling all error paths of new_curseg() and change_curseg()

[f2fs-dev] [PATCH] f2fs: fix to check result of new_curseg in f2fs_allocate_segment_for_resize

2024-03-01 Thread Zhiguo Niu
new_curseg may return error if get_new_segment fail, so its result should be check in its caller f2fs_allocate_segment_for_resize, alos pass this results to free_segment_range. Signed-off-by: Zhiguo Niu --- fs/f2fs/f2fs.h| 2 +- fs/f2fs/gc.c | 7 +-- fs/f2fs/segment.c | 9 +++--