]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: automatically enable -f (file) mode when needed
authorEric Sandeen <sandeen@sandeen.net>
Tue, 23 Jun 2015 01:37:38 +0000 (11:37 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 23 Jun 2015 01:37:38 +0000 (11:37 +1000)
commita5d34ab7e9905961f27daf161bb135df217ddf4a
treec3faa5dd69b7b86eab6c81d4654f80dd565020e9
parent66de82b8c149b312c1c38dd2bcb5310096ce76e9
xfs_repair: automatically enable -f (file) mode when needed

If we specify "-f" to xfs_repair, it recognizes that it's working
on a file, and if the underlying filesystem sector size differs
such that direct IO won't work, it disables direct IO.

It's odd, though, that we'd need to specify this, and the failure
is non-obvious:

# xfs_repair /mnt/test/foo.img
Phase 1 - find and verify superblock...
xfs_repair: read failed: Invalid argument

I see no advantage to requiring the administrator to jump through
this hoop; why not just detect that it's a file, and move on?

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
repair/xfs_repair.c