Le Sunday 26 Jan 2014 à 20:02:41 (+0100), Max Reitz a écrit :
Setting bs-options in bdrv_file_open() is not necessary if it is
already done in bdrv_open().
Signed-off-by: Max Reitz mre...@redhat.com
---
block.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git
Le Sunday 26 Jan 2014 à 20:02:40 (+0100), Max Reitz a écrit :
The fail paths of bdrv_file_open() and bdrv_open() naturally exhibit
similarities, thus it is possible to reuse the one from bdrv_open() and
shorten the one in bdrv_file_open() accordingly.
Signed-off-by: Max Reitz
This series adds for point-in-time snapshot NBD exporting based on
blockdev-backup (variant of drive-backup with existing device as target).
We get a thin point-in-time snapshot by COW mechanism of drive-backup, and
export it through built in NBD server. The steps are as below:
1. (SHELL)
This adds the enum of all the operations that can be taken on a block
device.
Signed-off-by: Fam Zheng f...@redhat.com
---
include/block/block.h | 19 +++
1 file changed, 19 insertions(+)
diff --git a/include/block/block.h b/include/block/block.h
index 963a61f..9626650 100644
This makes use of op_blocker and blocks all the operations except for
commit target, on each BlockDriverState-backing_hd.
The asserts for op_blocker in bdrv_swap are removed because with this
change, the target of block commit has at least the backing blocker of
its child, so the assertion is not
This drops BlockDriverState.in_use with op_blockers:
- Call bdrv_op_block_all in place of bdrv_set_in_use(bs, 1).
- Call bdrv_op_unblock_all in place of bdrv_set_in_use(bs, 0).
- Check bdrv_op_is_blocked() in place of bdrv_in_use(bs).
The specific types are used, e.g. in place of
This is the common but non-trivial steps to assign or change the
backing_hd of BDS.
Signed-off-by: Fam Zheng f...@redhat.com
---
block.c | 39 ++-
include/block/block.h | 1 +
2 files changed, 31 insertions(+), 9 deletions(-)
diff --git
BlockDriverState.op_blockers is an array of lists with BLOCK_OP_TYPE_MAX
elements. Each list is a list of blockers of an operation type
(BlockOpType), that marks this BDS as currently blocked for a certain
type of operation with reason errors stored in the list. The rule of
usage is:
* BDS user
Similar to drive-backup, but this command uses a device id as target
instead of creating/opening an image file.
Also add blocker on target bs, since the target is also a named device
now.
Signed-off-by: Fam Zheng f...@redhat.com
---
block/backup.c | 21 +
blockdev.c
It makes no sense to check for any blocker on bs, we are here only
because of the mechanical conversion from in_use to op_blockers. Remove
it now, and let the callers check specific operation types. Backup and
mirror already have it, add checker to stream and commit.
Signed-off-by: Fam Zheng
This reuses the new bdrv_drop_intermediate.
Signed-off-by: Fam Zheng f...@redhat.com
---
block/stream.c | 30 +-
1 file changed, 1 insertion(+), 29 deletions(-)
diff --git a/block/stream.c b/block/stream.c
index dd0b4ac..9cdcf0e 100644
--- a/block/stream.c
+++
Now it's safe to allow reference for backing_hd in the interface.
Signed-off-by: Fam Zheng f...@redhat.com
---
block.c | 26 --
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/block.c b/block.c
index 4498ce7..be58d93 100644
--- a/block.c
+++ b/block.c
@@
Drive backup is a read only operation on source bs. We want to allow
this specific case to enable image-fleecing. Note that when
image-fleecing job starts, the job still add its blocker to source bs,
and any other operation on it will be blocked by that.
Signed-off-by: Fam Zheng f...@redhat.com
Dropping intermediate could be useful both for commit and stream, and
BDS refcnt plus bdrv_swap could do most of the job nicely. It also needs
to work with op blockers.
Signed-off-by: Fam Zheng f...@redhat.com
---
block.c| 146 +
101 - 114 of 114 matches
Mail list logo