fix xfs_copy betwen devices with mismatching sizes
This fixes copy between devices with different alignment requirements. xfs/601 trigges this when TEST_DIR is on a device that requires minimal alignment, but SCRATCH_DEV is on a device that requires more alignment.
PATCH 1/2 copy: log the error number when failing to write
Log the string form of the errno value to help debugging a failed write.
Signed-off-by Christoph Hellwig <[email protected]>
--- copy/xfs_copy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
copy/xfs_copy.c +2 -2
@@ -891,8 +891,8 @@ main(int argc, char **argv) off -=XFS_MAX_SECTORSIZE ; len =pwrite (target[i].fd, lb,XFS_MAX_SECTORSIZE , off);if (len <0 ) { -do_log (_ ("%s: failed to write last block\n" ), - progname); +do_log (_ ("%s: failed to write last block: %s\n" ), + progname,strerror (errno));do_log (_ ("\tIs target \"%s\" too small?\n" ), target[i].name);die_perror ();
Signature · 1 line
2.53.0