]> www.infradead.org Git - users/hch/xfstests-dev.git/commit
fsx: add support for RWF_DONTCACHE
authorJens Axboe <axboe@kernel.dk>
Tue, 7 Jan 2025 16:05:15 +0000 (09:05 -0700)
committerZorro Lang <zlang@kernel.org>
Fri, 10 Jan 2025 04:44:03 +0000 (12:44 +0800)
commitd6b9d8eff0767386b95bfd6b0c3dec2ae952a4b9
tree0ecdaaecea4822487e0d84ffb8225eb69b9ef067
parent11ae4f7d0e88d2d2053800e1e9947acfa48206b1
fsx: add support for RWF_DONTCACHE

Using RWF_DONTCACHE tells the kernel that any page cache instantiated
by this operation should get pruned once the operation completes. If
data is in cache prior to the operation it will remain there.

Add ops for testing both the read and write side of this. At startup,
kernel support for this feature is probed. If support isn't available,
uncached/dontcache IO is performed as regular buffered IO. If -Z is
used to turn on O_DIRECT, then uncached/dontcache IO isn't performed.
Defaults to on if available, and adds a -T parameter to turn it off.

See the kernel posting adding support:

https://lore.kernel.org/linux-fsdevel/20241220154831.1086649-1-axboe@kernel.dk/

Signed-off-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
ltp/fsx.c