qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: qemu-block@nongnu.org
Cc: qemu-devel@nongnu.org, hreitz@redhat.com, kwolf@redhat.com,
	vsementsov@virtuozzo.com
Subject: [PATCH 0/5] Fix not white-listed copy-before-write
Date: Mon, 20 Sep 2021 14:55:33 +0300	[thread overview]
Message-ID: <20210920115538.264372-1-vsementsov@virtuozzo.com> (raw)

Hi all!

As reported in https://bugzilla.redhat.com/show_bug.cgi?id=2004812
backup don't work when copy-before-write is not white-listed.

Yes, we do need copy-before-write filter for backup to work (like we
always use copy-on-read filter in block-stream).
The problem is that in bdrv_insert_node() (called to insert filters
internally) we use bdrv_open(), which does a lot of things we don't need
for internal node creation and among them check the white-list.

Backup job should of course work when copy-before-write is not
white-listed. As well, block-stream should work with not-white-listed
copy-on-read. White-list is for user, not for internal implementation.

Following Kevin's suggestion fix the problem by implementing a version
of bdrv_new_open_driver() that supports QDict of options, and use it
instead of bdrv_open().

Vladimir Sementsov-Ogievskiy (5):
  block: implement bdrv_new_open_driver_opts()
  block: bdrv_insert_node(): fix and improve error handling
  block: bdrv_insert_node(): doc and style
  block: bdrv_insert_node(): don't use bdrv_open()
  iotests/image-fleecing: declare requirement of copy-before-write

 include/block/block.h                   |  4 ++
 block.c                                 | 77 ++++++++++++++++++++-----
 tests/qemu-iotests/tests/image-fleecing |  1 +
 3 files changed, 68 insertions(+), 14 deletions(-)

-- 
2.29.2



             reply	other threads:[~2021-09-20 11:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20 11:55 Vladimir Sementsov-Ogievskiy [this message]
2021-09-20 11:55 ` [PATCH 1/5] block: implement bdrv_new_open_driver_opts() Vladimir Sementsov-Ogievskiy
2021-09-20 11:55 ` [PATCH 2/5] block: bdrv_insert_node(): fix and improve error handling Vladimir Sementsov-Ogievskiy
2021-09-20 11:55 ` [PATCH 3/5] block: bdrv_insert_node(): doc and style Vladimir Sementsov-Ogievskiy
2021-09-20 11:55 ` [PATCH 4/5] block: bdrv_insert_node(): don't use bdrv_open() Vladimir Sementsov-Ogievskiy
2021-09-21 14:33   ` Kevin Wolf
2021-09-20 11:55 ` [PATCH 5/5] iotests/image-fleecing: declare requirement of copy-before-write 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=20210920115538.264372-1-vsementsov@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=hreitz@redhat.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).