qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hanna Reitz <hreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>, Hanna Reitz <hreitz@redhat.com>,
	Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>,
	qemu-devel@nongnu.org
Subject: [PATCH v3 0/6] block-status cache for data regions
Date: Thu, 12 Aug 2021 10:41:42 +0200	[thread overview]
Message-ID: <20210812084148.14458-1-hreitz@redhat.com> (raw)

Hi,

See the cover letter from v1 for the general idea:
https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg00843.html

Cover letter from v2, introducing RCU locking:
https://lists.nongnu.org/archive/html/qemu-block/2021-06/msg01060.html


v3:
- Patch 2:
  - Add rcu_head object to BdrvBlockStatusCache, so we can use
    g_free_rcu() to free it instead of synchronize_rcu()+g_free()
  - Use qatomic_rcu_read() every time we read bs->block_status_cache
    (except in bdrv_close(), where no concurrency is possible)
  - Use RCU_READ_LOCK_GUARD() instead of WITH_RCU_READ_LOCK_GUARD() in
    functions where we lock the whole scope anyway
  - Same for QEMU_LOCK_GUARD() instead of WITH_QEMU_LOCK_GUARD() in
    bdrv_bsc_fill()
  - Drop from_cache variable in bdrv_co_block_status()
    (was an artifact from v1, which had a different control flow and
    needed this variable)
  - Assert that local_map returned from a protocol driver’s
    bdrv_co_block_status() implementation is equal to the offset we
    passed to it (see comment there for why we should do this)

- Patch 3:
  - Add note why block drivers should return larger *pnum values in
    addition to just saying that it’s allowed


git-backport-diff against v2:

Key:
[----] : patches are identical
[####] : number of functional differences between upstream/downstream patch
[down] : patch is downstream-only
The flags [FC] indicate (F)unctional and (C)ontextual differences, respectively

001/6:[----] [--] 'block: Drop BDS comment regarding bdrv_append()'
002/6:[0063] [FC] 'block: block-status cache for data regions'
003/6:[0004] [FC] 'block: Clarify that @bytes is no limit on *pnum'
004/6:[----] [--] 'block/file-posix: Do not force-cap *pnum'
005/6:[----] [--] 'block/gluster: Do not force-cap *pnum'
006/6:[----] [--] 'block/iscsi: Do not force-cap *pnum'


Hanna Reitz (6):
  block: Drop BDS comment regarding bdrv_append()
  block: block-status cache for data regions
  block: Clarify that @bytes is no limit on *pnum
  block/file-posix: Do not force-cap *pnum
  block/gluster: Do not force-cap *pnum
  block/iscsi: Do not force-cap *pnum

 include/block/block_int.h | 61 +++++++++++++++++++++++++++--
 block.c                   | 80 +++++++++++++++++++++++++++++++++++++++
 block/file-posix.c        |  7 ++--
 block/gluster.c           |  7 ++--
 block/io.c                | 65 +++++++++++++++++++++++++++++--
 block/iscsi.c             |  3 --
 6 files changed, 207 insertions(+), 16 deletions(-)

-- 
2.31.1



             reply	other threads:[~2021-08-12  8:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-12  8:41 Hanna Reitz [this message]
2021-08-12  8:41 ` [PATCH v3 1/6] block: Drop BDS comment regarding bdrv_append() Hanna Reitz
2021-08-12  8:41 ` [PATCH v3 2/6] block: block-status cache for data regions Hanna Reitz
2021-08-16 21:38   ` Eric Blake
2021-08-17  6:19     ` Hanna Reitz
2021-08-25  9:54   ` Vladimir Sementsov-Ogievskiy
2021-08-12  8:41 ` [PATCH v3 3/6] block: Clarify that @bytes is no limit on *pnum Hanna Reitz
2021-08-17 15:03   ` Eric Blake
2021-08-12  8:41 ` [PATCH v3 4/6] block/file-posix: Do not force-cap *pnum Hanna Reitz
2021-08-12  8:41 ` [PATCH v3 5/6] block/gluster: " Hanna Reitz
2021-08-12  8:41 ` [PATCH v3 6/6] block/iscsi: " Hanna Reitz
2021-09-07  9:23 ` [PATCH v3 0/6] block-status cache for data regions Hanna Reitz

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=20210812084148.14458-1-hreitz@redhat.com \
    --to=hreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=vsementsov@virtuozzo.com \
    /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).