]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: Validate atomic writes
authorJohn Garry <john.g.garry@oracle.com>
Tue, 5 Nov 2024 00:14:04 +0000 (16:14 -0800)
committerDarrick J. Wong <djwong@djwong.org>
Tue, 5 Nov 2024 00:22:10 +0000 (16:22 -0800)
commitf096207d327692a066954435dafb4bedbc031d9e
tree7555bf813722d62fb5e9f8fdba0cdc7fca78052e
parent6432c6e723fffd93e5cb65117ff48a3aa734e259
xfs: Validate atomic writes

Validate that an atomic write adheres to length/offset rules. Currently
we can only write a single FS block.

For an IOCB with IOCB_ATOMIC set to get as far as xfs_file_write_iter(),
FMODE_CAN_ATOMIC_WRITE will need to be set for the file; for this,
ATOMICWRITES flags would also need to be set for the inode.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: John Garry <john.g.garry@oracle.com>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
fs/xfs/xfs_file.c