Message ID | 20200728101452.19309-6-shinichiro.kawasaki@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support zone capacity | expand |
Looks good,
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
On Jul 28 19:14, Shin'ichiro Kawasaki wrote: > Per ZBC, ZAC and ZNS specifications, when zones have condition "read > only", "full" or "offline", the zones may not have valid write pointers. > In such a case, do not check validity of write pointers. > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> > --- LGTM. Reviewed-by: Klaus Jensen <k.jensen@samsung.com>
diff --git a/tests/zbd/002 b/tests/zbd/002 index a134434..39c2ad5 100755 --- a/tests/zbd/002 +++ b/tests/zbd/002 @@ -80,9 +80,12 @@ _check_blkzone_report() { fi # Check write pointer - if [[ ${wptr} -lt 0 || ${wptr} -gt ${len} ]]; then + if ((cond != ZONE_COND_READ_ONLY && + cond != ZONE_COND_FULL && + cond != ZONE_COND_OFFLINE && + (wptr < 0 || wptr > len) )); then echo -n "Write pointer is invalid at zone ${idx}. " - echo "wp:${wptr}" + echo "wp:${wptr}, cond:${cond}" return 1 fi diff --git a/tests/zbd/rc b/tests/zbd/rc index 3fd2d36..1237363 100644 --- a/tests/zbd/rc +++ b/tests/zbd/rc @@ -41,7 +41,9 @@ export ZONE_TYPE_SEQ_WRITE_PREFERRED=3 export ZONE_COND_EMPTY=1 export ZONE_COND_IMPLICIT_OPEN=2 export ZONE_COND_CLOSED=4 +export ZONE_COND_READ_ONLY=13 export ZONE_COND_FULL=14 +export ZONE_COND_OFFLINE=15 export ZONE_TYPE_ARRAY=( [1]="CONVENTIONAL"
Per ZBC, ZAC and ZNS specifications, when zones have condition "read only", "full" or "offline", the zones may not have valid write pointers. In such a case, do not check validity of write pointers. Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> --- tests/zbd/002 | 7 +++++-- tests/zbd/rc | 2 ++ 2 files changed, 7 insertions(+), 2 deletions(-)