* [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation
@ 2019-12-18 2:51 Yi Zhang
2019-12-18 16:16 ` Dan Williams
2020-02-18 21:12 ` Jeff Moyer
0 siblings, 2 replies; 3+ messages in thread
From: Yi Zhang @ 2019-12-18 2:51 UTC (permalink / raw)
To: linux-nvdimm; +Cc: dan.j.williams
On some NVDIMM servers, scrub operation will take long time to be finished
as it start on all nvdimm buses in the system, add the bus-id parameter to
do the scrub on the NFIT_TEST_BUS0
Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
---
test/btt-errors.sh | 4 ++--
test/clear.sh | 2 +-
test/inject-error.sh | 2 +-
test/pfn-meta-errors.sh | 2 +-
test/pmem-errors.sh | 2 +-
5 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/test/btt-errors.sh b/test/btt-errors.sh
index cb35865..00c0796 100755
--- a/test/btt-errors.sh
+++ b/test/btt-errors.sh
@@ -115,7 +115,7 @@ bb_inj=$((dataoff/512))
# inject badblocks for one page at the start of the file
$NDCTL inject-error --block="$bb_inj" --count=8 $dev
-$NDCTL start-scrub && $NDCTL wait-scrub
+$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
force_raw 0
mount -o nodelalloc "/dev/$blockdev" $MNT
@@ -149,7 +149,7 @@ map=$(hexdump -s 96 -n 4 "/dev/$raw_bdev" | head -1 | cut -d' ' -f2-)
map=$(tr -d ' ' <<< "0x${map#* }${map%% *}")
bb_inj=$((map/512))
$NDCTL inject-error --block="$bb_inj" --count=1 $dev
-$NDCTL start-scrub && $NDCTL wait-scrub
+$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
force_raw 0
# make sure reading the first block of the namespace fails
diff --git a/test/clear.sh b/test/clear.sh
index 17d5bed..1bd12da 100755
--- a/test/clear.sh
+++ b/test/clear.sh
@@ -41,7 +41,7 @@ err_sector="$(((size/512) / 2))"
err_count=8
if ! read sector len < /sys/block/$blockdev/badblocks; then
$NDCTL inject-error --block="$err_sector" --count=$err_count $dev
- $NDCTL start-scrub && $NDCTL wait-scrub
+ $NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
fi
read sector len < /sys/block/$blockdev/badblocks
[ $((sector * 2)) -ne $((size /512)) ] && echo "fail: $LINENO" && exit 1
diff --git a/test/inject-error.sh b/test/inject-error.sh
index 49e68b3..825bf18 100755
--- a/test/inject-error.sh
+++ b/test/inject-error.sh
@@ -77,7 +77,7 @@ do_tests()
# inject normally
$NDCTL inject-error --block=$err_block --count=$err_count $dev
- $NDCTL start-scrub && $NDCTL wait-scrub
+ $NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
check_status "$err_block" "$err_count"
if read -r sector len < /sys/block/$blockdev/badblocks; then
test "$sector" -eq "$err_block"
diff --git a/test/pfn-meta-errors.sh b/test/pfn-meta-errors.sh
index 2b57f19..14a15ae 100755
--- a/test/pfn-meta-errors.sh
+++ b/test/pfn-meta-errors.sh
@@ -61,7 +61,7 @@ mblk="$((metaoff/512))"
# inject in the middle of the struct page area
bb_inj=$(((dblk - mblk)/2))
$NDCTL inject-error --block="$bb_inj" --count=32 $dev
-$NDCTL start-scrub && $NDCTL wait-scrub
+$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
# after probe from the enable-namespace, the error should've been cleared
force_raw 0
diff --git a/test/pmem-errors.sh b/test/pmem-errors.sh
index 9553a3f..3d90508 100755
--- a/test/pmem-errors.sh
+++ b/test/pmem-errors.sh
@@ -46,7 +46,7 @@ err_sector="$(((size/512) / 2))"
err_count=8
if ! read sector len < /sys/block/$blockdev/badblocks; then
$NDCTL inject-error --block="$err_sector" --count=$err_count $dev
- $NDCTL start-scrub; $NDCTL wait-scrub
+ $NDCTL start-scrub $NFIT_TEST_BUS0; $NDCTL wait-scrub $NFIT_TEST_BUS0
fi
read sector len < /sys/block/$blockdev/badblocks
[ $((sector * 2)) -ne $((size /512)) ] && echo "fail: $LINENO" && false
--
2.21.0
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation
2019-12-18 2:51 [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation Yi Zhang
@ 2019-12-18 16:16 ` Dan Williams
2020-02-18 21:12 ` Jeff Moyer
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2019-12-18 16:16 UTC (permalink / raw)
To: Yi Zhang; +Cc: linux-nvdimm
On Tue, Dec 17, 2019 at 11:18 PM Yi Zhang <yi.zhang@redhat.com> wrote:
>
> On some NVDIMM servers, scrub operation will take long time to be finished
> as it start on all nvdimm buses in the system, add the bus-id parameter to
> do the scrub on the NFIT_TEST_BUS0
Looks good, applied.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation
2019-12-18 2:51 [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation Yi Zhang
2019-12-18 16:16 ` Dan Williams
@ 2020-02-18 21:12 ` Jeff Moyer
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Moyer @ 2020-02-18 21:12 UTC (permalink / raw)
To: Yi Zhang; +Cc: linux-nvdimm
Yi Zhang <yi.zhang@redhat.com> writes:
> On some NVDIMM servers, scrub operation will take long time to be finished
> as it start on all nvdimm buses in the system, add the bus-id parameter to
> do the scrub on the NFIT_TEST_BUS0
>
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
> ---
> test/btt-errors.sh | 4 ++--
> test/clear.sh | 2 +-
> test/inject-error.sh | 2 +-
> test/pfn-meta-errors.sh | 2 +-
> test/pmem-errors.sh | 2 +-
> 5 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/test/btt-errors.sh b/test/btt-errors.sh
> index cb35865..00c0796 100755
> --- a/test/btt-errors.sh
> +++ b/test/btt-errors.sh
> @@ -115,7 +115,7 @@ bb_inj=$((dataoff/512))
>
> # inject badblocks for one page at the start of the file
> $NDCTL inject-error --block="$bb_inj" --count=8 $dev
> -$NDCTL start-scrub && $NDCTL wait-scrub
> +$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
>
> force_raw 0
> mount -o nodelalloc "/dev/$blockdev" $MNT
> @@ -149,7 +149,7 @@ map=$(hexdump -s 96 -n 4 "/dev/$raw_bdev" | head -1 | cut -d' ' -f2-)
> map=$(tr -d ' ' <<< "0x${map#* }${map%% *}")
> bb_inj=$((map/512))
> $NDCTL inject-error --block="$bb_inj" --count=1 $dev
> -$NDCTL start-scrub && $NDCTL wait-scrub
> +$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
> force_raw 0
>
> # make sure reading the first block of the namespace fails
> diff --git a/test/clear.sh b/test/clear.sh
> index 17d5bed..1bd12da 100755
> --- a/test/clear.sh
> +++ b/test/clear.sh
> @@ -41,7 +41,7 @@ err_sector="$(((size/512) / 2))"
> err_count=8
> if ! read sector len < /sys/block/$blockdev/badblocks; then
> $NDCTL inject-error --block="$err_sector" --count=$err_count $dev
> - $NDCTL start-scrub && $NDCTL wait-scrub
> + $NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
> fi
> read sector len < /sys/block/$blockdev/badblocks
> [ $((sector * 2)) -ne $((size /512)) ] && echo "fail: $LINENO" && exit 1
> diff --git a/test/inject-error.sh b/test/inject-error.sh
> index 49e68b3..825bf18 100755
> --- a/test/inject-error.sh
> +++ b/test/inject-error.sh
> @@ -77,7 +77,7 @@ do_tests()
>
> # inject normally
> $NDCTL inject-error --block=$err_block --count=$err_count $dev
> - $NDCTL start-scrub && $NDCTL wait-scrub
> + $NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
> check_status "$err_block" "$err_count"
> if read -r sector len < /sys/block/$blockdev/badblocks; then
> test "$sector" -eq "$err_block"
> diff --git a/test/pfn-meta-errors.sh b/test/pfn-meta-errors.sh
> index 2b57f19..14a15ae 100755
> --- a/test/pfn-meta-errors.sh
> +++ b/test/pfn-meta-errors.sh
> @@ -61,7 +61,7 @@ mblk="$((metaoff/512))"
> # inject in the middle of the struct page area
> bb_inj=$(((dblk - mblk)/2))
> $NDCTL inject-error --block="$bb_inj" --count=32 $dev
> -$NDCTL start-scrub && $NDCTL wait-scrub
> +$NDCTL start-scrub $NFIT_TEST_BUS0 && $NDCTL wait-scrub $NFIT_TEST_BUS0
>
> # after probe from the enable-namespace, the error should've been cleared
> force_raw 0
> diff --git a/test/pmem-errors.sh b/test/pmem-errors.sh
> index 9553a3f..3d90508 100755
> --- a/test/pmem-errors.sh
> +++ b/test/pmem-errors.sh
> @@ -46,7 +46,7 @@ err_sector="$(((size/512) / 2))"
> err_count=8
> if ! read sector len < /sys/block/$blockdev/badblocks; then
> $NDCTL inject-error --block="$err_sector" --count=$err_count $dev
> - $NDCTL start-scrub; $NDCTL wait-scrub
> + $NDCTL start-scrub $NFIT_TEST_BUS0; $NDCTL wait-scrub $NFIT_TEST_BUS0
> fi
> read sector len < /sys/block/$blockdev/badblocks
> [ $((sector * 2)) -ne $((size /512)) ] && echo "fail: $LINENO" && false
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-02-18 21:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 2:51 [PATCH ndctl] ndctl, test: add bus-id parameter for start-scrub/wait-scrub operation Yi Zhang
2019-12-18 16:16 ` Dan Williams
2020-02-18 21:12 ` Jeff Moyer
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.