]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
null_blk: Fix zone reset all tracing
authorDamien Le Moal <damien.lemoal@wdc.com>
Thu, 29 Oct 2020 11:04:59 +0000 (20:04 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Nov 2020 10:51:58 +0000 (11:51 +0100)
commit02d74bee80e0d2b1cf2fce8eb71ce8b06daf381f
tree4085fc069d9c5fd1a9a9a35437476d7bd4293727
parent167ebb193db90c6271dd79fc77d2d04fee19bf47
null_blk: Fix zone reset all tracing

commit f9c9104288da543cd64f186f9e2fba389f415630 upstream.

In the cae of the REQ_OP_ZONE_RESET_ALL operation, the command sector is
ignored and the operation is applied to all sequential zones. For these
commands, tracing the effect of the command using the command sector to
determine the target zone is thus incorrect.

Fix null_zone_mgmt() zone condition tracing in the case of
REQ_OP_ZONE_RESET_ALL to apply tracing to all sequential zones that are
not already empty.

Fixes: 766c3297d7e1 ("null_blk: add trace in null_blk_zoned.c")
Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/null_blk_zoned.c