Re: [f2fs-dev] [PATCH] f2fs: ignore when len of range in f2fs_sec_trim_file is zero

2020-07-08 Thread Daeho Jeong
I can add it~ 2020년 7월 9일 (목) 오후 2:39, Jaegeuk Kim 님이 작성: > > On 07/09, Chao Yu wrote: > > On 2020/7/9 9:57, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > When end_addr comes to zero, it'll trigger different behaviour. > > > To prevent this, we need to ignore the case of that range.len i

Re: [f2fs-dev] [PATCH] f2fs: ignore when len of range in f2fs_sec_trim_file is zero

2020-07-08 Thread Jaegeuk Kim
On 07/09, Chao Yu wrote: > On 2020/7/9 9:57, Daeho Jeong wrote: > > From: Daeho Jeong > > > > When end_addr comes to zero, it'll trigger different behaviour. > > To prevent this, we need to ignore the case of that range.len is > > zero in the function. > > > > Signed-off-by: Daeho Jeong > > ---

Re: [f2fs-dev] [PATCH] f2fs: ignore when len of range in f2fs_sec_trim_file is zero

2020-07-08 Thread Daeho Jeong
I thought it's better to treat this as the error case, since the range already passed out of the i_size range. If we allow that, the user needs to send the range parameter being aligned like start:0 and len: roundup(i_size, PAGE_SIZE), even if he or she wants to erase the whole file. 2020년 7월 9일 (

Re: [f2fs-dev] [PATCH] f2fs: ignore when len of range in f2fs_sec_trim_file is zero

2020-07-08 Thread Chao Yu
On 2020/7/9 9:57, Daeho Jeong wrote: > From: Daeho Jeong > > When end_addr comes to zero, it'll trigger different behaviour. > To prevent this, we need to ignore the case of that range.len is > zero in the function. > > Signed-off-by: Daeho Jeong > --- > fs/f2fs/file.c | 7 +++ > 1 file ch

[PATCH] f2fs: ignore when len of range in f2fs_sec_trim_file is zero

2020-07-08 Thread Daeho Jeong
From: Daeho Jeong When end_addr comes to zero, it'll trigger different behaviour. To prevent this, we need to ignore the case of that range.len is zero in the function. Signed-off-by: Daeho Jeong --- fs/f2fs/file.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/fs/f