Skip to contentSkip to conversation

common/xfs: fix unexpected failure on real 4k sector device

PATCH New Zorro Lang 1 participant 1 message Feb 27, 2017

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH v2 1/1 common/xfs: fix unexpected failure on real 4k sector device

_xfs_mkfs_validation_check() run "$cmd -s size=2s" to be sure if xfsprogs support stricter input checks. But there's an unexpected failure on 4k sector device:

  # blockdev --getbsz --getpbsz --getss $dev
  4096
  4096
  4096
  # mkfs.xfs -f -N -d file,name=$tmpfile,size=1g -s size=2s
  illegal sector size 1024; hw sector is 4096
  ....

So change the sector size from '2s' to '8s' to keep away this failure.

---

This's the V2 of "[PATCH] common/xfs: change _xfs_mkfs_validation_check return logic", change '2s' to '8s'.

Thanks,
Zorro

 common/xfs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/xfs +1 -1
index 767a481..4bd8465 100644
@@ -542,7 +542,7 @@ _xfs_mkfs_validation_check()
 	local tmpfile=`mktemp`
 	local cmd="$MKFS_XFS_PROG -f -N -d file,name=$tmpfile,size=1g"
 
-	$cmd -s size=2s >/dev/null 2>&1
+	$cmd -s size=8s >/dev/null 2>&1
 	local sum=$?
 
 	$cmd -l version=2,su=260k >/dev/null 2>&1
Signature · 1 line
2.7.4