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

2020-07-15 Thread Chao Yu
On 2020/7/16 0:42, Eric Biggers wrote: > On Wed, Jul 15, 2020 at 07:25:13PM +0900, Daeho Jeong wrote: >> Chao, >> >> I can't find fscrypt_zeroout_range_inline_crypt() function. Do you >> mean we need to implement this one for inline encryption? >> >> 2020년 7월 15일 (수) 오후 4:17, Chao Yu 님이 작성: >>>

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

2020-07-15 Thread Eric Biggers
On Wed, Jul 15, 2020 at 07:25:13PM +0900, Daeho Jeong wrote: > Chao, > > I can't find fscrypt_zeroout_range_inline_crypt() function. Do you > mean we need to implement this one for inline encryption? > > 2020년 7월 15일 (수) 오후 4:17, Chao Yu 님이 작성: > > > > On 2020/7/15 14:54, Daeho Jeong wrote: > >

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

2020-07-15 Thread Daeho Jeong
Chao, I can't find fscrypt_zeroout_range_inline_crypt() function. Do you mean we need to implement this one for inline encryption? 2020년 7월 15일 (수) 오후 4:17, Chao Yu 님이 작성: > > On 2020/7/15 14:54, Daeho Jeong wrote: > > You mean we can support ZEROOUT option only for encrypted files of > >

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

2020-07-15 Thread Chao Yu
On 2020/7/15 14:54, Daeho Jeong wrote: > You mean we can support ZEROOUT option only for encrypted files of > non-multidevice f2fs, > and return -EOPNOTSUPP in the multidevice case, right now? Yes, something like: f2fs_sec_trim_file() if ((range.flags & F2FS_TRIM_FILE_ZEROOUT) &&

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

2020-07-15 Thread Daeho Jeong
You mean we can support ZEROOUT option only for encrypted files of non-multidevice f2fs, and return -EOPNOTSUPP in the multidevice case, right now? 2020년 7월 15일 (수) 오후 3:17, Chao Yu 님이 작성: > > On 2020/7/15 12:06, Daeho Jeong wrote: > > We could use fscrypt_zeroout_range() for an encrypted file. >

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

2020-07-15 Thread Chao Yu
On 2020/7/15 12:06, Daeho Jeong wrote: > We could use fscrypt_zeroout_range() for an encrypted file. > But, one problem is fscrypt_zeroout_range() assumes that filesystems > only use a single block device. > It means it doesn't receive bdev as a parameter. > How about changing the interface of

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

2020-07-14 Thread Daeho Jeong
We could use fscrypt_zeroout_range() for an encrypted file. But, one problem is fscrypt_zeroout_range() assumes that filesystems only use a single block device. It means it doesn't receive bdev as a parameter. How about changing the interface of fscrypt_zeroout_range() first and using it? 2020년

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

2020-07-14 Thread Chao Yu
On 2020/7/14 2:11, Jaegeuk Kim wrote: > Hi Daeho, > > Please take a look at this. > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev=35245180459aebf6d70fde88a538f0400a794aa6 I'm curious about what will happen if we call sec_trim_file(F2FS_TRIM_FILE_ZEROOUT) on an

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

2020-07-13 Thread Daeho Jeong
It's correct~ :) 2020년 7월 14일 (화) 오전 3:11, Jaegeuk Kim 님이 작성: > > Hi Daeho, > > Please take a look at this. > > https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev=35245180459aebf6d70fde88a538f0400a794aa6 > > Thanks, > > On 07/13, Daeho Jeong wrote: > > From: Daeho

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

2020-07-13 Thread Jaegeuk Kim
Hi Daeho, Please take a look at this. https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git/commit/?h=dev=35245180459aebf6d70fde88a538f0400a794aa6 Thanks, On 07/13, Daeho Jeong wrote: > From: Daeho Jeong > > Changed the way of handling range.len of F2FS_IOC_SEC_TRIM_FILE. > 1.

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

2020-07-12 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 secure trim the whole blocks starting from range.start regardless of i_size. 2. If the end of the range passes over the end of file, it means until the end of