From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] xfs_copy: flush target devices before exiting
Date: Mon, 8 Jun 2020 11:45:10 -0700 [thread overview]
Message-ID: <20200608184510.GK1334206@magnolia> (raw)
In-Reply-To: <20200608184400.GJ1334206@magnolia>
On Mon, Jun 08, 2020 at 11:44:00AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> 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@oracle.com>
> ---
> 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) {
prev parent reply other threads:[~2020-06-08 18:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-08 18:44 [PATCH] xfs_copy: flush target devices before exiting Darrick J. Wong
2020-06-08 18:45 ` Darrick J. Wong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200608184510.GK1334206@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox