[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that bl
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots |
Date: |
Wed, 4 Nov 2015 13:50:59 +0000 |
User-agent: |
Mutt/1.5.23 (2015-06-09) |
On Wed, Nov 04, 2015 at 01:07:44PM +0100, Juan Quintela wrote:
> > +{
> > + BlockDriverState *bs;
> > +
> > + while ((bs = bdrv_next(bs))) {
> > + bool ok;
> > + AioContext *ctx = bdrv_get_aio_context(bs);
> > +
> > + if (!bdrv_is_inserted(bs) || bdrv_is_read_only(bs)) {
> > + continue;
> > + }
> > +
> > + aio_context_acquire(ctx);
>
> I think that you should get the lock before the bdrv_is_inserted, but
> who am I to know for sure O:-)
Yes, please acquire the AioContext before bdrv_is_inserted(bs).
- Re: [Qemu-devel] [PATCH 03/10] migration: added missed aio_context_acquire around bdrv_snapshot_delete, (continued)
- Re: [Qemu-devel] [PATCH 03/10] migration: added missed aio_context_acquire around bdrv_snapshot_delete, Juan Quintela, 2015/11/03
- [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking, Denis V. Lunev, 2015/11/04
- Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking, Juan Quintela, 2015/11/04
- Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking, Denis V. Lunev, 2015/11/04
- Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking, Juan Quintela, 2015/11/04
- Re: [Qemu-devel] [RFC PATCH 1/1] dataplane: alternative approach to locking, Denis V. Lunev, 2015/11/04
- [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots, Denis V. Lunev, 2015/11/04
- [Qemu-devel] [PATCH RFC 2/2] snapshot: create bdrv_snapshot_all_del_snapshot helper, Denis V. Lunev, 2015/11/04
- Re: [Qemu-devel] [PATCH RFC 2/2] snapshot: create bdrv_snapshot_all_del_snapshot helper, Juan Quintela, 2015/11/04
- Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots, Juan Quintela, 2015/11/04
- Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH RFC 1/2] snapshot: create helper to test that block drivers supports snapshots, Stefan Hajnoczi, 2015/11/04
[Qemu-devel] [PATCH 07/10] block: call aio_context_acquire in qemu_img/nbd/io, Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 01/10] migration: add missed aio_context_acquire for state writing/reading, Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 02/10] block: add missed aio_context_acquire around bdrv_set_aio_context, Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 04/10] blockdev: acquire AioContext in hmp_commit(), Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 05/10] block: guard bdrv_drain in bdrv_close with aio_context_acquire, Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 08/10] fifolock: create rfifolock_is_owner helper, Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 10/10] aio: change aio_poll constraints, Denis V. Lunev, 2015/11/03
[Qemu-devel] [PATCH 09/10] aio_context: create aio_context_is_owner helper, Denis V. Lunev, 2015/11/03