selftests: ublk: fix write cache implementation
authorMing Lei <ming.lei@redhat.com>
Fri, 21 Mar 2025 00:47:58 +0000 (08:47 +0800)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Mar 2025 02:01:03 +0000 (20:01 -0600)
commit96af5af47b5407972689929543c73a39b477c8ba
treef0ff7f771d05e4846d09c4bad55a91981a51de74
parentbeb31982ad6b77249bf8535e71da2629af92b458
selftests: ublk: fix write cache implementation

For loop target, write cache isn't enabled, and each write isn't be
marked as DSYNC too.

Fix it by enabling write cache, meantime fix FLUSH implementation
by not taking LBA range into account, and there isn't such info
for FLUSH command.

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250321004758.152572-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
tools/testing/selftests/ublk/file_backed.c