zbd: Fix read with verify
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 8 May 2020 07:56:41 +0000 (16:56 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 May 2020 13:41:36 +0000 (07:41 -0600)
commitecc9e8f753028d91ce365ca2164e3e8e2257e966
tree0ee9b9232053cec3cf3befcf34995e8e582793d8
parentc8e28d8f0c75d14c41d8ae9d0598d16d24f704a6
zbd: Fix read with verify

For a read only workload with verify option enabled, executing
zbd_replay_write_order() will ignore target zones that are full and try
to open another zone. This either triggers an assert if max_open_zones
is unused, or result in verify failing. Fix this by executing
zbd_replay_write_order() only for writing workloads. This fix is also
consistent with the fact that zoned devices do not implicitly open
zones for read operations.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
zbd.c