btrfs/004: fix filefrag filter for files with 1 block only
authorFilipe David Borba Manana <fdmanana@gmail.com>
Tue, 22 Apr 2014 00:46:34 +0000 (10:46 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 22 Apr 2014 00:46:34 +0000 (10:46 +1000)
commit73d944303ae92d7a7f71bbf1bba6dfd758450c71
tree8105866657b9b030627bdff46d1323e515d7f3b9
parent9631a1fc063e3315a01f48c64c4718bb1dc8bd11
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>
tests/btrfs/004