Re: [f2fs-dev] [PATCH v11 0/5] add support for direct I/O with fscrypt using blk-crypto

2022-02-10 Thread Eric Biggers
On Fri, Jan 28, 2022 at 03:39:35PM -0800, Eric Biggers wrote: > [Note: I'm planning to send a patchset adding STATX_DIRECTIO as was > discussed on v10, but that will be a separate patchset.] > > Encrypted files traditionally haven't supported DIO, due to the need to > encrypt/decrypt the data. Ho

[f2fs-dev] [RFC PATCH 0/7] make statx() return I/O alignment information

2022-02-10 Thread Eric Biggers
This patchset makes the statx() system call return I/O alignment information, roughly following the design that was suggested at https://lore.kernel.org/linux-fsdevel/[email protected]/T/#u This feature solves two problems: (a) it allows userspace to determine when a file

[f2fs-dev] [RFC PATCH 1/7] statx: add I/O alignment information

2022-02-10 Thread Eric Biggers
From: Eric Biggers Traditionally, the conditions for when DIO (direct I/O) is supported were fairly simple: filesystems either supported DIO aligned to the block device's logical block size, or didn't support DIO at all. However, due to filesystem features that have been added over time (e.g, da

[f2fs-dev] [RFC PATCH 4/7] f2fs: move f2fs_force_buffered_io() into file.c

2022-02-10 Thread Eric Biggers
From: Eric Biggers f2fs_force_buffered_io() is only used in file.c, so move it into there. No behavior change. This makes it easier to review later patches. Signed-off-by: Eric Biggers --- fs/f2fs/f2fs.h | 45 - fs/f2fs/file.c | 45 +

[f2fs-dev] [RFC PATCH 5/7] f2fs: don't allow DIO reads but not DIO writes

2022-02-10 Thread Eric Biggers
From: Eric Biggers Currently, if an f2fs filesystem is mounted with the mode=lfs and io_bits mount options, DIO reads are allowed but DIO writes are not. Allowing DIO reads but not DIO writes is an unusual restriction, which is likely to be surprising to applications, namely any application that

[f2fs-dev] [RFC PATCH 7/7] f2fs: support STATX_IOALIGN

2022-02-10 Thread Eric Biggers
From: Eric Biggers Add support for STATX_IOALIGN to f2fs, so that I/O alignment information is exposed to userspace in a consistent and easy-to-use way. Signed-off-by: Eric Biggers --- fs/f2fs/file.c | 31 +++ 1 file changed, 31 insertions(+) diff --git a/fs/f2fs/f

[f2fs-dev] [RFC PATCH 3/7] ext4: support STATX_IOALIGN

2022-02-10 Thread Eric Biggers
From: Eric Biggers Add support for STATX_IOALIGN to ext4, so that I/O alignment information is exposed to userspace in a consistent and easy-to-use way. Signed-off-by: Eric Biggers --- fs/ext4/ext4.h | 1 + fs/ext4/file.c | 15 --- fs/ext4/inode.c | 31 ++

[f2fs-dev] [RFC PATCH 2/7] fscrypt: change fscrypt_dio_supported() to prepare for STATX_IOALIGN

2022-02-10 Thread Eric Biggers
From: Eric Biggers To prepare for STATX_IOALIGN support, make two changes to fscrypt_dio_supported(). First, remove the filesystem-block-alignment check and make the filesystems handle it instead. It previously made sense to have it in fs/crypto/; however, to support STATX_IOALIGN the alignment

[f2fs-dev] [RFC PATCH 6/7] f2fs: simplify f2fs_force_buffered_io()

2022-02-10 Thread Eric Biggers
From: Eric Biggers f2fs only allows direct I/O that is aligned to the filesystem block size. Given that fact, simplify f2fs_force_buffered_io() by removing the redundant call to block_unaligned_IO(). This makes it easier to reuse this code for STATX_IOALIGN. Signed-off-by: Eric Biggers --- f

Re: [f2fs-dev] [PATCH 02/11] MM: document and polish read-ahead code.

2022-02-10 Thread NeilBrown
On Thu, 10 Feb 2022, Jan Kara wrote: > Hi Neil! > > On Thu 10-02-22 16:37:52, NeilBrown wrote: > > Add some "big-picture" documentation for read-ahead and polish the code > > to make it fit this documentation. > > > > The meaning of ->async_size is clarified to match its name. > > i.e. Any reques

Re: [f2fs-dev] [PATCH 02/11] MM: document and polish read-ahead code.

2022-02-10 Thread Jan Kara
Hi Neil! On Thu 10-02-22 16:37:52, NeilBrown wrote: > Add some "big-picture" documentation for read-ahead and polish the code > to make it fit this documentation. > > The meaning of ->async_size is clarified to match its name. > i.e. Any request to ->readahead() has a sync part and an async part.

Re: [f2fs-dev] [PATCH 10/11] block/bfq-iosched.c: use "false" rather than "BLK_RW_ASYNC"

2022-02-10 Thread Jan Kara
On Thu 10-02-22 16:37:52, NeilBrown wrote: > bfq_get_queue() expects a "bool" for the third arg, so pass "false" > rather than "BLK_RW_ASYNC" which will soon be removed. > > Acked-by: Jens Axboe > Signed-off-by: NeilBrown Looks good. Feel free to add: Reviewed-by: Jan Kara