2011-06-28 05:32:41

by Allison Henderson

[permalink] [raw]
Subject: [PATCH 0/2 v6] 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(-)



2011-06-28 05:32:42

by Allison Henderson

[permalink] [raw]
Subject: [PATCH 1/2 v6] 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

Signed-off-by: Allison Henderson <[email protected]>
---
: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(-)

diff --git a/123 b/123
index 27c1e66..ee1194d 100755
--- a/123
+++ b/123
@@ -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
diff --git a/common.rc b/common.rc
index 680631d..9d68574 100644
--- a/common.rc
+++ b/common.rc
@@ -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
#
--
1.7.1


2011-06-28 05:39:17

by Allison Henderson

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

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.

Signed-off-by: Allison Henderson <[email protected]>
---

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(-)

diff --git a/group b/group
index 1f86075..c045e70 100644
--- a/group
+++ b/group
@@ -368,3 +368,4 @@ deprecated
252 auto quick prealloc
253 auto quick
254 auto quick
+255 auto quick
--
1.7.1


2011-06-28 14:03:16

by Allison Henderson

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

On 06/27/2011 10:32 PM, Allison Henderson wrote:
> 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.
>
> Signed-off-by: Allison Henderson<[email protected]>
> ---
>
> 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(-)
>
> diff --git a/group b/group
> index 1f86075..c045e70 100644
> --- a/group
> +++ b/group
> @@ -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