stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* FAILED: patch "[PATCH] null_blk: Fix zone reset all tracing" failed to apply to 5.9-stable tree
@ 2020-11-03 14:24 gregkh
  2020-11-03 23:37 ` Damien Le Moal
  2020-11-04  5:29 ` [PATCH] null_blk: Fix zone reset all tracing Damien Le Moal
  0 siblings, 2 replies; 15+ messages in thread
From: gregkh @ 2020-11-03 14:24 UTC (permalink / raw)
  To: damien.lemoal, axboe; +Cc: stable


The patch below does not apply to the 5.9-stable tree.
If someone wants it applied there, or to any other stable or longterm
tree, then please email the backport, including the original git commit
id to <stable@vger.kernel.org>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From f9c9104288da543cd64f186f9e2fba389f415630 Mon Sep 17 00:00:00 2001
From: Damien Le Moal <damien.lemoal@wdc.com>
Date: Thu, 29 Oct 2020 20:04:59 +0900
Subject: [PATCH] null_blk: Fix zone reset all tracing

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>

diff --git a/drivers/block/null_blk_zoned.c b/drivers/block/null_blk_zoned.c
index 98056c88926b..b637b16a5f54 100644
--- a/drivers/block/null_blk_zoned.c
+++ b/drivers/block/null_blk_zoned.c
@@ -475,9 +475,14 @@ static blk_status_t null_zone_mgmt(struct nullb_cmd *cmd, enum req_opf op,
 
 	switch (op) {
 	case REQ_OP_ZONE_RESET_ALL:
-		for (i = dev->zone_nr_conv; i < dev->nr_zones; i++)
-			null_reset_zone(dev, &dev->zones[i]);
-		break;
+		for (i = dev->zone_nr_conv; i < dev->nr_zones; i++) {
+			zone = &dev->zones[i];
+			if (zone->cond != BLK_ZONE_COND_EMPTY) {
+				null_reset_zone(dev, zone);
+				trace_nullb_zone_op(cmd, i, zone->cond);
+			}
+		}
+		return BLK_STS_OK;
 	case REQ_OP_ZONE_RESET:
 		ret = null_reset_zone(dev, zone);
 		break;


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-11-04 12:23 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03 14:24 FAILED: patch "[PATCH] null_blk: Fix zone reset all tracing" failed to apply to 5.9-stable tree gregkh
2020-11-03 23:37 ` Damien Le Moal
2020-11-04  5:29 ` [PATCH] null_blk: Fix zone reset all tracing Damien Le Moal
2020-11-04  9:10   ` Greg Kroah-Hartman
2020-11-04  9:15     ` Greg Kroah-Hartman
2020-11-04  9:21       ` Damien Le Moal
2020-11-04  9:27         ` Greg Kroah-Hartman
2020-11-04  9:31           ` Damien Le Moal
2020-11-04  9:51             ` Greg Kroah-Hartman
2020-11-04  9:54               ` Damien Le Moal
2020-11-04 11:27               ` [PATCH 0/3] null_blk fixes for 5.9 stable Damien Le Moal
2020-11-04 11:27                 ` [PATCH 1/3] null_blk: synchronization fix for zoned device Damien Le Moal
2020-11-04 11:27                 ` [PATCH 2/3] null_blk: Fix zone reset all tracing Damien Le Moal
2020-11-04 11:27                 ` [PATCH 3/3] null_blk: Fix locking in zoned mode Damien Le Moal
2020-11-04 12:24                 ` [PATCH 0/3] null_blk fixes for 5.9 stable Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).