Home
last modified time | relevance | path

Searched hist:"3718 d8ab" (Results 1 – 6 of 6) sorted by relevance

/qemu/include/block/
H A Dblockjob.h3718d8ab Fri May 23 13:29:43 GMT 2014 Fam Zheng <famz@redhat.com> block: Replace in_use with operation blocker

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 starting block backup,
bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...).

There is one exception in block_job_create, where
bdrv_op_blocker_is_empty() is used, because we don't know the operation
type here. This doesn't matter because in a few commits away we will drop
the check and move it to callers that _do_ know the type.

- Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use).

Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at
this moment. So although the checks are specific to op types, this
changes can still be seen as identical logic with previously with
in_use. The difference is error message are improved because of blocker
error info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
H A Dblock_int.h3718d8ab Fri May 23 13:29:43 GMT 2014 Fam Zheng <famz@redhat.com> block: Replace in_use with operation blocker

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 starting block backup,
bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...).

There is one exception in block_job_create, where
bdrv_op_blocker_is_empty() is used, because we don't know the operation
type here. This doesn't matter because in a few commits away we will drop
the check and move it to callers that _do_ know the type.

- Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use).

Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at
this moment. So although the checks are specific to op types, this
changes can still be seen as identical logic with previously with
in_use. The difference is error message are improved because of blocker
error info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
H A Dblock.h3718d8ab Fri May 23 13:29:43 GMT 2014 Fam Zheng <famz@redhat.com> block: Replace in_use with operation blocker

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 starting block backup,
bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...).

There is one exception in block_job_create, where
bdrv_op_blocker_is_empty() is used, because we don't know the operation
type here. This doesn't matter because in a few commits away we will drop
the check and move it to callers that _do_ know the type.

- Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use).

Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at
this moment. So although the checks are specific to op types, this
changes can still be seen as identical logic with previously with
in_use. The difference is error message are improved because of blocker
error info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
/qemu/
H A Dblockjob.c3718d8ab Fri May 23 13:29:43 GMT 2014 Fam Zheng <famz@redhat.com> block: Replace in_use with operation blocker

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 starting block backup,
bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...).

There is one exception in block_job_create, where
bdrv_op_blocker_is_empty() is used, because we don't know the operation
type here. This doesn't matter because in a few commits away we will drop
the check and move it to callers that _do_ know the type.

- Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use).

Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at
this moment. So although the checks are specific to op types, this
changes can still be seen as identical logic with previously with
in_use. The difference is error message are improved because of blocker
error info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
H A Dblockdev.c3718d8ab Fri May 23 13:29:43 GMT 2014 Fam Zheng <famz@redhat.com> block: Replace in_use with operation blocker

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 starting block backup,
bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...).

There is one exception in block_job_create, where
bdrv_op_blocker_is_empty() is used, because we don't know the operation
type here. This doesn't matter because in a few commits away we will drop
the check and move it to callers that _do_ know the type.

- Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use).

Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at
this moment. So although the checks are specific to op types, this
changes can still be seen as identical logic with previously with
in_use. The difference is error message are improved because of blocker
error info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
H A Dblock.c3718d8ab Fri May 23 13:29:43 GMT 2014 Fam Zheng <famz@redhat.com> block: Replace in_use with operation blocker

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 starting block backup,
bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_BACKUP, ...).

There is one exception in block_job_create, where
bdrv_op_blocker_is_empty() is used, because we don't know the operation
type here. This doesn't matter because in a few commits away we will drop
the check and move it to callers that _do_ know the type.

- Check bdrv_op_blocker_is_empty() in place of assert(!bs->in_use).

Note: there is only bdrv_op_block_all and bdrv_op_unblock_all callers at
this moment. So although the checks are specific to op types, this
changes can still be seen as identical logic with previously with
in_use. The difference is error message are improved because of blocker
error info.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>