* [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd()
@ 2024-04-30 17:02 Denis V. Lunev via
2024-05-17 16:37 ` Denis V. Lunev
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Denis V. Lunev via @ 2024-04-30 17:02 UTC (permalink / raw)
To: qemu-block, qemu-devel; +Cc: den, Andrey Zhadchenko, Kevin Wolf, Hanna Reitz
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>
---
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.40.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd()
2024-04-30 17:02 [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd() Denis V. Lunev via
@ 2024-05-17 16:37 ` Denis V. Lunev
2024-05-28 14:31 ` Denis V. Lunev
2024-05-28 15:14 ` Kevin Wolf
2 siblings, 0 replies; 4+ messages in thread
From: Denis V. Lunev @ 2024-05-17 16:37 UTC (permalink / raw)
To: Denis V. Lunev, qemu-block, qemu-devel
Cc: Andrey Zhadchenko, Kevin Wolf, Hanna Reitz
On 4/30/24 19:02, Denis V. Lunev wrote:
> 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>
> ---
> 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) {
ping
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd()
2024-04-30 17:02 [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd() Denis V. Lunev via
2024-05-17 16:37 ` Denis V. Lunev
@ 2024-05-28 14:31 ` Denis V. Lunev
2024-05-28 15:14 ` Kevin Wolf
2 siblings, 0 replies; 4+ messages in thread
From: Denis V. Lunev @ 2024-05-28 14:31 UTC (permalink / raw)
To: Denis V. Lunev, qemu-block, qemu-devel
Cc: Andrey Zhadchenko, Kevin Wolf, Hanna Reitz
On 4/30/24 19:02, Denis V. Lunev wrote:
> 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>
> ---
> 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) {
ping v2
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd()
2024-04-30 17:02 [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd() Denis V. Lunev via
2024-05-17 16:37 ` Denis V. Lunev
2024-05-28 14:31 ` Denis V. Lunev
@ 2024-05-28 15:14 ` Kevin Wolf
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Wolf @ 2024-05-28 15:14 UTC (permalink / raw)
To: Denis V. Lunev; +Cc: qemu-block, qemu-devel, Andrey Zhadchenko, Hanna Reitz
Am 30.04.2024 um 19:02 hat Denis V. Lunev via geschrieben:
> 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>
Let me add a "Since commit 72373e40fbc" to the commit message.
Thanks, applied to the block branch.
Kevin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-28 15:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-30 17:02 [PATCH 1/1] block: drop force_dup parameter of raw_reconfigure_getfd() Denis V. Lunev via
2024-05-17 16:37 ` Denis V. Lunev
2024-05-28 14:31 ` Denis V. Lunev
2024-05-28 15:14 ` Kevin Wolf
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).