vfs: support STATX_DIOALIGN on block devices
authorEric Biggers <ebiggers@google.com>
Sat, 27 Aug 2022 06:58:45 +0000 (23:58 -0700)
committerEric Biggers <ebiggers@google.com>
Mon, 12 Sep 2022 00:47:12 +0000 (19:47 -0500)
commit2d985f8c6b91b5007a16e640bb9c038c5fb2839b
tree0fc609386fbba4cabc8c4c0a99005cc7cb53807d
parent825cf206ed510c4a1758bef8957e2b039253e2e3
vfs: support STATX_DIOALIGN on block devices

Add support for STATX_DIOALIGN to block devices, so that direct I/O
alignment restrictions are exposed to userspace in a generic way.

Note that this breaks the tradition of stat operating only on the block
device node, not the block device itself.  However, it was felt that
doing this is preferable, in order to make the interface useful and
avoid needing separate interfaces for regular files and block devices.

Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Christian Brauner (Microsoft) <brauner@kernel.org>
Link: https://lore.kernel.org/r/20220827065851.135710-3-ebiggers@kernel.org
block/bdev.c
fs/stat.c
include/linux/blkdev.h