[RFC PATCH] ndctl, list: add ndctl_filter_opts for sharing filter

2018-02-21 Thread QI Fuli
I wrote a patch for refactoring cmd_list(). It would be appreciated if you could check it. This patch refactors the filter in cmd_list() into ndctl_filter_opts object with callback functions. So that the filter used for matching a given object can be shared between "list" and "monitor".

Re: [PATCH] loop: Fix lost writes caused by missing flag

2018-02-21 Thread Ming Lei
On Tue, Feb 13, 2018 at 7:05 AM, Ross Zwisler wrote: > The following commit: > > commit aa4d86163e4e ("block: loop: switch to VFS ITER_BVEC") > > replaced __do_lo_send_write(), which used ITER_KVEC iterators, with > lo_write_bvec() which uses ITER_BVEC iterators. In

Re: [PATCH 1/2] ndctl: add more error outs to update firmware and enable verbose debug

2018-02-21 Thread Dan Williams
On Wed, Feb 21, 2018 at 2:05 PM, Dave Jiang wrote: > update-firmware is missing verbose option for debug outputs. Also adding > additional error outs to give better indication if something has failed > and why. Looks good to me. Reviewed-by: Dan Williams

Re: [PATCH 2/2] ndctl: add "all" dimm-id option for update-firmware

2018-02-21 Thread Dan Williams
On Wed, Feb 21, 2018 at 2:28 PM, Verma, Vishal L wrote: > > On Wed, 2018-02-21 at 15:06 -0700, Dave Jiang wrote: >> Adding all option to allow ndctl to update all DIMMs at once. > > I was going to ask that we should also update the documentation for > this command to

Re: [PATCH 2/2] ndctl: add "all" dimm-id option for update-firmware

2018-02-21 Thread Dan Williams
On Wed, Feb 21, 2018 at 2:06 PM, Dave Jiang wrote: > Adding all option to allow ndctl to update all DIMMs at once. > > Signed-off-by: Dave Jiang > --- > ndctl/update.c | 25 - > 1 file changed, 16 insertions(+), 9

Re: [PATCH] acpi: nfit: document sysfs interface

2018-02-21 Thread Dan Williams
Wow, thank you for taking a look at this! Always nice to get an unexpected documentation gift. Some comments below: On Mon, Feb 19, 2018 at 10:07 AM, Aishwarya Pant wrote: > This is an attempt to document the nfit sysfs interface. The > descriptions have been collected from

[ndctl PATCH] ndctl, test: fix tests that use error injection on older kernels

2018-02-21 Thread Vishal Verma
When we updated from using canned badblocks to injected errors in nfit_test, we ended up breaking the tests for older kernels that didn't have error injection capabilities. Fix this by first checking if badblocks already exist. If they do, we have an older kernel with canned badblocks, and we can

[ndctl PATCH 4/3] ndctl, configure: add -Wmaybe-uninitialized to cflags

2018-02-21 Thread Vishal Verma
rpmbuild had the above cflag enabled, but local builds didn't, resulting in missed warnings. Add it to my_CFLAGS in configure.ac Cc: Dan Williams Signed-off-by: Vishal Verma --- configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH] ndctl, test: explicitly request namespace size

2018-02-21 Thread Ross Zwisler
The btt-pad-compat.sh test was failing for me because the namespace it was creating was 32 MiB in size, but it was trying to do 64 MiB worth of I/O using xxd. This happened because when we created the namespace we didn't specify a size, and in nfit_test we could have hit either a 64 MiB or a 32

[ndctl PATCH 0/3] add -Wmaybe-uninitialized

2018-02-21 Thread Vishal Verma
A few misc updates. Add the -Wmaybe-uninitialized flag to configure, and fix the warnings it results in. Also in update.c, remove a new unnecessary if (cmd) - unref checks as unref already handles the NULL case. Vishal Verma (3): ndctl, inject-smart: cleanup uninitialized variable warnings

[ndctl PATCH 3/3] ndctl, update: remove the check for !cmd when dereferencing it

2018-02-21 Thread Vishal Verma
ndctl_cmd_unref() already checks for the cmd being NULL, no need to check at every call site. Cc: Dave Jiang Signed-off-by: Vishal Verma --- ndctl/update.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ndctl/update.c

[ndctl PATCH 1/3] ndctl, inject-smart: cleanup uninitialized variable warnings

2018-02-21 Thread Vishal Verma
There were a couple of cases where we could try to unref a command that had never been initialized. Fix those by always initializing the cmd pointers to NULL. Cc: Dan Williams Signed-off-by: Vishal Verma --- ndctl/inject-smart.c | 4 ++-- 1

[ndctl PATCH 2/3] ndctl, update: fix uninitialized variable warnings

2018-02-21 Thread Vishal Verma
In send_firmware, if the file size ('remain') were to be zero, 'rc' would never get assigned. While this conditon would never be reached because we have already checked the file size to be greater than zero, initialize 'rc' anyway to silence the compiler warning. Cc: Dan Williams

Re: [PATCH 2/2] ndctl: add "all" dimm-id option for update-firmware

2018-02-21 Thread Verma, Vishal L
On Wed, 2018-02-21 at 15:06 -0700, Dave Jiang wrote: > Adding all option to allow ndctl to update all DIMMs at once. I was going to ask that we should also update the documentation for this command to include the new 'all' behavior, but it looks like during the revisions of the original series,

[PATCH 2/2] ndctl: add "all" dimm-id option for update-firmware

2018-02-21 Thread Dave Jiang
Adding all option to allow ndctl to update all DIMMs at once. Signed-off-by: Dave Jiang --- ndctl/update.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/ndctl/update.c b/ndctl/update.c index fc26acf..1b771ff 100644 ---

[PATCH 1/2] ndctl: add more error outs to update firmware and enable verbose debug

2018-02-21 Thread Dave Jiang
update-firmware is missing verbose option for debug outputs. Also adding additional error outs to give better indication if something has failed and why. Signed-off-by: Dave Jiang --- ndctl/update.c | 99 +++- 1 file

Re: [PATCH 1/2] ndctl: tests must use local ndctl

2018-02-21 Thread Dan Williams
On Wed, Feb 21, 2018 at 10:12 AM, Ross Zwisler wrote: > Fix a few places in our unit tests where we were using the system ndctl > instead of the locally built one. On my system this was leading to false > positive test failures because my local ndctl didn't support

[PATCH 2/2] ndctl: add test files to .gitignore

2018-02-21 Thread Ross Zwisler
Signed-off-by: Ross Zwisler --- .gitignore | 21 + 1 file changed, 21 insertions(+) diff --git a/.gitignore b/.gitignore index 3c2de0e..20a04de 100644 --- a/.gitignore +++ b/.gitignore @@ -32,3 +32,24 @@ version.m4 cscope.files cscope*.out