On Mon, Jun 08, 2020 at 11:44:00AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > Flush the devices we're copying to before exiting, so that we can report > any write errors. > > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > copy/xfs_copy.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/copy/xfs_copy.c b/copy/xfs_copy.c > index 2d087f71..45ee2e06 100644 > --- a/copy/xfs_copy.c > +++ b/copy/xfs_copy.c > @@ -12,6 +12,7 @@ > #include <stdarg.h> > #include "xfs_copy.h" > #include "libxlog.h" > +#include "libfrog/platform.h" > > #define rounddown(x, y) (((x)/(y))*(y)) > #define uuid_equal(s,d) (platform_uuid_compare((s),(d)) == 0) > @@ -150,6 +151,9 @@ check_errors(void) > else > do_log(_("lseek error")); > do_log(_(" at offset %lld\n"), target[i].position); > + } else if (platform_flush_device(target[i].fd, 0)) { > + do_log(_(" %s -- flush error %d"), > + target[i].name, errno); NAK, this should set first_error. Boooo... --D > } > } > if (first_error == 0) {