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>
1 file changed