From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>, Max Reitz <mreitz@redhat.com>
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
qemu-devel@nongnu.org
Subject: Re: [PATCH 5/6] block/nbd: Do not force-cap *pnum
Date: Sat, 19 Jun 2021 14:12:12 +0300 [thread overview]
Message-ID: <656b17d3-0cc1-e1da-431d-133ab5502eb1@virtuozzo.com> (raw)
In-Reply-To: <20210618202020.3t777osf6doytjal@redhat.com>
18.06.2021 23:20, Eric Blake wrote:
> On Thu, Jun 17, 2021 at 05:52:46PM +0200, Max Reitz wrote:
>> bdrv_co_block_status() does it for us, we do not need to do it here.
>>
>> The advantage of not capping *pnum is that bdrv_co_block_status() can
>> cache larger data regions than requested by its caller.
>>
>> Signed-off-by: Max Reitz <mreitz@redhat.com>
>> ---
>> block/nbd.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Reviewed-by: Eric Blake <eblake@redhat.com>
>
>>
>> diff --git a/block/nbd.c b/block/nbd.c
>> index 616f9ae6c4..930bd234de 100644
>> --- a/block/nbd.c
>> +++ b/block/nbd.c
>> @@ -1702,7 +1702,7 @@ static int coroutine_fn nbd_client_co_block_status(
>> .type = NBD_CMD_BLOCK_STATUS,
>> .from = offset,
>> .len = MIN(QEMU_ALIGN_DOWN(INT_MAX, bs->bl.request_alignment),
>> - MIN(bytes, s->info.size - offset)),
>> + s->info.size - offset),
>> .flags = NBD_CMD_FLAG_REQ_ONE,
>
> I'd love to someday get rid of using NBD_CMD_FLAG_REQ_ONE (so the
> server can reply with more extents in one go), but that's a bigger
> task and unrelated to your block-layer cache.
>
I think for this to work, the generic block_status should be updated so we can work with several extents in one go.
--
Best regards,
Vladimir
next prev parent reply other threads:[~2021-06-19 11:13 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-17 15:52 [PATCH 0/6] block: block-status cache for data regions Max Reitz
2021-06-17 15:52 ` [PATCH 1/6] block: Drop BDS comment regarding bdrv_append() Max Reitz
2021-06-18 17:42 ` Eric Blake
2021-06-19 9:38 ` Vladimir Sementsov-Ogievskiy
2021-06-17 15:52 ` [PATCH 2/6] block: block-status cache for data regions Max Reitz
2021-06-18 18:51 ` Eric Blake
2021-06-21 9:37 ` Max Reitz
2021-06-19 10:20 ` Vladimir Sementsov-Ogievskiy
2021-06-21 10:05 ` Max Reitz
2021-06-17 15:52 ` [PATCH 3/6] block/file-posix: Do not force-cap *pnum Max Reitz
2021-06-18 20:16 ` Eric Blake
2021-06-21 9:38 ` Max Reitz
2021-06-19 10:32 ` Vladimir Sementsov-Ogievskiy
2021-06-17 15:52 ` [PATCH 4/6] block/gluster: " Max Reitz
2021-06-18 20:17 ` Eric Blake
2021-06-19 10:36 ` Vladimir Sementsov-Ogievskiy
2021-06-21 9:47 ` Max Reitz
2021-06-17 15:52 ` [PATCH 5/6] block/nbd: " Max Reitz
2021-06-18 20:20 ` Eric Blake
2021-06-19 11:12 ` Vladimir Sementsov-Ogievskiy [this message]
2021-06-19 10:53 ` Vladimir Sementsov-Ogievskiy
2021-06-21 9:50 ` Max Reitz
2021-06-21 18:54 ` Eric Blake
2021-06-21 18:53 ` Eric Blake
2021-06-22 9:07 ` Vladimir Sementsov-Ogievskiy
2021-06-17 15:52 ` [PATCH 6/6] block/iscsi: " Max Reitz
2021-06-18 20:20 ` Eric Blake
2021-06-19 11:13 ` Vladimir Sementsov-Ogievskiy
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=656b17d3-0cc1-e1da-431d-133ab5502eb1@virtuozzo.com \
--to=vsementsov@virtuozzo.com \
--cc=eblake@redhat.com \
--cc=kwolf@redhat.com \
--cc=mreitz@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.