]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
078: xfs_repair should be run against the losetup'd device, not the image file
authorJeff Moyer <jmoyer@redhat.com>
Fri, 11 Feb 2011 22:04:37 +0000 (17:04 -0500)
committerChristoph Hellwig <hch@lst.de>
Sun, 13 Feb 2011 11:59:20 +0000 (12:59 +0100)
commit882c8684b14ba6623130e9a495207e0e44bbd664
treeb4edfc23c064009f8392ea77630c26b93e2d6252
parent2dbd21dc152d89715263990c881025f17c7b632e
078: xfs_repair should be run against the losetup'd device, not the image file

When running test 078 against a 4k logical block sized disk, it fails in
xfs_repair.  The problem is that xfs_repair is passed the loopback
filename instead of the actual loop device.  This means that it opens
the file O_DIRECT, and tries to do 512 byte aligned I/O to a 4k sector
device.  The loop device, for better or for worse, will do buffered I/O,
and thus does not suffer from the same problem.  So, the attached patch
sets up the loop device and passes that to xfs_repair.  This resolves
the issue on my test system.

Comments are more than welcome.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
078