diff mbox

bug#8001: cp (8.10) sparse handling fails on compressed btrfs (cp/fiemap-2)

Message ID AANLkTi=4x+RzqZRKVCreWy67eOUSocjA4c_N+9aEHeG9@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Frysinger Feb. 20, 2011, 12:53 a.m. UTC
None
diff mbox

Patch

--- coreutils-8.10/tests/cp/fiemap-2
+++ coreutils-8.10/tests/cp/fiemap-2
@@ -43,12 +43,19 @@ 
 printf x > k || framework_failure_
 dd bs=1k seek=1 of=k count=255 < /dev/zero || framework_failure_

+filefrag -v k
+sync
+filefrag -v k
+
 # cp should detect the all-zero blocks and convert some of them to holes.
 # How many it detects/converts currently depends on io_blksize.
 # Currently, on my F14/ext4 desktop, this K starts off with size 256KiB,
 # (note that the K in the preceding test starts off with size 4KiB).
 # cp from coreutils-8.9 with --sparse=always reduces the size to 32KiB.
 cp --sparse=always k k2 || fail=1
+
+sync
+
 test $(stat -c %b k2) -lt $(stat -c %b k) || fail=1

 Exit $fail