Skip to contentSkip to conversation

xfstests: don't assume that falloc_punch implies falloc in test 255

PATCH In review Theodore Ts'o 4 participants 5 messages Mar 5, 2013 – Mar 6, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfstests: don't assume that falloc_punch implies falloc in test 255

As of Linux 3.9-rc1, ext4 will support the punch operation on file systems using indirect blocks, but it can not support the fallocate operation (since there is no way to mark a block as uninitialized using indirect block scheme). This caused test 255 to fail, since it only used _require_xfS_io_falloc_punch assuming that all file systems which supported punch can also support fallocate. Fix this.

---
 255 | 1 +
 1 file changed, 1 insertion(+)
255 +1 -0
index 0083963..ae1d8e0 100755
@@ -48,6 +48,7 @@ _supported_fs generic
 _supported_os Linux
 
 _require_xfs_io_falloc_punch
+_require_xfs_io_falloc
 _require_xfs_io_fiemap
 
 testfile=$TEST_DIR/255.$$
Signature · 6 lines
1.7.12.rc0.22.gcdd159b

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 17 lines · Theodore Ts'o

As of Linux 3.9-rc1, ext4 will support the punch operation on file systems using indirect blocks, but it can not support the fallocate operation (since there is no way to mark a block as uninitialized using indirect block scheme). This caused test 255 to fail, since it only used _require_xfS_io_falloc_punch assuming that all file systems which supported punch can also support fallocate. Fix this.

---
  255 | 1 +
  1 file changed, 1 insertion(+)
255 +0 -0
index 0083963..ae1d8e0 100755

255 _supported_fs generic · line 51

Quoted 4 lines
255 +1 -0
@@ -48,6 +48,7 @@ _supported_fs generic
  _supported_os Linux
 
  _require_xfs_io_falloc_punch
+_require_xfs_io_falloc

#rcj looks reasonable to me to add this requirement

255 _supported_fs generic · line 54

Quoted 4 lines
255 +0 -0
  _require_xfs_io_fiemap
 
  testfile=$TEST_DIR/255.$$

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

#2 lore raw
In reply to Theodore Ts'o

This patch has been committed.

Thanks
--Rich

commit 864688d368d6781c3f6d60bc55b5e3591953e462

Author: Theodore Ts'o <[email protected]>
Date:   Tue Mar 5 17:59:42 2013 +0000

xfstests: don't assume that falloc_punch implies falloc in test 255

As of Linux 3.9-rc1, ext4 will support the punch operation on file systems using indirect blocks, but it can not support the fallocate operation (since there is no way to mark a block as uninitialized using indirect block scheme). This caused test 255 to fail, since it only used _require_xfS_io_falloc_punch assuming that all file systems which supported punch can also support fallocate. Fix this.

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

Reviewed-by on v1 1/1
#3 lore raw
In reply to Theodore Ts'o
Quoted 6 lines · Theodore Ts'o

As of Linux 3.9-rc1, ext4 will support the punch operation on file systems using indirect blocks, but it can not support the fallocate operation (since there is no way to mark a block as uninitialized using indirect block scheme). This caused test 255 to fail, since it only used _require_xfS_io_falloc_punch assuming that all file systems which supported punch can also support fallocate. Fix this.

Seems fine to avoid the incorrect failure, so as far as that goes:

But we probably can & should still test punch in this situation, so we need a new test to exercise that I guess.

-Eric

Quoted 18 lines
---
 255 | 1 +
 1 file changed, 1 insertion(+)
255 +1 -0
index 0083963..ae1d8e0 100755
@@ -48,6 +48,7 @@ _supported_fs generic
 _supported_os Linux
 
 _require_xfs_io_falloc_punch
+_require_xfs_io_falloc
 _require_xfs_io_fiemap
 
 testfile=$TEST_DIR/255.$$
#4 lore raw
Quoted 8 lines · Eric Sandeen
Quoted 6 lines · Theodore Ts'o

As of Linux 3.9-rc1, ext4 will support the punch operation on file systems using indirect blocks, but it can not support the fallocate operation (since there is no way to mark a block as uninitialized using indirect block scheme). This caused test 255 to fail, since it only used _require_xfS_io_falloc_punch assuming that all file systems which supported punch can also support fallocate. Fix this.

Quoted 6 lines

Seems fine to avoid the incorrect failure, so as far as that goes:

But we probably can & should still test punch in this situation, so we need a new test to exercise that I guess.

Hi Eric,

I have sent a patch set to add a test case for punching hole. You can find it in this link [1]. Sorry I don't finish the second version according to Mark's comment.

1. http://www.spinics.net/lists/xfs/msg16234.html

Regards,
- Zheng

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