Re: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-29 Thread Daniel Verkamp
On 05/29/2018 10:24 AM, Christoph Hellwig wrote: > On Tue, May 29, 2018 at 04:59:05PM +, Verkamp, Daniel wrote: >>> + } else if (ctrl->nr_changed_ns == NVME_MAX_CHANGED_NAMESPACES) { >>> + ctrl->changed_ns_list[0] = cpu_to_le32(0x); >>> + } >> >> Unless I'm missing it

Re: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-29 Thread Christoph Hellwig
On Tue, May 29, 2018 at 04:59:05PM +, Verkamp, Daniel wrote: > > + } else if (ctrl->nr_changed_ns == NVME_MAX_CHANGED_NAMESPACES) { > > + ctrl->changed_ns_list[0] = cpu_to_le32(0x); > > + } > > Unless I'm missing it happening somewhere else, the list-full case that sets

RE: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-29 Thread Verkamp, Daniel
[...] > +static void nvmet_add_to_changed_ns_log(struct nvmet_ctrl *ctrl, u32 nsid) > +{ > + mutex_lock(>lock); > + if (ctrl->nr_changed_ns < NVME_MAX_CHANGED_NAMESPACES) { > + ctrl->changed_ns_list[ctrl->nr_changed_ns++] = > + cpu_to_le32(nsid); > + }

Re: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-29 Thread Christoph Hellwig
On Tue, May 29, 2018 at 10:16:31AM +0200, Johannes Thumshirn wrote: > The "full rescan" part was what I couldn't read out of the spec. The spec part is: something changed (AEN + some content in the log page) + too much changed (all-f first entry). The rest is host policy, but except for the full

Re: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-29 Thread Johannes Thumshirn
On Tue, May 29, 2018 at 10:17:12AM +0200, Christoph Hellwig wrote: > On Mon, May 28, 2018 at 08:53:42AM +0200, Johannes Thumshirn wrote: > > Reviewed-by: Johannes Thumshirn > > > > As a side note, what happens if more than 1024 Namespaces are changed > > (apart from setting the 1st element to

Re: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-29 Thread Christoph Hellwig
On Mon, May 28, 2018 at 08:53:42AM +0200, Johannes Thumshirn wrote: > Reviewed-by: Johannes Thumshirn > > As a side note, what happens if more than 1024 Namespaces are changed > (apart from setting the 1st element to 0x and zeroing out the > rest)? > > The Spec is pretty silent in this

Re: [PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-28 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn As a side note, what happens if more than 1024 Namespaces are changed (apart from setting the 1st element to 0x and zeroing out the rest)? The Spec is pretty silent in this regard. -- Johannes Thumshirn

[PATCH 08/14] nvmet: implement the changed namespaces log

2018-05-26 Thread Christoph Hellwig
Just keep a per-controller buffer of changed namespaces and copy it out in the get log page implementation. Signed-off-by: Christoph Hellwig --- drivers/nvme/target/admin-cmd.c | 23 + drivers/nvme/target/core.c | 44 ++---