Re: [PATCH 4/5] lightnvm: pblk: Support for packed metadata in pblk.

2018-06-19 Thread Igor Konopko
On 19.06.2018 05:47, Javier Gonzalez wrote: On 19 Jun 2018, at 14.42, Matias Bjørling wrote: On Tue, Jun 19, 2018 at 1:08 PM, Javier Gonzalez wrote: On 16 Jun 2018, at 00.27, Igor Konopko wrote: In current pblk implementation, l2p mapping for not closed lines is always stored only in

[PATCH 8/9] check: Suppress a shellcheck warning about the DMESG_FILTER initialization

2018-06-19 Thread Bart Van Assche
Avoid that shellcheck reports the following: check:396:2: warning: Use var=$(command) to assign output (or quote to assign string). [SC2209] Signed-off-by: Bart Van Assche --- check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check b/check index

[PATCH 4/9] Suppress shellcheck complaints about global variables

2018-06-19 Thread Bart Van Assche
Add a new file common/shellcheck and include it in all test scripts that use global variables. The file common/shellcheck contains a statement that stops shellcheck to complain about global variables: echo "$CHECK_DMESG ${CPUS_ONLINE_SAVED[*]} $DESCRIPTION $DMESG_FILTER $FIO_PERF_FIELDS

[PATCH 1/9] common/rc: Fix _have_tracepoint()

2018-06-19 Thread Bart Van Assche
Make sure that _have_tracepoint() uses the argument passed to that function instead of using an undefined variable. Signed-off-by: Bart Van Assche --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc index 7f1728025364..7592400dda82 100644 --- a/common/rc

[PATCH 6/9] Multiple tests: remove unused and undefined variables

2018-06-19 Thread Bart Van Assche
Signed-off-by: Bart Van Assche Cc: Chaitanya Kulkarni --- tests/loop/003 | 3 --- tests/nvme/010 | 3 +-- tests/nvme/011 | 3 +-- tests/nvme/012 | 1 - tests/nvme/013 | 1 - 5 files changed, 2 insertions(+), 9 deletions(-) diff --git a/tests/loop/003 b/tests/loop/003 index

[PATCH 5/9] check: Avoid that shellcheck complains that $FULL appears unused

2018-06-19 Thread Bart Van Assche
$FULL is a global variable. Avoid that shellcheck complains about it. Signed-off-by: Bart Van Assche --- check | 2 ++ 1 file changed, 2 insertions(+) diff --git a/check b/check index 5f53fa105f72..f1feb96b293e 100755 --- a/check +++ b/check @@ -301,6 +301,8 @@ _call_test() { local

[PATCH 9/9] Makefile: Do not suppress useful shellcheck warnings

2018-06-19 Thread Bart Van Assche
All the shellcheck warnings that are currently suppressed are useful. Additionally, it is easy to avoid false positives for the currently suppressed categories of shellcheck warnings. Hence stop suppressing shellcheck warnings. See also commit 17a59e0dc212 ("Fix all shellcheck warnings").

[PATCH 3/9] check, tests/meta/012: Use array["index"] instead of array[index]

2018-06-19 Thread Bart Van Assche
This causes shellcheck to stop complaining about these array element accesses. Signed-off-by: Bart Van Assche --- check | 46 +++--- tests/meta/012 | 4 ++-- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/check b/check index

[PATCH 7/9] Avoid passing tests/block/002 arguments to _init_scsi_debug

2018-06-19 Thread Bart Van Assche
This patch avoids that shellcheck reports the following: tests/block/002:34:7: note: Use _init_scsi_debug "$@" if function's $1 should mean script's $1. [SC2119] Signed-off-by: Bart Van Assche --- common/scsi_debug | 3 +++ tests/block/002 | 2 +- 2 files changed, 4 insertions(+), 1

[PATCH 0/9] blktests: Re-enable shellcheck warnings

2018-06-19 Thread Bart Van Assche
Hello Omar, Since I noticed that several useful shellcheck warnings are suppressed in the blktests project, I came up with this patch series that reenables all shellcheck warnings and also suppresses false positive shellcheck reports. It would be appreciated if you could have a look at this patch

[PATCH 2/9] Annotate include statements in shell scripts where the source file is a variable

2018-06-19 Thread Bart Van Assche
This causes shellcheck to stop complaining about these include statements. Signed-off-by: Bart Van Assche --- check | 3 +++ 1 file changed, 3 insertions(+) diff --git a/check b/check index 4baa8dde2436..5e1ba7bc8401 100755 --- a/check +++ b/check @@ -23,6 +23,7 @@ _found_test() {

Re: [PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Jens Axboe
On 6/19/18 12:17 PM, Bart Van Assche wrote: > On Tue, 2018-06-19 at 14:16 -0400, Kent Overstreet wrote: >> I take it if we had a test for request based dm in blktests or somewhere that >> probably would have caught this much easier :/ > > I'm working on porting the srp-test software to the

Re: [PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Bart Van Assche
On Tue, 2018-06-19 at 14:16 -0400, Kent Overstreet wrote: > I take it if we had a test for request based dm in blktests or somewhere that > probably would have caught this much easier :/ I'm working on porting the srp-test software to the blktests framework. Bart.

Re: [PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Jens Axboe
On 6/19/18 11:26 AM, Bart Van Assche wrote: > Commit 0ba99ca4838b ("block: Add warning for bi_next not NULL in > bio_endio()") breaks the dm driver. end_clone_bio() detects whether > or not a bio is the last bio associated with a request by checking > the .bi_next field. Commit 0ba99ca4838b clears

Re: [PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Mike Snitzer
On Tue, Jun 19 2018 at 1:26pm -0400, Bart Van Assche wrote: > Commit 0ba99ca4838b ("block: Add warning for bi_next not NULL in > bio_endio()") breaks the dm driver. end_clone_bio() detects whether > or not a bio is the last bio associated with a request by checking > the .bi_next field. Commit

[PATCH v2] Revert "block: Add warning for bi_next not NULL in bio_endio()"

2018-06-19 Thread Bart Van Assche
Commit 0ba99ca4838b ("block: Add warning for bi_next not NULL in bio_endio()") breaks the dm driver. end_clone_bio() detects whether or not a bio is the last bio associated with a request by checking the .bi_next field. Commit 0ba99ca4838b clears that field before end_clone_bio() has had a chance

Re: [PATCH] block: fix timeout changes for legacy request drivers

2018-06-19 Thread Jens Axboe
On 6/19/18 10:40 AM, Christoph Hellwig wrote: > blk_mq_complete_request can only be called for blk-mq drivers, but when > removing the BLK_EH_HANDLED return value, two legacy request timeout > methods incorrectly got switched to call blk_mq_complete_request. > Call __blk_complete_request instead

[PATCH] block: fix timeout changes for legacy request drivers

2018-06-19 Thread Christoph Hellwig
blk_mq_complete_request can only be called for blk-mq drivers, but when removing the BLK_EH_HANDLED return value, two legacy request timeout methods incorrectly got switched to call blk_mq_complete_request. Call __blk_complete_request instead to reinstance the previous behavior. For that

Re: [PATCH 4/5] lightnvm: pblk: Support for packed metadata in pblk.

2018-06-19 Thread Javier Gonzalez
> On 19 Jun 2018, at 14.42, Matias Bjørling wrote: > > On Tue, Jun 19, 2018 at 1:08 PM, Javier Gonzalez wrote: >>> On 16 Jun 2018, at 00.27, Igor Konopko wrote: >>> >>> In current pblk implementation, l2p mapping for not closed lines >>> is always stored only in OOB metadata and recovered

Re: [PATCH 4/5] lightnvm: pblk: Support for packed metadata in pblk.

2018-06-19 Thread Matias Bjørling
On Tue, Jun 19, 2018 at 1:08 PM, Javier Gonzalez wrote: >> On 16 Jun 2018, at 00.27, Igor Konopko wrote: >> >> In current pblk implementation, l2p mapping for not closed lines >> is always stored only in OOB metadata and recovered from it. >> >> Such a solution does not provide data integrity

Re: [PATCH 4/5] lightnvm: pblk: Support for packed metadata in pblk.

2018-06-19 Thread Javier Gonzalez
> On 16 Jun 2018, at 00.27, Igor Konopko wrote: > > In current pblk implementation, l2p mapping for not closed lines > is always stored only in OOB metadata and recovered from it. > > Such a solution does not provide data integrity when drives does > not have such a OOB metadata space. > > The

Re: [PATCH 0/5] lightnvm: More flexible approach to metadata

2018-06-19 Thread Javier Gonzalez
> On 16 Jun 2018, at 00.27, Igor Konopko wrote: > > This series of patches introduce some more flexibility in pblk > related to OOB meta: > -ability to use different sizes of metadata (previously fixed 16b) > -ability to use pblk on drives without metadata > -ensuring that extended

Re: [PATCH] bdi: Fix another oops in wb_workfn()

2018-06-19 Thread Jan Kara
On Mon 18-06-18 23:38:12, Tetsuo Handa wrote: > On 2018/06/18 22:46, Jan Kara wrote: > > syzbot is reporting NULL pointer dereference at wb_workfn() [1] due to > > [1] > https://syzkaller.appspot.com/bug?id=e0818ccb7e46190b3f1038b0c794299208ed4206 > > line is missing. > > > wb->bdi->dev being

Re: [PATCH 5/5] lightnvm: pblk: Disable interleaved metadata in pblk

2018-06-19 Thread Matias Bjørling
On Mon, Jun 18, 2018 at 4:29 PM, Javier Gonzalez wrote: >> On 16 Jun 2018, at 21.38, Matias Bjørling wrote: >> >> On 06/16/2018 12:27 AM, Igor Konopko wrote: >>> Currently pblk and lightnvm does only check for size >>> of OOB metadata and does not care wheather this meta >>> is located in

Re: [PATCH 1/5] lightnvm: pblk: Helpers for OOB metadata

2018-06-19 Thread Javier Gonzalez
> > On 18 Jun 2018, at 22.53, Igor Konopko wrote: > > > > On 18.06.2018 07:23, Javier Gonzalez wrote: >>> On 16 Jun 2018, at 00.27, Igor Konopko wrote: >>> >>> Currently pblk assumes that size of OOB metadata on drive is always >>> equal to size of pblk_sec_meta struct. This commit add