Re: [PATCH] libnvdimm, namespace: do not delete namespace-id 0

From: Johannes Thumshirn
Date: Thu Feb 02 2017 - 03:01:15 EST


On Wed, Feb 01, 2017 at 10:35:21AM -0800, Dan Williams wrote:
> Given that the naming of pmem devices changes from the pmemX form to the
> pmemX.Y form when namespace id is greater than 0, arrange for namespaces
> with id-0 to be exempt from deletion. Otherwise a simple reconfiguration
> of an existing namespace to a new mode results in a name change of the
> resulting block device:
>
> # ndctl list --namespace=namespace1.0
> {
> "dev":"namespace1.0",
> "mode":"raw",
> "size":2147483648,
> "uuid":"3dadf3dc-89b9-4b24-b20e-abc8a4707ce3",
> "blockdev":"pmem1"
> }
>
> # ndctl create-namespace --reconfig=namespace1.0 --mode=memory --force
> {
> "dev":"namespace1.1",
> "mode":"memory",
> "size":2111832064,
> "uuid":"7b4a6341-7318-4219-a02c-fb57c0bbf613",
> "blockdev":"pmem1.1"
> }
>
> This change does require tooling changes to explicitly look for
> namespaceX.0 if the seed has already advanced to another namespace.
>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Fixes: 98a29c39dc68 ("libnvdimm, namespace: allow creation of multiple pmem-namespaces per region")
> Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx>
> ---

Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn@xxxxxxx>

--
Johannes Thumshirn Storage
jthumshirn@xxxxxxx +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850