[PATCH] common: fix rt_ops setup in _scratch_mkfs_sized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Carlos Maiolino <cem@xxxxxxxxxx>

Tests using _scratch_mkfs_sized() will fail if SCRATCH_RTDEV is set,
but, USE_EXTERNAL is not, this happens because the function pass
"-r size=$fssize" to the _scratch_mkfs_xfs argument line, which in turn
will not set rtdev because USE_EXTERNAL is not set.

Tests like xfs/015 will fail as:

xfs/015 6s ... [failed, exit status 1]- output mismatch
.
.
    +size specified for non-existent rt subvolume
    +Usage: mkfs.xfs
.
.

with this patch the test runs properly using the rtdev if USE_EXTERNAL
is set.

Signed-off-by: Carlos Maiolino <cmaiolino@xxxxxxxxxx>
---

Particularly I think SCRATCH_RTDEV should not depend on USE_EXTERNAL, as the
latter is also linked to external logdevs, but I noticed tests specific for RT
devices also set USE_EXTERNAL, so  I opted to change it according to the current
usage

 common/rc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 1618ded5..20608fbe 100644
--- a/common/rc
+++ b/common/rc
@@ -965,7 +965,7 @@ _scratch_mkfs_sized()
 		[ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small"
 	fi
 
-	if [ "$FSTYP" = "xfs" ] && [ -b "$SCRATCH_RTDEV" ]; then
+	if [ "$FSTYP" = "xfs" ] && [ "$USE_EXTERNAL" = yes -a -b "$SCRATCH_RTDEV" ]; then
 		local rtdevsize=`blockdev --getsize64 $SCRATCH_RTDEV`
 		[ "$fssize" -gt "$rtdevsize" ] && _notrun "Scratch rt device too small"
 		rt_ops="-r size=$fssize"
-- 
2.39.2




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux