aboutsummaryrefslogtreecommitdiff
path: root/block/file-posix.c
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2021-04-15 14:28:16 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2021-06-14 13:28:50 +0100
commit60ff2ae2a21ddc11cc7284194a3013ff864ac03c (patch)
tree751d038c9cea0cf033a8c94e318ad3497ea8ea74 /block/file-posix.c
parentc7ddc8821d88d958bb6d4ef1279ec3609b17ffda (diff)
block: add trace point when fdatasync fails
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. Reviewed-by: Connor Kuehl <ckuehl@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'block/file-posix.c')
-rw-r--r--block/file-posix.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/file-posix.c b/block/file-posix.c
index 5ff78ecb34..4189b2bfa6 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1338,6 +1338,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