From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>,
qemu-block@nongnu.org, Juan Quintela <quintela@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>
Subject: Re: [PATCH 4/5] block: add trace point when fdatasync fails
Date: Thu, 15 Apr 2021 17:34:39 +0100 [thread overview]
Message-ID: <YHhrH5FFGZT+f1I+@work-vm> (raw)
In-Reply-To: <20210415135851.862406-5-berrange@redhat.com>
* Daniel P. Berrangé (berrange@redhat.com) wrote:
> A flush failure is a critical failure scenario for some operations.
> For example, it will prevent migration from completing, as it will
> make vm_stop() report an error. Thus it is important to have a
> trace point present for debugging.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
I'd have had to admit to not having thought that would fail; the fact
we're debugging something where it does, suggests it's a good idea!
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> ---
> block/file-posix.c | 2 ++
> block/trace-events | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/block/file-posix.c b/block/file-posix.c
> index 99cf452f84..6aafeda44f 100644
> --- a/block/file-posix.c
> +++ b/block/file-posix.c
> @@ -1362,6 +1362,8 @@ static int handle_aiocb_flush(void *opaque)
>
> ret = qemu_fdatasync(aiocb->aio_fildes);
> if (ret == -1) {
> + trace_file_flush_fdatasync_failed(errno);
> +
> /* There is no clear definition of the semantics of a failing fsync(),
> * so we may have to assume the worst. The sad truth is that this
> * assumption is correct for Linux. Some pages are now probably marked
> diff --git a/block/trace-events b/block/trace-events
> index 1a12d634e2..c8a943e992 100644
> --- a/block/trace-events
> +++ b/block/trace-events
> @@ -206,6 +206,7 @@ file_copy_file_range(void *bs, int src, int64_t src_off, int dst, int64_t dst_of
> file_FindEjectableOpticalMedia(const char *media) "Matching using %s"
> file_setup_cdrom(const char *partition) "Using %s as optical disc"
> file_hdev_is_sg(int type, int version) "SG device found: type=%d, version=%d"
> +file_flush_fdatasync_failed(int err) "errno %d"
>
> # sheepdog.c
> sheepdog_reconnect_to_sdog(void) "Wait for connection to be established"
> --
> 2.30.2
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2021-04-15 16:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-15 13:58 [PATCH 0/5] block, migration: improve debugging of migration bdrv_flush failure Daniel P. Berrangé
2021-04-15 13:58 ` [PATCH 1/5] migration: add trace point when vm_stop_force_state fails Daniel P. Berrangé
2021-04-15 16:30 ` Dr. David Alan Gilbert
2021-04-15 13:58 ` [PATCH 2/5] softmmu: add trace point when bdrv_flush_all fails Daniel P. Berrangé
2021-04-15 16:31 ` Dr. David Alan Gilbert
2021-04-15 13:58 ` [PATCH 3/5] block: preserve errno from fdatasync failures Daniel P. Berrangé
2021-04-15 13:58 ` [PATCH 4/5] block: add trace point when fdatasync fails Daniel P. Berrangé
2021-04-15 16:34 ` Dr. David Alan Gilbert [this message]
2021-04-15 13:58 ` [PATCH 5/5] block: remove duplicate trace.h include Daniel P. Berrangé
2021-04-15 16:37 ` Dr. David Alan Gilbert
2021-04-15 19:33 ` [PATCH 0/5] block, migration: improve debugging of migration bdrv_flush failure Connor Kuehl
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=YHhrH5FFGZT+f1I+@work-vm \
--to=dgilbert@redhat.com \
--cc=berrange@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=richard.henderson@linaro.org \
/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;
as well as URLs for NNTP newsgroup(s).