qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH 0/3] move global bdrv_states out of block.c
Date: Wed, 18 Sep 2013 16:03:18 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

On Tue, Aug 27, 2013 at 03:49:22PM +0800, Wenchao Xia wrote:
> In order to support multiple caller from different thread, global
> inside block layer should be carefully treated. bdrv_states represent
> a group of bds* which is now used by qemu, so it is a user concept which
> should be managed by user. This series tries to move it out, so later
> different thread can feed the API with its own bds* group.
> 
> This is a RFC series which does not completely convert the API, the missing
> part is adding parameter *l in all API which uses bdrv_states, then move
> bdrv_states to caller. About 10 functions need to be converted, so hope to
> get comments before that, to see if this is the right direction.

The global bdrv_states list needs to stay, I don't think we should try
to remove it.

The list is used to drain and flush all devices so that we can safely
shut down or live migrate.  If we give each thread their own list then
there's no way to globally drain and flush.

The invalidate function that you modified is another example: we *must*
invalidate all BDS instances across all threads.  Failure to invalidate
all instances could mean inconsistencies or data loss.

So in the end I think we need to keep bdrv_states.

Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]