]> www.infradead.org Git - users/hch/misc.git/commit
xfs: support T10 protection information
authorChristoph Hellwig <hch@lst.de>
Fri, 31 Jan 2025 16:26:23 +0000 (17:26 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2025 09:42:17 +0000 (10:42 +0100)
commit5b8b054ee57196ffbbd33ca472328041d4485762
treeadc5c5f5fc63007ef164a6c68226305bfbb7b758
parent3084f2c7f0c147387ea2af6aa9112514b260c809
xfs: support T10 protection information

Add support for generating / verifying protection information in the
file system.  This is done by hooking into the bio submission in
iomap and then using the generic PI helpers.  Compared to just using
the block layer auto PI this extends the protection envelope and also
prepares for eventually passing through PI from userspace at least
for direct I/O.

Right now this is still pretty hacky, e.g. the single PI buffer can
get pretty gigantic and has no mempool backing it.  The deferring of
I/O completions is done unconditionally instead only when needed,
and we assume the device can actually handle these huge segments.
The latter should be fixed by doing proper splitting based on metadata
limits in the block layer, but the rest needs to be addressed here.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/Makefile
fs/xfs/xfs_aops.c
fs/xfs/xfs_aops.h
fs/xfs/xfs_data_csum.c [new file with mode: 0644]
fs/xfs/xfs_data_csum.h [new file with mode: 0644]
fs/xfs/xfs_file.c
fs/xfs/xfs_inode.h