All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE
@ 2024-08-19 12:27 Hannes Reinecke
  2024-08-19 13:18 ` Sagi Grimberg
  2024-08-22  6:56 ` Christoph Hellwig
  0 siblings, 2 replies; 5+ messages in thread
From: Hannes Reinecke @ 2024-08-19 12:27 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Keith Busch, Sagi Grimberg, linux-nvme, Hannes Reinecke

NVME_NSHEAD_DISK_LIVE is a flag for 'struct nvme_nshead', not
'struct nvme_ns'.

Fixes: 11384580e332 ("nvme-multipath: add error handling support for add_disk()")

Signed-off-by: Hannes Reinecke <hare@kernel.org>
---
 drivers/nvme/host/multipath.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index 91d9eb3c22ef..c9d23b1b8efc 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -646,7 +646,7 @@ static void nvme_mpath_set_live(struct nvme_ns *ns)
 		rc = device_add_disk(&head->subsys->dev, head->disk,
 				     nvme_ns_attr_groups);
 		if (rc) {
-			clear_bit(NVME_NSHEAD_DISK_LIVE, &ns->flags);
+			clear_bit(NVME_NSHEAD_DISK_LIVE, &head->flags);
 			return;
 		}
 		nvme_add_ns_head_cdev(head);
-- 
2.35.3



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

* Re: [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE
  2024-08-19 12:27 [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE Hannes Reinecke
@ 2024-08-19 13:18 ` Sagi Grimberg
  2024-08-19 13:50   ` Hannes Reinecke
  2024-08-22  6:56 ` Christoph Hellwig
  1 sibling, 1 reply; 5+ messages in thread
From: Sagi Grimberg @ 2024-08-19 13:18 UTC (permalink / raw)
  To: Hannes Reinecke, Christoph Hellwig; +Cc: Keith Busch, linux-nvme




On 19/08/2024 15:27, Hannes Reinecke wrote:
> NVME_NSHEAD_DISK_LIVE is a flag for 'struct nvme_nshead', not
> 'struct nvme_ns'.

Hannes, what is the phenomenon here? Is anything leaked or functionally
broken?

The patch looks good, but please explain if this is caught from code 
inspection
or a real issue that surfaced.

For the patch itself,
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>


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

* Re: [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE
  2024-08-19 13:18 ` Sagi Grimberg
@ 2024-08-19 13:50   ` Hannes Reinecke
  2024-08-19 14:23     ` Sagi Grimberg
  0 siblings, 1 reply; 5+ messages in thread
From: Hannes Reinecke @ 2024-08-19 13:50 UTC (permalink / raw)
  To: Sagi Grimberg, Hannes Reinecke, Christoph Hellwig; +Cc: Keith Busch, linux-nvme

On 8/19/24 15:18, Sagi Grimberg wrote:
> 
> 
> 
> On 19/08/2024 15:27, Hannes Reinecke wrote:
>> NVME_NSHEAD_DISK_LIVE is a flag for 'struct nvme_nshead', not
>> 'struct nvme_ns'.
> 
> Hannes, what is the phenomenon here? Is anything leaked or functionally
> broken?
> 
> The patch looks good, but please explain if this is caught from code 
> inspection
> or a real issue that surfaced.
> 
> For the patch itself,
> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>

We've seen the issue popping up during repeated map/unmap operations
with reusing NSIDs; occasionally we would end up with stale multipath
namespaces and non-existing generic devices.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich



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

* Re: [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE
  2024-08-19 13:50   ` Hannes Reinecke
@ 2024-08-19 14:23     ` Sagi Grimberg
  0 siblings, 0 replies; 5+ messages in thread
From: Sagi Grimberg @ 2024-08-19 14:23 UTC (permalink / raw)
  To: Hannes Reinecke, Hannes Reinecke, Christoph Hellwig
  Cc: Keith Busch, linux-nvme




On 19/08/2024 16:50, Hannes Reinecke wrote:
> On 8/19/24 15:18, Sagi Grimberg wrote:
>>
>>
>>
>> On 19/08/2024 15:27, Hannes Reinecke wrote:
>>> NVME_NSHEAD_DISK_LIVE is a flag for 'struct nvme_nshead', not
>>> 'struct nvme_ns'.
>>
>> Hannes, what is the phenomenon here? Is anything leaked or functionally
>> broken?
>>
>> The patch looks good, but please explain if this is caught from code 
>> inspection
>> or a real issue that surfaced.
>>
>> For the patch itself,
>> Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
>
> We've seen the issue popping up during repeated map/unmap operations
> with reusing NSIDs; occasionally we would end up with stale multipath
> namespaces and non-existing generic devices.

Great, please reword the change log to explain _what_ is fixed in the patch
title and how you fix it in the patch body.


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

* Re: [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE
  2024-08-19 12:27 [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE Hannes Reinecke
  2024-08-19 13:18 ` Sagi Grimberg
@ 2024-08-22  6:56 ` Christoph Hellwig
  1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2024-08-22  6:56 UTC (permalink / raw)
  To: Hannes Reinecke; +Cc: Christoph Hellwig, Keith Busch, Sagi Grimberg, linux-nvme

The change itself looks good, but as Sagi already said please write a
proper commit message.



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

end of thread, other threads:[~2024-08-22  6:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-19 12:27 [PATCH] nvme-multipath: fix typo clearing NVME_NSHEAD_DISK_LIVE Hannes Reinecke
2024-08-19 13:18 ` Sagi Grimberg
2024-08-19 13:50   ` Hannes Reinecke
2024-08-19 14:23     ` Sagi Grimberg
2024-08-22  6:56 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.