Re: [PATCH v3 1/3] resource: Use list_head to link resource sibling

2018-04-10 Thread Baoquan He
Hi Rob, Thanks a lot for looking into this and involve Nico to this thread! On 04/09/18 at 09:49am, Rob Herring wrote: > +Nico who has been working on tinification of the kernel. > > On Mon, Apr 9, 2018 at 4:08 AM, Baoquan He wrote: > > The struct resource uses singly linked

Re: [PATCH] ndctl: fix libdaxctl memory leak

2018-04-10 Thread Dan Williams
On Tue, Apr 10, 2018 at 9:56 AM, Dave Jiang wrote: > When daxctl_unref is releasing the context, we should make sure that the > regions and devices are also being released. > > Signed-off-by: Dave Jiang > --- > daxctl/lib/libdaxctl.c |7 +++ >

[PATCH v2] ndctl: fix libdaxctl memory leak

2018-04-10 Thread Dave Jiang
When daxctl_unref is releasing the context, we should make sure that the regions and devices are also being released. free_region() will free all the devices under the region. Signed-off-by: Dave Jiang --- v2: Use list_for_each_safe() for region removal. (Dan)

Re: [PATCH] ndctl: fix daxctl list memory leak

2018-04-10 Thread Dave Jiang
On 04/09/2018 07:39 PM, Dan Williams wrote: > On Mon, Apr 9, 2018 at 5:13 PM, Dave Jiang wrote: >> daxctl list is not calling daxctl_unref() when executed succesfully. At the >> same >> time, daxctl_region_unref() is not being called when daxctl_unref() executes. >>

[ndctl PATCH v2] ndctl: complete move to "fsdax" and "devdax"

2018-04-10 Thread Ross Zwisler
Add on to the work started by: commit ebb4fb605e68 ("ndctl, create-namespace: introduce "fsdax" and "devdax" modes") and change some more user visible places to use "fsdax" and "devdax" modes instead of "memory" and "dax", respectively. Having multiple terms for the same mode is confusing for

Re: [PATCH] ndctl: fix libdaxctl memory leak

2018-04-10 Thread Dave Jiang
On 04/10/2018 10:01 AM, Dan Williams wrote: > On Tue, Apr 10, 2018 at 9:56 AM, Dave Jiang wrote: >> When daxctl_unref is releasing the context, we should make sure that the >> regions and devices are also being released. >> >> Signed-off-by: Dave Jiang

Re: [PATCH v2] ndctl: fix libdaxctl memory leak

2018-04-10 Thread Dave Jiang
On 04/10/2018 10:38 AM, Plewa, Lukasz wrote: > On Tue, Apr 10, 2018 at 7:17 PM, Dave Jiang wrote: >> When daxctl_unref is releasing the context, we should make sure that the >> regions and devices are also being released. free_region() will free all the >> devices under

Re: [PATCH] ndctl: fix daxctl list memory leak

2018-04-10 Thread Dan Williams
On Tue, Apr 10, 2018 at 8:59 AM, Dave Jiang wrote: > > > On 04/09/2018 07:39 PM, Dan Williams wrote: >> On Mon, Apr 9, 2018 at 5:13 PM, Dave Jiang wrote: >>> daxctl list is not calling daxctl_unref() when executed succesfully. At the >>> same >>>

[PATCH v2] ndctl: add support in libndctl to provide deep flush

2018-04-10 Thread Dave Jiang
Providing an API call in libndctl to support accessing the region deep_flush in sysfs. Signed-off-by: Dave Jiang --- v2: Cover case where deep_flush doesn't exist, i.e. memmap=nn!ss. (Dan) ndctl/lib/libndctl.c | 35 +++

[PATCH 5/5] tools/testing/nvdimm: enable labels for nfit_test.1 dimms

2018-04-10 Thread Dan Williams
Enable test cases for the kernel's fallback to label-less mode. Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/nfit.c |3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/nvdimm/test/nfit.c b/tools/testing/nvdimm/test/nfit.c index

[PATCH 4/5] tools/testing/nvdimm: fix missing newline in nfit_test_dimm 'handle' attribute

2018-04-10 Thread Dan Williams
Sysfs userspace tooling generally expects the kernel to emit a newlines when reading sysfs attributes. Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/nfit.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/5] tools/testing/nvdimm: support nfit_test_dimm attributes under nfit_test.1

2018-04-10 Thread Dan Williams
The nfit_test.1 bus provides a pmem topology without blk-aperture enabling, so it presents different failure modes for label space handling. Allow custom DSM command error injection. Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/nfit.c | 43

[PATCH 0/5] libnvdimm: fix locked status detection

2018-04-10 Thread Dan Williams
The new ACPI _LSx methods moved the 'dimm locked' error status from the result of ND_CMD_GET_CONFIG_SIZE to an error status result of ND_CMD_GET_CONFIG_DATA. Error code translation prevents the proper error code from making it back to the 'nd_dimm' driver. Fix the error code propagation and add

[PATCH 2/5] tools/testing/nvdimm: allow custom error code injection

2018-04-10 Thread Dan Williams
Given that libnvdimm driver stack takes specific actions on DIMM command error codes like -EACCES, provide a facility to inject custom failures. Signed-off-by: Dan Williams --- tools/testing/nvdimm/test/nfit.c | 38 +- 1 file

[PATCH 1/5] libnvdimm, dimm: handle EACCES failures from label reads

2018-04-10 Thread Dan Williams
The new support for the standard _LSR and _LSW methods neglected to also update the nvdimm_init_config_data() and nvdimm_set_config_data() to return the translated error code from failed commands. This precision is necessary because the locked status that was previously returned on

Re: [PATCH v2] ndctl: add support in libndctl to provide deep flush

2018-04-10 Thread Dan Williams
On Tue, Apr 10, 2018 at 3:06 PM, Dave Jiang wrote: > Providing an API call in libndctl to support accessing the region deep_flush > in sysfs. > > Signed-off-by: Dave Jiang > --- > > v2: Cover case where deep_flush doesn't exist, i.e. memmap=nn!ss.

[PATCH v3] ndctl: add support in libndctl to provide deep flush

2018-04-10 Thread Dave Jiang
Providing an API call in libndctl to support accessing the region deep_flush in sysfs. Signed-off-by: Dave Jiang --- v3: - Add "\n" to sysfs write. (Dan) - add O_CLOEXEC to open() call for sysfs. (Dan) v2: Cover case where deep_flush doesn't exist, i.e. memmap=nn!ss.

[PATCH v2] libnvdimm: fix NULL ptr access in nvdimm_flush when region is disabled

2018-04-10 Thread Dave Jiang
When a region is disabled, there is no driver attached. Therefore dev->driverdata is NULL. An attempt to write to regionN/deep_flush via sysfs would cause a NULL pointer dereference. Bail when dev->driver is NULL to protect this scenario. Fix: ab630891ce0eb(libnvdimm, region: sysfs trigger for

Re: [PATCH] libnvdimm: fix NULL ptr access in nvdimm_flush when region is disabled

2018-04-10 Thread Dan Williams
On Tue, Apr 10, 2018 at 1:42 PM, Dave Jiang wrote: > When a region is disabled, there is no driver attached. Therefore > dev->driverdata is NULL. An attempt to write to regionN/deep_flush via sysfs > would cause a NULL pointer dereference. Bail when dev->driver is NULL to >

[PATCH] ndctl: add support in libndctl to provide deep flush

2018-04-10 Thread Dave Jiang
Providing an API call in libndctl to support accessing the region deep_flush in sysfs. Signed-off-by: Dave Jiang --- 0 files changed diff --git a/ndctl/lib/libndctl.c b/ndctl/lib/libndctl.c index 580a450e..fb4dca73 100644 --- a/ndctl/lib/libndctl.c +++

[PATCH] libnvdimm: fix NULL ptr access in nvdimm_flush when region is disabled

2018-04-10 Thread Dave Jiang
When a region is disabled, there is no driver attached. Therefore dev->driverdata is NULL. An attempt to write to regionN/deep_flush via sysfs would cause a NULL pointer dereference. Bail when dev->driver is NULL to protect this scenario. Fix: ab630891ce0eb(libnvdimm, region: sysfs trigger for

Re: [PATCH v3] ndctl: add support in libndctl to provide deep flush

2018-04-10 Thread Dan Williams
On Tue, Apr 10, 2018 at 4:35 PM, Dave Jiang wrote: > Providing an API call in libndctl to support accessing the region deep_flush > in sysfs. > > Signed-off-by: Dave Jiang > --- > > v3: > - Add "\n" to sysfs write. (Dan) > - add O_CLOEXEC to open()

Returned mail: Data format error

2018-04-10 Thread Mail Administrator
The original message was received at Wed, 11 Apr 2018 11:29:58 +0800 from lists.01.org [3.200.103.101] - The following addresses had permanent fatal errors - ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org

Re: [ndctl PATCH v2] ndctl: complete move to "fsdax" and "devdax"

2018-04-10 Thread Verma, Vishal L
On Tue, 2018-04-10 at 11:09 -0600, Ross Zwisler wrote: > Add on to the work started by: > > commit ebb4fb605e68 ("ndctl, create-namespace: introduce "fsdax" and > "devdax" modes") > > and change some more user visible places to use "fsdax" and "devdax" > modes > instead of "memory" and "dax",

[PATCH v4] ndctl: add support in libndctl to provide deep flush

2018-04-10 Thread Dave Jiang
Providing an API call in libndctl to support accessing the region deep_flush in sysfs. Signed-off-by: Dave Jiang --- v4: Make setup of deep_flush open not interfere with add_region. (Dan) v3: - Add "\n" to sysfs write. (Dan) - add O_CLOEXEC to open() call for sysfs. (Dan)