xfsdump/xfsrestore: don't use O_DIRECT on the RT device
For undocumented reasons xfsdump and xfsrestore use O_DIRECT for RT
files On a rt device with 4k sector size this runs into alignment
issues, e.g. xfs/060 fails with this message:
xfsrestore: attempt to write 237568 bytes to dumpdir/large000 at offset 54947844 failed: Invalid argument
Switch to using buffered I/O to match the main device and remove all
the code to align to the minimum direct I/O size and make these
alignment issues go away.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
3 files changed