<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/nvdimm/namespace_devs.c, branch linux-5.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-5.1.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2019-05-22T05:39:58Z</updated>
<entry>
<title>libnvdimm/namespace: Fix label tracking error</title>
<updated>2019-05-22T05:39:58Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2019-05-01T04:51:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=550f5ba19cbd9217cb4d9dfc0e3ff37aeb1d4274'/>
<id>urn:sha1:550f5ba19cbd9217cb4d9dfc0e3ff37aeb1d4274</id>
<content type='text'>
commit c4703ce11c23423d4b46e3d59aef7979814fd608 upstream.

Users have reported intermittent occurrences of DIMM initialization
failures due to duplicate allocations of address capacity detected in
the labels, or errors of the form below, both have the same root cause.

    nd namespace1.4: failed to track label: 0
    WARNING: CPU: 17 PID: 1381 at drivers/nvdimm/label.c:863

    RIP: 0010:__pmem_label_update+0x56c/0x590 [libnvdimm]
    Call Trace:
     ? nd_pmem_namespace_label_update+0xd6/0x160 [libnvdimm]
     nd_pmem_namespace_label_update+0xd6/0x160 [libnvdimm]
     uuid_store+0x17e/0x190 [libnvdimm]
     kernfs_fop_write+0xf0/0x1a0
     vfs_write+0xb7/0x1b0
     ksys_write+0x57/0xd0
     do_syscall_64+0x60/0x210

Unfortunately those reports were typically with a busy parallel
namespace creation / destruction loop making it difficult to see the
components of the bug. However, Jane provided a simple reproducer using
the work-in-progress sub-section implementation.

When ndctl is reconfiguring a namespace it may take an existing defunct
/ disabled namespace and reconfigure it with a new uuid and other
parameters. Critically namespace_update_uuid() takes existing address
resources and renames them for the new namespace to use / reconfigure as
it sees fit. The bug is that this rename only happens in the resource
tracking tree. Existing labels with the old uuid are not reaped leading
to a scenario where multiple active labels reference the same span of
address range.

Teach namespace_update_uuid() to flag any references to the old uuid for
reaping at the next label update attempt.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: bf9bccc14c05 ("libnvdimm: pmem label sets and namespace instantiation")
Link: https://github.com/pmem/ndctl/issues/91
Reported-by: Jane Chu &lt;jane.chu@oracle.com&gt;
Reported-by: Jeff Moyer &lt;jmoyer@redhat.com&gt;
Reported-by: Erwin Tsaur &lt;erwin.tsaur@oracle.com&gt;
Cc: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>libnvdimm/namespace: Fix a potential NULL pointer dereference</title>
<updated>2019-03-22T23:19:54Z</updated>
<author>
<name>Kangjie Lu</name>
<email>kjlu@umn.edu</email>
</author>
<published>2019-03-12T08:20:34Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55c1fc0af29a6c1b92f217b7eb7581a882e0c07c'/>
<id>urn:sha1:55c1fc0af29a6c1b92f217b7eb7581a882e0c07c</id>
<content type='text'>
In case kmemdup fails, the fix goes to blk_err to avoid NULL
pointer dereference.

Signed-off-by: Kangjie Lu &lt;kjlu@umn.edu&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-5.1/libnvdimm-start-pad' into libnvdimm-for-next</title>
<updated>2019-03-11T19:20:30Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2019-03-11T19:20:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6fd96ff557963de8e62842a0dc360a6e3610d2bb'/>
<id>urn:sha1:6fd96ff557963de8e62842a0dc360a6e3610d2bb</id>
<content type='text'>
Merge the initial lead-in cleanups and fixes that resulted from the
effort to resolve bugs in the section-alignment padding implementation
in the nvdimm core. The back half of this topic is abandoned in favor of
implementing sub-section hotplug support.
</content>
</entry>
<entry>
<title>libnvdimm/namespace: Clean up holder_class_store()</title>
<updated>2019-03-04T20:26:41Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2019-03-04T20:14:04Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=075c3fdd56ac2e077f928353daf786341bbb6a52'/>
<id>urn:sha1:075c3fdd56ac2e077f928353daf786341bbb6a52</id>
<content type='text'>
Use sysfs_streq() in place of open-coded strcmp()'s that check for an
optional "\n" at the end of the input.

Reviewed-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm/pmem: Honor force_raw for legacy pmem regions</title>
<updated>2019-02-12T18:48:14Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2019-01-25T01:33:06Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fa7d2e639cd90442d868dfc6ca1d4cc9d8bf206e'/>
<id>urn:sha1:fa7d2e639cd90442d868dfc6ca1d4cc9d8bf206e</id>
<content type='text'>
For recovery, where non-dax access is needed to a given physical address
range, and testing, allow the 'force_raw' attribute to override the
default establishment of a dev_pagemap.

Otherwise without this capability it is possible to end up with a
namespace that can not be activated due to corrupted info-block, and one
that can not be repaired due to a section collision.

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: 004f1afbe199 ("libnvdimm, pmem: direct map legacy pmem by default")
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm/dimm: Add a no-BLK quirk based on NVDIMM family</title>
<updated>2019-02-03T00:35:26Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2019-02-03T00:35:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d5d30d5a5c60628de5e77e3f292a8f9012d51350'/>
<id>urn:sha1:d5d30d5a5c60628de5e77e3f292a8f9012d51350</id>
<content type='text'>
As Dexuan reports the NVDIMM_FAMILY_HYPERV platform is incompatible with
the existing Linux namespace implementation because it uses
NSLABEL_FLAG_LOCAL for x1-width PMEM interleave sets. Quirk it as an
platform / DIMM that does not provide BLK-aperture access. Allow the
libnvdimm core to assume no potential for aliasing. In case other
implementations make the same mistake, provide a "noblk" module
parameter to force-enable the quirk.

Link: https://lkml.kernel.org/r/PU1P153MB0169977604493B82B662A01CBF920@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM
Reported-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Tested-by: Dexuan Cui &lt;decui@microsoft.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm, namespace: Replace kmemdup() with kstrndup()</title>
<updated>2018-12-10T23:58:46Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2018-06-11T13:47:21Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3d9cbe37c16ffd19eeab6b49a0311bbb999627d8'/>
<id>urn:sha1:3d9cbe37c16ffd19eeab6b49a0311bbb999627d8</id>
<content type='text'>
kstrndup() takes care of '\0' terminator for the strings.

Use it here instead of kmemdup() + explicit terminating the input string.

Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm, namespace: Drop the repeat assignment for variable dev-&gt;parent</title>
<updated>2018-10-02T04:27:09Z</updated>
<author>
<name>GuangZhe Fu</name>
<email>fugz1@lenovo.com</email>
</author>
<published>2018-10-02T03:35:00Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=55781b66936ee4e15cdd6d591b26662ab9d2d847'/>
<id>urn:sha1:55781b66936ee4e15cdd6d591b26662ab9d2d847</id>
<content type='text'>
The variable dev-parent is assigned twice with the same &amp;nd_region-&gt;dev.
I think we could drop the second one.

Signed-off-by: GuangZhe Fu &lt;fugz1@lenovo.com&gt;
Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm: Use max contiguous area for namespace size</title>
<updated>2018-07-25T21:11:09Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2018-07-24T21:07:57Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=12e3129e29b406c41bc89231092a20d79dbf802c'/>
<id>urn:sha1:12e3129e29b406c41bc89231092a20d79dbf802c</id>
<content type='text'>
This patch will find the max contiguous area to determine the largest
pmem namespace size that can be created. If the requested size exceeds
the largest available, ENOSPC error will be returned.

This fixes the allocation underrun error and wrong error return code
that have otherwise been observed as the following kernel warning:

  WARNING: CPU: &lt;CPU&gt; PID: &lt;PID&gt; at drivers/nvdimm/namespace_devs.c:913 size_store

Fixes: a1f3e4d6a0c3 ("libnvdimm, region: update nd_region_available_dpa() for multi-pmem support")
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Vishal Verma &lt;vishal.l.verma@intel.com&gt;
Signed-off-by: Dave Jiang &lt;dave.jiang@intel.com&gt;
</content>
</entry>
<entry>
<title>libnvdimm: Introduce locked DIMM capacity support</title>
<updated>2018-07-14T17:27:00Z</updated>
<author>
<name>Dan Williams</name>
<email>dan.j.williams@intel.com</email>
</author>
<published>2018-06-13T16:08:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=08e6b3c6e3a054f566367740c94b8c1d18e52056'/>
<id>urn:sha1:08e6b3c6e3a054f566367740c94b8c1d18e52056</id>
<content type='text'>
When a DIMM is locked its namespace label area may not be. Introduce the
distinction of locked namespaces to allow namespace enumeration while
the capacity is locked.

Signed-off-by: Dan Williams &lt;dan.j.williams@intel.com&gt;
</content>
</entry>
</feed>
