mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
btrfs/004: fix filefrag filter for files with 1 block only
If the file consists of a single block, then filefrag mentions '1 block of ...', and the filter expected 'blocks of ...'. Example: $ echo qwerty > foobar $ filefrag -v foobar Filesystem type is: ef53 File size of foobar is 7 (1 block of 4096 bytes) ext: logical_offset: physical_offset: length: expected: flags: 0: 0.. 0: 0.. 0: 1: unknown,delalloc,eof foobar: 1 extent found Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
9631a1fc06
commit
73d944303a
+1
-1
@@ -58,7 +58,7 @@ _require_command "/usr/sbin/filefrag"
|
||||
rm -f $seqres.full
|
||||
|
||||
FILEFRAG_FILTER='
|
||||
if (/blocks of (\d+) bytes/) {
|
||||
if (/blocks? of (\d+) bytes/) {
|
||||
$blocksize = $1;
|
||||
next
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user