* [PATCH] nvmetcli: reservation configuration support
@ 2024-10-08 8:08 Guixin Liu
2024-10-11 10:54 ` Guixin Liu
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Guixin Liu @ 2024-10-08 8:08 UTC (permalink / raw)
To: hch, sagi, kch, d.bogdanov; +Cc: linux-nvme
Add support for reservation configuration.
Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
---
nvmet/nvme.py | 2 +-
nvmetcli | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/nvmet/nvme.py b/nvmet/nvme.py
index 59efdb5..20b3cca 100644
--- a/nvmet/nvme.py
+++ b/nvmet/nvme.py
@@ -567,7 +567,7 @@ class Namespace(CFSNode):
if nsid < 1 or nsid > self.MAX_NSID:
raise CFSError("NSID must be 1 to %d" % self.MAX_NSID)
- self.attr_groups = ['device', 'ana']
+ self.attr_groups = ['device', 'ana', 'resv']
self._subsystem = subsystem
self._nsid = nsid
self._path = "%s/namespaces/%d" % (self.subsystem.path, self.nsid)
diff --git a/nvmetcli b/nvmetcli
index d949891..6e5348f 100755
--- a/nvmetcli
+++ b/nvmetcli
@@ -283,6 +283,8 @@ class UINamespaceNode(UINode):
info.append("nguid=" + ns_nguid)
if self.cfnode.grpid != 0:
info.append("grpid=" + str(self.cfnode.grpid))
+ resv_enable = self.cfnode.get_attr("resv", "enable")
+ info.append("resv_enable=" + str(resv_enable))
info.append("enabled" if self.cfnode.get_enable() else "disabled")
ns_enabled = self.cfnode.get_enable()
return (", ".join(info), True if ns_enabled == 1 else ns_enabled)
--
2.43.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] nvmetcli: reservation configuration support
2024-10-08 8:08 [PATCH] nvmetcli: reservation configuration support Guixin Liu
@ 2024-10-11 10:54 ` Guixin Liu
2024-10-15 8:15 ` Guixin Liu
2024-10-20 23:48 ` Sagi Grimberg
2 siblings, 0 replies; 5+ messages in thread
From: Guixin Liu @ 2024-10-11 10:54 UTC (permalink / raw)
To: hch, sagi, kch, d.bogdanov; +Cc: linux-nvme
gentel ping..
Best Regards,
Guixin Liu
在 2024/10/8 16:08, Guixin Liu 写道:
> Add support for reservation configuration.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
> nvmet/nvme.py | 2 +-
> nvmetcli | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/nvmet/nvme.py b/nvmet/nvme.py
> index 59efdb5..20b3cca 100644
> --- a/nvmet/nvme.py
> +++ b/nvmet/nvme.py
> @@ -567,7 +567,7 @@ class Namespace(CFSNode):
> if nsid < 1 or nsid > self.MAX_NSID:
> raise CFSError("NSID must be 1 to %d" % self.MAX_NSID)
>
> - self.attr_groups = ['device', 'ana']
> + self.attr_groups = ['device', 'ana', 'resv']
> self._subsystem = subsystem
> self._nsid = nsid
> self._path = "%s/namespaces/%d" % (self.subsystem.path, self.nsid)
> diff --git a/nvmetcli b/nvmetcli
> index d949891..6e5348f 100755
> --- a/nvmetcli
> +++ b/nvmetcli
> @@ -283,6 +283,8 @@ class UINamespaceNode(UINode):
> info.append("nguid=" + ns_nguid)
> if self.cfnode.grpid != 0:
> info.append("grpid=" + str(self.cfnode.grpid))
> + resv_enable = self.cfnode.get_attr("resv", "enable")
> + info.append("resv_enable=" + str(resv_enable))
> info.append("enabled" if self.cfnode.get_enable() else "disabled")
> ns_enabled = self.cfnode.get_enable()
> return (", ".join(info), True if ns_enabled == 1 else ns_enabled)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] nvmetcli: reservation configuration support
2024-10-08 8:08 [PATCH] nvmetcli: reservation configuration support Guixin Liu
2024-10-11 10:54 ` Guixin Liu
@ 2024-10-15 8:15 ` Guixin Liu
2024-10-15 8:17 ` Christoph Hellwig
2024-10-20 23:48 ` Sagi Grimberg
2 siblings, 1 reply; 5+ messages in thread
From: Guixin Liu @ 2024-10-15 8:15 UTC (permalink / raw)
To: hch, sagi, kch, d.bogdanov; +Cc: linux-nvme
Hi Christoph,
Could you please take a look at this nvmetcli patch?
Best Regards,
Guixin Liu
在 2024/10/8 16:08, Guixin Liu 写道:
> Add support for reservation configuration.
>
> Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
> ---
> nvmet/nvme.py | 2 +-
> nvmetcli | 2 ++
> 2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/nvmet/nvme.py b/nvmet/nvme.py
> index 59efdb5..20b3cca 100644
> --- a/nvmet/nvme.py
> +++ b/nvmet/nvme.py
> @@ -567,7 +567,7 @@ class Namespace(CFSNode):
> if nsid < 1 or nsid > self.MAX_NSID:
> raise CFSError("NSID must be 1 to %d" % self.MAX_NSID)
>
> - self.attr_groups = ['device', 'ana']
> + self.attr_groups = ['device', 'ana', 'resv']
> self._subsystem = subsystem
> self._nsid = nsid
> self._path = "%s/namespaces/%d" % (self.subsystem.path, self.nsid)
> diff --git a/nvmetcli b/nvmetcli
> index d949891..6e5348f 100755
> --- a/nvmetcli
> +++ b/nvmetcli
> @@ -283,6 +283,8 @@ class UINamespaceNode(UINode):
> info.append("nguid=" + ns_nguid)
> if self.cfnode.grpid != 0:
> info.append("grpid=" + str(self.cfnode.grpid))
> + resv_enable = self.cfnode.get_attr("resv", "enable")
> + info.append("resv_enable=" + str(resv_enable))
> info.append("enabled" if self.cfnode.get_enable() else "disabled")
> ns_enabled = self.cfnode.get_enable()
> return (", ".join(info), True if ns_enabled == 1 else ns_enabled)
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH] nvmetcli: reservation configuration support
2024-10-08 8:08 [PATCH] nvmetcli: reservation configuration support Guixin Liu
2024-10-11 10:54 ` Guixin Liu
2024-10-15 8:15 ` Guixin Liu
@ 2024-10-20 23:48 ` Sagi Grimberg
2 siblings, 0 replies; 5+ messages in thread
From: Sagi Grimberg @ 2024-10-20 23:48 UTC (permalink / raw)
To: Guixin Liu, hch, kch, d.bogdanov; +Cc: linux-nvme
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-20 23:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-08 8:08 [PATCH] nvmetcli: reservation configuration support Guixin Liu
2024-10-11 10:54 ` Guixin Liu
2024-10-15 8:15 ` Guixin Liu
2024-10-15 8:17 ` Christoph Hellwig
2024-10-20 23:48 ` Sagi Grimberg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox