Re: [PATCH v2 13/17] fscrypt: Remove fscrypt_dio_supported()
Eric Biggers <[email protected]> Sun, 5 Jul 2026 13:19:37 -0700
| Newsgroups | org.kernel.vger.linux-fscrypt,net.sourceforge.lists.linux-f2fs-devel,org.kernel.vger.linux-block,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel |
|---|---|
| Message-ID | <20260705201937.GI41916@quark> |
On Sun, Jul 05, 2026 at 12:45:50PM -0700, Eric Biggers wrote: > On block-based filesystems, fscrypt file contents encryption is now > always implemented using blk-crypto. This implementation supports > direct I/O. > > Therefore, fscrypt_dio_supported() now always returns true, except in > the edge case where statx(STATX_DIOALIGN) is called on an encrypted > regular file that hasn't had its key set up. But that was really a > workaround rather than the desired behavior, so we can disregard it. > > Thus, fscrypt_dio_supported() is no longer needed. Remove it. > > Reviewed-by: Christoph Hellwig <[email protected]> > Signed-off-by: Eric Biggers <[email protected]> Sashiko pointed out that the following comment in ext4_getattr() (and also in f2fs_getattr()) becomes outdated and should be updated too: /* * Return the DIO alignment restrictions if requested. We only return * this information when requested, since on encrypted files it might * take a fair bit of work to get if the file wasn't opened recently. */ - Eric