Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Eric Biggers
On Wed, Jul 22, 2020 at 04:32:47PM -0700, Darrick J. Wong wrote: > On Wed, Jul 22, 2020 at 04:26:25PM -0700, Eric Biggers wrote: > > On Wed, Jul 22, 2020 at 03:34:04PM -0700, Eric Biggers wrote: > > > So, something like this: > > > > > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > > > index 4

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Darrick J. Wong
On Wed, Jul 22, 2020 at 04:26:25PM -0700, Eric Biggers wrote: > On Wed, Jul 22, 2020 at 03:34:04PM -0700, Eric Biggers wrote: > > So, something like this: > > > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > > index 44bad4bb8831..2816194db46c 100644 > > --- a/fs/ext4/inode.c > > +++ b/fs/ext4/

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Eric Biggers
On Wed, Jul 22, 2020 at 03:34:04PM -0700, Eric Biggers wrote: > So, something like this: > > diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c > index 44bad4bb8831..2816194db46c 100644 > --- a/fs/ext4/inode.c > +++ b/fs/ext4/inode.c > @@ -3437,6 +3437,15 @@ static int ext4_iomap_begin(struct inode *i

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Eric Biggers
On Wed, Jul 22, 2020 at 11:44:07PM +0100, Matthew Wilcox wrote: > On Wed, Jul 22, 2020 at 03:34:04PM -0700, Eric Biggers wrote: > > > Which means you are now placing a new constraint on this code in > > > that we cannot ever, in future, zero entire blocks here. > > > > > > This code can issue arbi

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Matthew Wilcox
On Wed, Jul 22, 2020 at 03:34:04PM -0700, Eric Biggers wrote: > > Which means you are now placing a new constraint on this code in > > that we cannot ever, in future, zero entire blocks here. > > > > This code can issue arbitrary sized zeroing bios - multiple entire fs blocks > > blocks if necessa

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Eric Biggers
On Thu, Jul 23, 2020 at 07:16:29AM +1000, Dave Chinner wrote: > On Mon, Jul 20, 2020 at 11:37:35PM +, Satya Tangirala wrote: > > From: Eric Biggers > > > > Wire up iomap direct I/O with the fscrypt additions for direct I/O. > > This allows ext4 to support direct I/O on encrypted files when in

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Dave Chinner
On Mon, Jul 20, 2020 at 11:37:35PM +, Satya Tangirala wrote: > From: Eric Biggers > > Wire up iomap direct I/O with the fscrypt additions for direct I/O. > This allows ext4 to support direct I/O on encrypted files when inline > encryption is enabled. > > This change consists of two parts: >

Re: [f2fs-dev] [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name

2020-07-22 Thread Greg KH
On Wed, Jul 22, 2020 at 10:24:37AM -0700, Jaegeuk Kim wrote: > On 07/22, Greg KH wrote: > > On Wed, Jul 22, 2020 at 09:43:56AM -0700, Jaegeuk Kim wrote: > > > On 07/19, Greg KH wrote: > > > > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > > > > From: Daeho Jeong > > > > > > > >

Re: [f2fs-dev] [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name

2020-07-22 Thread Jaegeuk Kim
On 07/22, Greg KH wrote: > On Wed, Jul 22, 2020 at 09:43:56AM -0700, Jaegeuk Kim wrote: > > On 07/19, Greg KH wrote: > > > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > > > From: Daeho Jeong > > > > > > > > Added a symbolic link directory pointing to its device name > > > > dir

Re: [f2fs-dev] [PATCH v4 3/7] iomap: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Jaegeuk Kim
On 07/20, Satya Tangirala wrote: > From: Eric Biggers > > Wire up iomap direct I/O with the fscrypt additions for direct I/O. > This allows ext4 to support direct I/O on encrypted files when inline > encryption is enabled. > > This change consists of two parts: > > - Set a bio_crypt_ctx on bios

Re: [f2fs-dev] [PATCH v4 4/7] ext4: support direct I/O with fscrypt using blk-crypto

2020-07-22 Thread Jaegeuk Kim
On 07/20, Satya Tangirala wrote: > From: Eric Biggers > > Wire up ext4 with fscrypt direct I/O support. direct I/O with fscrypt is > only supported through blk-crypto (i.e. CONFIG_BLK_INLINE_ENCRYPTION must > have been enabled, the 'inlinecrypt' mount option must have been specified, > and either

Re: [f2fs-dev] [PATCH v4 2/7] direct-io: add support for fscrypt using blk-crypto

2020-07-22 Thread Jaegeuk Kim
On 07/20, Satya Tangirala wrote: > From: Eric Biggers > > Set bio crypt contexts on bios by calling into fscrypt when required, > and explicitly check for DUN continuity when adding pages to the bio. > (While DUN continuity is usually implied by logical block contiguity, > this is not the case wh

Re: [f2fs-dev] [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name

2020-07-22 Thread Greg KH
On Wed, Jul 22, 2020 at 09:43:56AM -0700, Jaegeuk Kim wrote: > On 07/19, Greg KH wrote: > > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > Added a symbolic link directory pointing to its device name > > > directory using the volume name of the par

Re: [f2fs-dev] [PATCH v4 1/7] fscrypt: Add functions for direct I/O support

2020-07-22 Thread Jaegeuk Kim
On 07/20, Satya Tangirala wrote: > From: Eric Biggers > > Introduce fscrypt_dio_supported() to check whether a direct I/O request > is unsupported due to encryption constraints. > > Also introduce fscrypt_limit_io_pages() to limit how many pages can be > added to a bio being prepared for direct

Re: [f2fs-dev] [PATCH v4 6/7] fscrypt: document inline encryption support

2020-07-22 Thread Jaegeuk Kim
On 07/20, Satya Tangirala wrote: > Update the fscrypt documentation file for inline encryption support. > > Signed-off-by: Satya Tangirala > Reviewed-by: Eric Biggers Reviewed-by: Jaegeuk Kim > --- > Documentation/filesystems/fscrypt.rst | 16 +++- > 1 file changed, 15 insertions

Re: [f2fs-dev] [PATCH v4 7/7] fscrypt: update documentation for direct I/O support

2020-07-22 Thread Jaegeuk Kim
On 07/20, Eric Biggers wrote: > On Mon, Jul 20, 2020 at 11:37:39PM +, Satya Tangirala wrote: > > Update fscrypt documentation to reflect the addition of direct I/O support > > and document the necessary conditions for direct I/O on encrypted files. > > > > Signed-off-by: Satya Tangirala > >

Re: [f2fs-dev] [PATCH 1/2] f2fs: add sysfs symbolic link to kobject with volume name

2020-07-22 Thread Jaegeuk Kim
On 07/19, Greg KH wrote: > On Sun, Jul 19, 2020 at 02:44:08PM +0900, Daeho Jeong wrote: > > From: Daeho Jeong > > > > Added a symbolic link directory pointing to its device name > > directory using the volume name of the partition in sysfs. > > (i.e., /sys/fs/f2fs/vol_#x -> /sys/fs/f2fs/sda1) >