On Fri, 05/06 09:49, Kevin Wolf wrote:
> Am 05.05.2016 um 02:32 hat Fam Zheng geschrieben:
> > On Wed, 05/04 12:12, Kevin Wolf wrote:
> > > Am 19.04.2016 um 03:42 hat Fam Zheng geschrieben:
> > > > Currently we only inactivate the top BDS. Actually bdrv_inactivate
> > > > should be the opposite of
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/153 | 191 +++
tests/qemu-iotests/153.out | 241 +
tests/qemu-iotests/group | 1 +
3 files changed, 433 insertions(+)
create mode 100755
Now that test cases are covered, we can turn it on. RO (shared) lock is
disabled to allow existing libguestfs use cases (invoking QEMU for
reading image that is exclusively locked by another QEMU).
Signed-off-by: Fam Zheng
---
block.c| 7 +++
blockdev.c | 2 +-
2 files
We should wait for the QEMU process to terminate and close the image
before we check the data.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/091 | 3 +++
tests/qemu-iotests/091.out | 1 +
2 files changed, 4 insertions(+)
diff --git a/tests/qemu-iotests/091
Otherwise the error handling we are expceting will be masked by the
preceding image locking check, and is going to be indistinguishable
because the error messages are all the same.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/087 | 6 ++
1 file changed, 6 insertions(+)
The VM is still on, the image locking check would complain.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/140 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/140 b/tests/qemu-iotests/140
index 49f9df4..3be656a 100755
---
With image locking, opening /dev/null can fail when multiple tests run
in parallel (make -j2, for example). Use null-co:// as the null protocol
doesn't do image locking.
While it's arguable we could special-case /dev/null, /dev/zero,
/dev/urandom etc in raw-posix driver, it is not really
The cases is about live snapshot features. Disable image locking because
otherwise a few tests are going to fail because we reuse the same images
at blockdev-add.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/085 | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff
The VM is running, qemu-io would fail the lock acquisition.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/030 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
index 3ac2443..fa996ef 100755
---
Signed-off-by: Fam Zheng
---
qemu-nbd.c| 7 ++-
qemu-nbd.texi | 2 ++
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index c55b40f..a675a19 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -95,6 +95,7 @@ static void usage(const char
In sync=none the backing image of s->target is s->common.bs, which could
be exclusively locked, the image locking wouldn't work here.
Later we can update completion code to lock it after the replaced node
has dropped its lock.
Signed-off-by: Fam Zheng
---
blockdev.c | 6 ++
So the image lock won't complain.
Signed-off-by: Fam Zheng
---
tests/qemu-iotests/046 | 22 --
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/tests/qemu-iotests/046 b/tests/qemu-iotests/046
index e528b67..365658e 100755
---
As a very special case, in sync=none mode, the source, as the backing
image of the target, will be RO opened again, which is not accepted by
image locking because the first open could be exclusive.
Signed-off-by: Fam Zheng
---
blockdev.c | 5 +
1 file changed, 5
If specified, BDRV_O_NO_LOCK flag will be set when opening the image.
Signed-off-by: Fam Zheng
---
qemu-img.c | 89 ++
1 file changed, 72 insertions(+), 17 deletions(-)
diff --git a/qemu-img.c b/qemu-img.c
index
virtlockd in libvirt locks the first byte, we lock byte 1 to avoid
the intervene.
Both file and host device protocols are covered.
Suggested-by: "Daniel P. Berrange"
Signed-off-by: Fam Zheng
---
block/raw-posix.c | 22 ++
1 file
They are wrappers of POSIX fcntl file locking, with the additional
interception of open/close (through qemu_open and qemu_close) to offer a
better semantics that preserves the locks across multiple life cycles of
different fds on the same file. The reason to make this semantics
change over the
This takes care both the CLOEXEC flag and fd-path mapping for image
locking.
Signed-off-by: Fam Zheng
---
include/qemu/osdep.h | 1 +
util/osdep.c | 15 +++
2 files changed, 16 insertions(+)
diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index
As parts of the transactional reopen, they are not necessary outside
block.c. Make them static.
Signed-off-by: Fam Zheng
---
block.c | 6 --
include/block/block.h | 2 --
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/block.c b/block.c
index
Stash the locking state into BDRVReopenState. If it was locked, unlock
in prepare, and lock it again when commit or abort.
Signed-off-by: Fam Zheng
---
block.c | 11 +++
include/block/block.h | 1 +
2 files changed, 12 insertions(+)
diff --git a/block.c
Signed-off-by: Fam Zheng
---
block/raw-posix.c | 10 +-
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 906d5c9..4e4d0d2 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -644,15 +644,7 @@ static int
Honor the locking switch specified in CLI or QMP, and set the open flags for
the image accordingly.
Signed-off-by: Fam Zheng
---
blockdev.c | 12
1 file changed, 12 insertions(+)
diff --git a/blockdev.c b/blockdev.c
index f1f520a..200fa56 100644
--- a/blockdev.c
Signed-off-by: Fam Zheng
---
block.c | 5 +
include/block/block.h | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/block.c b/block.c
index 16c7d58..bb7ebed 100644
--- a/block.c
+++ b/block.c
@@ -880,6 +880,11 @@ static int
Later the block layer will automatically lock the images to avoid unexpected
concurrent accesses to the same image, which will easily corrupt the metadata
or user data, unless in some very special cases, like migration.
The exceptional cases like shared storage migration and testing should set
To allow overriding the default locking behavior when opening the image.
Signed-off-by: Fam Zheng
---
qapi/block-core.json | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/qapi/block-core.json b/qapi/block-core.json
index 1d09079..2913f3e 100644
---
v4: Don't lock RO image. [Rich]
v3: Highlight is handling of image locks during close(3) and bdrv_reopen(). A
number of new patches are added consequently.
Fam Zheng (27):
block: Add BDRV_O_NO_LOCK
qapi: Add lock-image in blockdev-add options
blockdev: Add and parse "lock-image"
On 08.05.2016 05:16, Eric Blake wrote:
> Make it easier to test block drivers with BDRV_REQ_FUA in
> .supported_write_flags, by adding the '-f' flag to qemu-io to
> conditionally pass the flag through to specific writes ('write',
> 'write -z', 'writev', 'aio_write', 'aio_write -z'). You'll want
>
On Fri, May 06, 2016 at 03:32:15PM +0200, Max Reitz wrote:
> On 18.04.2016 14:21, Daniel P. Berrange wrote:
> > This adds support for testing the LUKS driver with the block
> > I/O test framework.
> >
> >cd tests/qemu-io-tests
> >./check -luks
> >
> > A handful of test cases are modified
On 19/04/2016 11:09, Stefan Hajnoczi wrote:
>> > This has better performance because it executes fewer system calls
>> > and does not use a bottom half per disk.
> Each aio_context_t is initialized for 128 in-flight requests in
> laio_init().
>
> Will it be possible to hit the limit now that
On 05/09/2016 04:03 AM, Kevin Wolf wrote:
> Signed-off-by: Kevin Wolf
> ---
> qemu-io-cmds.c | 1 +
> 1 file changed, 1 insertion(+)
Reviewed-by: Eric Blake
Perhaps it would be easier to convert all the mid-function returns into
'goto cleanup', so that we
On Fri 06 May 2016 07:54:36 PM CEST, John Snow wrote:
@@ -3694,18 +3696,18 @@ static BlockJob *find_block_job(const char
*device, AioContext **aio_context,
*aio_context = NULL;
-blk = blk_by_name(device);
-if (!blk) {
+bs =
On 28/04/2016 17:37, Michael S. Tsirkin wrote:
> > All the internally-emulated devices *can* be either translated or
> > untranslated. That's just a matter of software. Surely, you currently
> > *can't* have translated assigned devices (until someone implements the
> > whole VT-d page table
On 22/04/2016 17:05, Kevin Wolf wrote:
> From: Fam Zheng
>
> aio_poll doesn't poll the external nodes so this should never be true,
> but aio_ctx_dispatch may get notified by the events from GSource. To
> make bdrv_drained_begin effective in main loop, we should check the
>
Signed-off-by: Kevin Wolf
---
qemu-io-cmds.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c
index e34f777..41580b5 100644
--- a/qemu-io-cmds.c
+++ b/qemu-io-cmds.c
@@ -1699,6 +1699,7 @@ static int aio_write_f(BlockBackend *blk, int argc,
On 05/06/2016 11:20 PM, Max Reitz wrote:
On 13.04.2016 10:33, Changlong Xie wrote:
From: Wen Congyang
Signed-off-by: Wen Congyang
Signed-off-by: zhanghailiang
Signed-off-by: Gonglei
On Mon, Apr 11, 2016 at 9:56 AM, Raghavendra Gowdappa
wrote:
>
> > +Raghavendra G who implemented this option in write-behind, to this
> > upstream patch review discussion
>
> Thanks Pranith. Kritika did inform us about the discussion. We were
> working on ways to find out
Ceph RBD block driver does not use error_setg_errno() where
it is possible to use. This patch replaces error_setg()
from error_setg_errno().
Signed-off-by: Vikhyat Umrao
---
block/rbd.c | 38 +++---
1 file changed, 23 insertions(+), 15
Am 09.05.2016 um 08:38 hat Raghavendra Talur geschrieben:
>
>
> On Mon, Apr 11, 2016 at 9:56 AM, Raghavendra Gowdappa
> wrote:
>
>
> > +Raghavendra G who implemented this option in write-behind, to this
> > upstream patch review discussion
>
> Thanks Pranith.
Am 06.05.2016 um 19:54 hat John Snow geschrieben:
>
>
> On 05/06/2016 06:00 AM, Alberto Garcia wrote:
> > On Fri 29 Apr 2016 05:00:57 PM CEST, Kevin Wolf wrote:
> >
> >>> - Block jobs can now be identified by the node name of their
> >>> BlockDriverState in addition to the device name. Since
38 matches
Mail list logo