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
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
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
Just cleanup, no functional change.
Signed-off-by: Chao Yu
---
v2:
- don't cast type of segment number from unsigned int
to long long, because segs << log_blocks_per_seg won't
overflow due to f2fs doesn't support 64-bits addressing.
fs/f2fs/debug.c | 7 +++
fs/f2fs/f2fs.h| 14
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()
On 2024/3/1 16:25, Zhiguo Niu wrote:
f2fs_gc_range may return error, so its caller
f2fs_allocate_pinning_section should determine whether
to do retry based on ist return value.
Also just do f2fs_gc_range when f2fs_allocate_new_section
return -EAGAIN, and check cp error case in f2fs_gc_range.
On 2024/3/1 16:25, Zhiguo Niu wrote:
__allocate_new_segment may return error when get_new_segment
fails, so its caller should check its return value.
Signed-off-by: Zhiguo Niu
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing list