* [PATCH] nvmetcli: don't remove ANA Group 1 on clear
@ 2020-03-27 7:01 Hannes Reinecke
2020-04-01 9:04 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2020-03-27 7:01 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-nvme, Sagi Grimberg, Keith Busch, Hannes Reinecke
The first ANA group is maintained by the kernel so it cannot
be deleted.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
nvmet/nvme.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/nvmet/nvme.py b/nvmet/nvme.py
index 0647ddc..fdec4ff 100644
--- a/nvmet/nvme.py
+++ b/nvmet/nvme.py
@@ -845,6 +845,11 @@ class ANAGroup(CFSNode):
a._setup_attrs(n, err_func)
+ def delete(self):
+ # ANA Group 1 is automatically created/deleted
+ if self.grpid != 1:
+ super(ANAGroup, self).delete()
+
def dump(self):
d = super(ANAGroup, self).dump()
d['grpid'] = self.grpid
--
2.16.4
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] nvmetcli: don't remove ANA Group 1 on clear
2020-03-27 7:01 [PATCH] nvmetcli: don't remove ANA Group 1 on clear Hannes Reinecke
@ 2020-04-01 9:04 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2020-04-01 9:04 UTC (permalink / raw)
To: Hannes Reinecke; +Cc: linux-nvme, Christoph Hellwig, Keith Busch, Sagi Grimberg
On Fri, Mar 27, 2020 at 08:01:34AM +0100, Hannes Reinecke wrote:
> The first ANA group is maintained by the kernel so it cannot
> be deleted.
Thanks, applied.
_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-01 9:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 7:01 [PATCH] nvmetcli: don't remove ANA Group 1 on clear Hannes Reinecke
2020-04-01 9:04 ` 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.