]> git.ipfire.org Git - thirdparty/linux.git/commit
zloop: simplify checks for writes to sequential zones
authorDamien Le Moal <dlemoal@kernel.org>
Sat, 15 Nov 2025 12:15:53 +0000 (21:15 +0900)
committerJens Axboe <axboe@kernel.dk>
Mon, 17 Nov 2025 16:40:09 +0000 (09:40 -0700)
commite3a96ca90462f80d9f58a1236514823334deef39
treee7da91cca5d089f73e5d14cb91a7d9a36cf5a394
parentcf28f6f923cb1dd2765b5c3d7697bb4dcf2096a0
zloop: simplify checks for writes to sequential zones

The function zloop_rw() already checks early that a request is fully
contained within the target zone. So this check does not need to be done
again for regular writes to sequential zones. Furthermore, since zone
append operations are always directed to the zone write pointer
location, we do not need to check for their alignment to that value
after setting it. So turn the "if" checking the write pointer alignment
into an "else if".

While at it, improve the comment describing the write pointer
modification and how this value is corrected in case of error.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/zloop.c