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

2020-07-26 Thread Dave Chinner
On Sun, Jul 26, 2020 at 07:59:46PM -0700, Eric Biggers wrote: > On Mon, Jul 27, 2020 at 10:58:48AM +1000, Dave Chinner wrote: > > On Sat, Jul 25, 2020 at 07:49:20PM -0700, Eric Biggers wrote: > > > On Sat, Jul 25, 2020 at 10:14:41AM +1000, Dave Chinner wrote: > > > > > +bool fscrypt_dio_supported(s

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

2020-07-26 Thread Eric Biggers
On Mon, Jul 27, 2020 at 10:58:48AM +1000, Dave Chinner wrote: > On Sat, Jul 25, 2020 at 07:49:20PM -0700, Eric Biggers wrote: > > On Sat, Jul 25, 2020 at 10:14:41AM +1000, Dave Chinner wrote: > > > > +bool fscrypt_dio_supported(struct kiocb *iocb, struct iov_iter *iter) > > > > +{ > > > > + c

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

2020-07-26 Thread Dave Chinner
On Sat, Jul 25, 2020 at 07:49:20PM -0700, Eric Biggers wrote: > On Sat, Jul 25, 2020 at 10:14:41AM +1000, Dave Chinner wrote: > > > +bool fscrypt_dio_supported(struct kiocb *iocb, struct iov_iter *iter) > > > +{ > > > + const struct inode *inode = file_inode(iocb->ki_filp); > > > + const unsigned i

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

2020-07-25 Thread Eric Biggers
On Sat, Jul 25, 2020 at 10:14:41AM +1000, Dave Chinner wrote: > > +bool fscrypt_dio_supported(struct kiocb *iocb, struct iov_iter *iter) > > +{ > > + const struct inode *inode = file_inode(iocb->ki_filp); > > + const unsigned int blocksize = i_blocksize(inode); > > + > > + /* If the file is u

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

2020-07-24 Thread Dave Chinner
On Fri, Jul 24, 2020 at 06:44:55PM +, 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_blocks() to limit how many blocks can be > added t

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

2020-07-24 Thread Satya Tangirala via Linux-f2fs-devel
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_blocks() to limit how many blocks can be added to a bio being prepared for direct I/O. This is needed for filesystems that use