From: Kevin Wolf <kwolf@redhat.com>
To: qemu-block@nongnu.org
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [PULL 1/8] block: drop force_dup parameter of raw_reconfigure_getfd()
Date: Tue, 11 Jun 2024 19:36:51 +0200 [thread overview]
Message-ID: <20240611173658.231831-2-kwolf@redhat.com> (raw)
In-Reply-To: <20240611173658.231831-1-kwolf@redhat.com>
From: "Denis V. Lunev via" <qemu-block@nongnu.org>
Since commit 72373e40fbc, this parameter is always passed as 'false'
from the caller.
Signed-off-by: Denis V. Lunev <den@openvz.org>
CC: Andrey Zhadchenko <andrey.zhadchenko@virtuozzo.com>
CC: Kevin Wolf <kwolf@redhat.com>
CC: Hanna Reitz <hreitz@redhat.com>
Message-ID: <20240430170213.148558-1-den@openvz.org>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
block/file-posix.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/block/file-posix.c b/block/file-posix.c
index 35684f7e21..5c46938936 100644
--- a/block/file-posix.c
+++ b/block/file-posix.c
@@ -1039,8 +1039,7 @@ static int fcntl_setfl(int fd, int flag)
}
static int raw_reconfigure_getfd(BlockDriverState *bs, int flags,
- int *open_flags, uint64_t perm, bool force_dup,
- Error **errp)
+ int *open_flags, uint64_t perm, Error **errp)
{
BDRVRawState *s = bs->opaque;
int fd = -1;
@@ -1068,7 +1067,7 @@ static int raw_reconfigure_getfd(BlockDriverState *bs, int flags,
assert((s->open_flags & O_ASYNC) == 0);
#endif
- if (!force_dup && *open_flags == s->open_flags) {
+ if (*open_flags == s->open_flags) {
/* We're lucky, the existing fd is fine */
return s->fd;
}
@@ -3748,8 +3747,7 @@ static int raw_check_perm(BlockDriverState *bs, uint64_t perm, uint64_t shared,
int ret;
/* We may need a new fd if auto-read-only switches the mode */
- ret = raw_reconfigure_getfd(bs, input_flags, &open_flags, perm,
- false, errp);
+ ret = raw_reconfigure_getfd(bs, input_flags, &open_flags, perm, errp);
if (ret < 0) {
return ret;
} else if (ret != s->fd) {
--
2.45.2
next prev parent reply other threads:[~2024-06-11 17:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-11 17:36 [PULL 0/8] Block layer patches Kevin Wolf
2024-06-11 17:36 ` Kevin Wolf [this message]
2024-06-11 17:36 ` [PULL 2/8] Revert "monitor: use aio_co_reschedule_self()" Kevin Wolf
2024-06-11 17:36 ` [PULL 3/8] aio: warn about iohandler_ctx special casing Kevin Wolf
2024-06-11 17:36 ` [PULL 4/8] qemu-io: add cvtnum() error handling for zone commands Kevin Wolf
2024-06-11 17:36 ` [PULL 5/8] block/copy-before-write: use uint64_t for timeout in nanoseconds Kevin Wolf
2024-06-11 17:36 ` [PULL 6/8] linux-aio: add IO_CMD_FDSYNC command support Kevin Wolf
2024-06-11 17:36 ` [PULL 7/8] block/crypto: create ciphers on demand Kevin Wolf
2024-06-11 17:36 ` [PULL 8/8] crypto/block: drop qcrypto_block_open() n_threads argument Kevin Wolf
2024-06-13 14:51 ` [PULL 0/8] Block layer patches Richard Henderson
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=20240611173658.231831-2-kwolf@redhat.com \
--to=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).