Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-10 Thread Chao Yu
On 2020/7/10 14:46, Jaegeuk Kim wrote: > On 07/10, Chao Yu wrote: >> On 2020/7/10 11:52, Jaegeuk Kim wrote: >>> On 07/10, Chao Yu wrote: On 2020/7/10 11:31, Jaegeuk Kim wrote: > On 07/10, Chao Yu wrote: >> On 2020/7/10 11:02, Jaegeuk Kim wrote: >>> On 07/10, Daeho Jeong wrote:

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:52, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:31, Jaegeuk Kim wrote: > >>> On 07/10, Chao Yu wrote: > On 2020/7/10 11:02, Jaegeuk Kim wrote: > > On 07/10, Daeho Jeong wrote: > >> From: Daeho Jeong > >> > >>

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Chao Yu
On 2020/7/10 11:52, Jaegeuk Kim wrote: > On 07/10, Chao Yu wrote: >> On 2020/7/10 11:31, Jaegeuk Kim wrote: >>> On 07/10, Chao Yu wrote: On 2020/7/10 11:02, Jaegeuk Kim wrote: > On 07/10, Daeho Jeong wrote: >> From: Daeho Jeong >> >> Changed the way of handling range.len of F2

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Daeho Jeong
To handle that case, I think we need to handle range.len(-1) differently. When range.len is -1, we need to find out every block belongs to the inode regardless of i_size and discard it. 2020년 7월 10일 (금) 오후 12:52, Jaegeuk Kim 님이 작성: > > On 07/10, Chao Yu wrote: > > On 2020/7/10 11:31, Jaegeuk Kim w

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:31, Jaegeuk Kim wrote: > > On 07/10, Chao Yu wrote: > >> On 2020/7/10 11:02, Jaegeuk Kim wrote: > >>> On 07/10, Daeho Jeong wrote: > From: Daeho Jeong > > Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > 1. Added -1

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Chao Yu
On 2020/7/10 11:31, Jaegeuk Kim wrote: > On 07/10, Chao Yu wrote: >> On 2020/7/10 11:02, Jaegeuk Kim wrote: >>> On 07/10, Daeho Jeong wrote: From: Daeho Jeong Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. 1. Added -1 value support for range.len to signify th

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Chao Yu wrote: > On 2020/7/10 11:02, Jaegeuk Kim wrote: > > On 07/10, Daeho Jeong wrote: > >> From: Daeho Jeong > >> > >> Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > >> 1. Added -1 value support for range.len to signify the end of file. > >> 2. If the end of the

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/09, Eric Biggers wrote: > On Thu, Jul 09, 2020 at 08:20:35PM -0700, Jaegeuk Kim wrote: > > On 07/10, Daeho Jeong wrote: > > > 1. The valid data will be within i_size. > > > 2. All the trim operations will be done in a unit of block, even if > > > i_size is not aligned with BLKSIZE like the be

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Eric Biggers
On Thu, Jul 09, 2020 at 08:20:35PM -0700, Jaegeuk Kim wrote: > On 07/10, Daeho Jeong wrote: > > 1. The valid data will be within i_size. > > 2. All the trim operations will be done in a unit of block, even if > > i_size is not aligned with BLKSIZE like the below. > > > > index = F2FS_BYTES

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Chao Yu
On 2020/7/10 11:02, Jaegeuk Kim wrote: > On 07/10, Daeho Jeong wrote: >> From: Daeho Jeong >> >> Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. >> 1. Added -1 value support for range.len to signify the end of file. >> 2. If the end of the range passes over the end of file, it m

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Daeho Jeong wrote: > 1. The valid data will be within i_size. > 2. All the trim operations will be done in a unit of block, even if > i_size is not aligned with BLKSIZE like the below. > > index = F2FS_BYTES_TO_BLK(range.start); > pg_end = DIV_ROUND_UP(end_addr, F2FS_BLKS

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Daeho Jeong
1. The valid data will be within i_size. 2. All the trim operations will be done in a unit of block, even if i_size is not aligned with BLKSIZE like the below. index = F2FS_BYTES_TO_BLK(range.start); pg_end = DIV_ROUND_UP(end_addr, F2FS_BLKSIZE); <= BLKSIZE aligned Are you wor

Re: [f2fs-dev] [PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Jaegeuk Kim
On 07/10, Daeho Jeong wrote: > From: Daeho Jeong > > Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > 1. Added -1 value support for range.len to signify the end of file. > 2. If the end of the range passes over the end of file, it means until > the end of file. > 3. ignor

[PATCH] f2fs: change the way of handling range.len in F2FS_IOC_SEC_TRIM_FILE

2020-07-09 Thread Daeho Jeong
From: Daeho Jeong Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. 1. Added -1 value support for range.len to signify the end of file. 2. If the end of the range passes over the end of file, it means until the end of file. 3. ignored the case of that range.len is zero to pr