ndctl, test: fix sector-mode.sh to work with label support
Vishal Verma
maintainerPATCH 1/1 ndctl, test: fix sector-mode.sh to work with label support
The nfit_test.1 grew support for the label DSMs. Fix sector-mode.sh to emulate labelless mode by zeroing the labels at the start, and supplying --no-autolabel to create-namespace commands.
Cc Dan Williams <[email protected]>
Signed-off-by Vishal Verma <[email protected]>
--- test/sector-mode.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
test/sector-mode.sh +4 -8
@@ -32,11 +32,7 @@ $NDCTL zero-labels $BUS all $NDCTL enable-region $BUS all $NDCTL disable-region $BUS1 all -if $NDCTL zero-labels $BUS1 all; then - echo "DIMMs on $BUS1 support labels, skip..." - $NDCTL enable-region $BUS1 all - false -fi +$NDCTL zero-labels $BUS1 all $NDCTL enable-region $BUS1 all rc=1
@@ -44,9 +40,9 @@ query=". | sort_by(.size) | reverse | .[0].dev" NAMESPACE=$($NDCTL list $BUS1 -N | jq -r "$query") REGION=$($NDCTL list -R --namespace=$NAMESPACE | jq -r ".dev") echo 0 > /sys/bus/nd/devices/$REGION/read_only -$NDCTL create-namespace -e $NAMESPACE -m sector -f -l 4K -$NDCTL create-namespace -e $NAMESPACE -m dax -f -a 4K -$NDCTL create-namespace -e $NAMESPACE -m sector -f -l 4K +$NDCTL create-namespace --no-autolabel -e $NAMESPACE -m sector -f -l 4K +$NDCTL create-namespace --no-autolabel -e $NAMESPACE -m dax -f -a 4K +$NDCTL create-namespace --no-autolabel -e $NAMESPACE -m sector -f -l 4K $NDCTL disable-region $BUS all $NDCTL disable-region $BUS1 all
Signature · 6 lines
2.17.0 _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
Quoted 6 lines · Vishal Verma
The nfit_test.1 grew support for the label DSMs. Fix
sector-mode.shto emulate labelless mode by zeroing the labels at the start, and supplying --no-autolabel to create-namespace commands.Cc Dan Williams <[email protected]>Signed-off-by Vishal Verma <[email protected]>
Looks good to me:
Reviewed-by Dan Williams <[email protected]>
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm