Skip to contentSkip to conversation

generic/475: fix confusing comment

PATCH In review Darrick J. Wong 2 participants 2 messages May 21, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 generic/475: fix confusing comment

From: Darrick J. Wong <[email protected]>

The comment about the dmerror switcheroo is hard to understand and wrong. Fix both problems by rewriting it.

---
 tests/generic/475 |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
tests/generic/475 +5 -3
index e31f1251..45072278 100755
@@ -73,9 +73,11 @@ for i in $(seq 1 $((50 * TIME_FACTOR)) ); do
 	# recovery
 	sleep $((RANDOM % 3))
 
-	# Loading error table without "--nolockfs" option. Because "--nolockfs"
-	# won't freeze fs, then some running I/Os may cause XFS to shutdown
-	# prematurely. That's not what we want to test.
+	# This test aims to simulate sudden disk failure, which means that we
+	# do not want to quiesce the filesystem or otherwise give it a chance
+	# to flush its logs.  Therefore we want to call dmsetup with the
+	# --nolockfs parameter; to make this happen we must call the load
+	# error table helper *without* 'lockfs'.
 	_dmerror_load_error_table
 
 	ps -e | grep fsstress > /dev/null 2>&1
#1 lore raw
Quoted 16 lines · Darrick J. Wong

From: Darrick J. Wong <[email protected]>

The comment about the dmerror switcheroo is hard to understand and wrong. Fix both problems by rewriting it.

---
 tests/generic/475 |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
tests/generic/475 +0 -0
index e31f1251..45072278 100755
@@ -73,9 +73,11 @@ for i in $(seq 1 $((50 * TIME_FACTOR)) ); do
 	# recovery

tests/generic/475 for i in $(seq 1 $((50 * TIME_FACTOR)) ); do · line 80

Quoted 10 lines
tests/generic/475 +5 -3
 	sleep $((RANDOM % 3))
 
-	# Loading error table without "--nolockfs" option. Because "--nolockfs"
-	# won't freeze fs, then some running I/Os may cause XFS to shutdown
-	# prematurely. That's not what we want to test.
+	# This test aims to simulate sudden disk failure, which means that we
+	# do not want to quiesce the filesystem or otherwise give it a chance
+	# to flush its logs.  Therefore we want to call dmsetup with the
+	# --nolockfs parameter; to make this happen we must call the load
+	# error table helper *without* 'lockfs'.

Thanks! This looks good to me!

Quoted 7 lines
tests/generic/475 +0 -1
 	_dmerror_load_error_table
 
 	ps -e | grep fsstress > /dev/null 2>&1
--

To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html