From: Max Reitz <mreitz@redhat.com>
To: David Edmondson <david.edmondson@oracle.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Subject: Re: [PATCH v2 1/2] block: report errno when flock fcntl fails
Date: Wed, 6 Jan 2021 10:48:09 +0100 [thread overview]
Message-ID: <f70e8b9b-2e28-7bd8-c260-c86952eeba0a@redhat.com> (raw)
In-Reply-To: <20201221134931.1194806-2-david.edmondson@oracle.com>
On 21.12.20 14:49, David Edmondson wrote:
> When a call to fcntl(2) for the purpose of manipulating file locks
> fails, report the error returned by fcntl.
>
> Signed-off-by: David Edmondson <david.edmondson@oracle.com>
> ---
> block/file-posix.c | 20 +++++-----
> tests/qemu-iotests/153.out | 76 +++++++++++++++++++-------------------
> tests/qemu-iotests/182.out | 2 +-
> 3 files changed, 49 insertions(+), 49 deletions(-)
tests/qemu-iotests/296.out also needs to be adjusted (found by grepping
for 'Failed to get').
And now I might as well add this idea: EAGAIN is the most common errno
when flock fcntl fails, so would it make sense to generate a custom
error message then? I’d like to think we could do better than “Resource
temporarily unavailable”, e.g. perhaps “Lock is already taken”.
OTOH, “Resource temporarily unavailable” isn’t *that* bad, so if you
don’t want to, I won’t push for it.
Max
next prev parent reply other threads:[~2021-01-06 9:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-21 13:49 [PATCH v2 0/2] block: report errno when flock fcntl fails David Edmondson
2020-12-21 13:49 ` [PATCH v2 1/2] " David Edmondson
2020-12-22 14:31 ` Philippe Mathieu-Daudé
2021-01-06 9:48 ` Max Reitz [this message]
2021-01-06 11:58 ` David Edmondson
2020-12-21 13:49 ` [PATCH v2 2/2] tests: Collapse echoed JSON input to a single line David Edmondson
2021-01-06 9:49 ` Max Reitz
2021-01-06 17:20 ` David Edmondson
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=f70e8b9b-2e28-7bd8-c260-c86952eeba0a@redhat.com \
--to=mreitz@redhat.com \
--cc=david.edmondson@oracle.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.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).