Message ID | 20191002234925.9190-4-vishal.l.verma@intel.com (mailing list archive) |
---|---|
State | Superseded |
Commit | 5a808119168d395594f61505fbe310fb5deda95d |
Headers | show |
Series | fixes and movability for system-ram mode | expand |
On Wed, Oct 2, 2019 at 4:49 PM Vishal Verma <vishal.l.verma@intel.com> wrote: > > The reconfig_mode_{devdax,system_ram}() function can have a positive > return status from memory online/offline operations, indicating skipped > memory blocks. Don't omit printing the device listing json in these > cases; the reconfiguration has succeeded, and its results should be > printed. > > Link: https://github.com/pmem/ndctl/issues/115 > Reported-by: Michal Biesek <michal.biesek@intel.com> > Cc: Dan Williams <dan.j.williams@intel.com> > Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> Reviewed-by: Dan Williams <dan.j.williams@intel.com>
diff --git a/daxctl/device.c b/daxctl/device.c index 4887ccf..920efc6 100644 --- a/daxctl/device.c +++ b/daxctl/device.c @@ -398,7 +398,7 @@ static int do_reconfig(struct daxctl_dev *dev, enum dev_mode mode, rc = -EINVAL; } - if (rc) + if (rc < 0) return rc; *jdevs = json_object_new_array();
The reconfig_mode_{devdax,system_ram}() function can have a positive return status from memory online/offline operations, indicating skipped memory blocks. Don't omit printing the device listing json in these cases; the reconfiguration has succeeded, and its results should be printed. Link: https://github.com/pmem/ndctl/issues/115 Reported-by: Michal Biesek <michal.biesek@intel.com> Cc: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com> --- daxctl/device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)