• Dan Williams's avatar
    libnvdimm, namespace: do not delete namespace-id 0 · 9d032f42
    Dan Williams authored
    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
        # ndctl create-namespace --reconfig=namespace1.0 --mode=memory --force
    This change does require tooling changes to explicitly look for
    namespaceX.0 if the seed has already advanced to another namespace.
    Cc: <stable@vger.kernel.org>
    Fixes: 98a29c39
     ("libnvdimm, namespace: allow creation of multiple pmem-namespaces per region")
    Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
    Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>