Skip to contentSkip to conversation

XFS TESTS: Add ENOSPC Punch Hole Test

PATCH Superseded Allison Henderson 1 participant 4 messages Jun 28, 2011 VFS

v6 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v6 cover XFS TESTS: Add ENOSPC Punch Hole Test

Hi All,

This is another set I sent out a while ago, but I didnt see it show up on the lists, so I am resending this one too. The work in this patch is a continuation from a previous patch set that has been partially accepted, so I thought I should retain the v6.

This patch set adds the ENOSPC test that was used for ext4 punch hole testing. This test will verify that a hole can be punched even when the disk is full. Reserved blocks should be used to complete the operation when there is not blocks to further fragment the file.

Because punching a hole does not always require extra blocks, there needs to be serveal iterations of punching holes, and then filling the file system to 100% usage before it is forced to grow the tree in order to handle the fragmentation. The growing of the tree is what would cause ENOSPC if not for the use of reserved blocks.

I could use some opinions on this patch set becuase I am not sure if other filesystems handle their punch holes in the same way. Although xfs appears to pass the test, should this test be an ext4 only test? Thx!

Allison Henderson (2):
XFS TESTS: Move su routines in 123 to common.rc
XFS TESTS: Add ENOSPC Hole Punch Test

 123       |   24 ------------------------
 common.rc |   20 ++++++++++++++++++++
 group     |    1 +
 3 files changed, 21 insertions(+), 24 deletions(-)
#1 lore raw

PATCH v6 1/2 XFS TESTS: ENOSPC Punch Hole: Move su routines in 123 to common.rc

This patch moves the su routines in test 123 to common.rc so that they can also be used in the new test 255

---
:100755 100755 27c1e66... ee1194d... M 123
:100644 100644 680631d... 9d68574... M common.rc

 123       |   24 ------------------------
 common.rc |   20 ++++++++++++++++++++
 2 files changed, 20 insertions(+), 24 deletions(-)
123 +0 -24
index 27c1e66..ee1194d 100755
@@ -42,30 +42,6 @@ _cleanup()
     _cleanup_testdir
 }
 
-
-_filter_user_do()
-{
-        perl -ne "
-s,.*Permission\sdenied.*,Permission denied,;
-s,.*no\saccess\sto\stty.*,,;
-s,.*no\sjob\scontrol\sin\sthis\sshell.*,,;
-s,^\s*$,,;
-        print;"
-}
-
-
-
-
-_user_do()
-{
-    if [ "$HOSTOS" == "IRIX" ]
-	then
-	echo $1 | /bin/bash "su $qa_user 2>&1" | _filter_user_do
-    else
-	echo $1 | su $qa_user 2>&1 | _filter_user_do
-    fi
-}
-
 # get standard environment, filters and checks
 . ./common.rc
 . ./common.filter
common.rc +20 -0
index 680631d..9d68574 100644
@@ -867,6 +867,26 @@ _require_user()
     [ "$?" == "0" ] || _notrun "$qa_user user not defined."
 }
 
+_filter_user_do()
+{
+        perl -ne "
+s,.*Permission\sdenied.*,Permission denied,;
+s,.*no\saccess\sto\stty.*,,;
+s,.*no\sjob\scontrol\sin\sthis\sshell.*,,;
+s,^\s*$,,;
+        print;"
+}
+
+_user_do()
+{
+    if [ "$HOSTOS" == "IRIX" ]
+	then
+	echo $1 | /bin/bash "su $qa_user 2>&1" | _filter_user_do
+    else
+	echo $1 | su $qa_user 2>&1 | _filter_user_do
+    fi  
+}
+
 # check that xfs_io, glibc, kernel, and filesystem all (!) support
 # fallocate
 #
Signature · 1 line
1.7.1
#2 lore raw

PATCH v6 2/2 XFS TESTS: ENOSPC Punch Hole: Add new test 255

In reply to Allison Henderson

This patch adds a new test 255 that tests that a hole can be punched even when the disk is full. Reserved blocks should be used to allow a punch hole to proceed even when there is not enough blocks to further fragment the file. To test this, the file system is fragmented by punching holes in regular intervals and filling the file system between punches. This will eventually force the file system to use reserved blocks to proceed with the punch hole operation.

The work in this patch is a continuation from a previous patch set that has been partially accepted.

---

v5->v6

Test moved out of 252 and put in its own test 255

_fill_fs and _test_full_fs_punch have been moved from common.punch to test 255 and modified to use the _user_do routines in common.rc

_fill_fs has been optimized to stop once files smaller than a block cannot be created.

:100644 100644 1f86075... c045e70... M group

 group |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
group +1 -0
index 1f86075..c045e70 100644
@@ -368,3 +368,4 @@ deprecated
 252 auto quick prealloc
 253 auto quick
 254 auto quick
+255 auto quick
Signature · 6 lines
1.7.1

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#3 lore raw

Re: [PATCH 2/2 v6] XFS TESTS: ENOSPC Punch Hole: Add new test 255

Quoted 32 lines · Allison Henderson

This patch adds a new test 255 that tests that a hole can be punched even when the disk is full. Reserved blocks should be used to allow a punch hole to proceed even when there is not enough blocks to further fragment the file. To test this, the file system is fragmented by punching holes in regular intervals and filling the file system between punches. This will eventually force the file system to use reserved blocks to proceed with the punch hole operation.

The work in this patch is a continuation from a previous patch set that has been partially accepted.

---

v5->v6

Test moved out of 252 and put in its own test 255

_fill_fs and _test_full_fs_punch have been moved from common.punch to test 255 and modified to use the _user_do routines in common.rc

_fill_fs has been optimized to stop once files smaller than a block cannot be created.

:100644 100644 1f86075... c045e70... M group

  group |    1 +
  1 files changed, 1 insertions(+), 0 deletions(-)
group +0 -0
index 1f86075..c045e70 100644

group deprecated · line 371

Quoted 4 lines
group +1 -0
@@ -368,3 +368,4 @@ deprecated
  252 auto quick prealloc
  253 auto quick
  254 auto quick
+255 auto quick

Ah, sorry I obviously messed up the file add here. My apologies for the confusion! Will resend this one.

Allison