]> www.infradead.org Git - users/hch/xfstests-dev.git/commitdiff
btrfs/157: use _btrfs_get_first_logical
authorChristoph Hellwig <hch@lst.de>
Fri, 27 May 2022 08:19:11 +0000 (10:19 +0200)
committerZorro Lang <zlang@kernel.org>
Sat, 28 May 2022 07:11:57 +0000 (15:11 +0800)
Use the _btrfs_get_first_logical helper instead of open coding it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/btrfs/157

index 343178b7c06b1b1a49afbbf2514914b154c174fc..022db51166dbc7d1619592a94ab2dabf5a557844 100755 (executable)
@@ -71,7 +71,7 @@ _scratch_mount $(_btrfs_no_v1_cache_opt)
 $XFS_IO_PROG -f -d -c "pwrite -S 0xaa 0 128K" -c "fsync" \
        "$SCRATCH_MNT/foobar" | _filter_xfs_io
 
-logical=`${FILEFRAG_PROG} -v $SCRATCH_MNT/foobar | _filter_filefrag | cut -d '#' -f 1`
+logical=$(_btrfs_get_first_logical $SCRATCH_MNT/foobar)
 _scratch_unmount
 
 phy0=$(get_physical 0)