On Tue, Mar 10, 2015 at 05:30:46PM +0200, Alberto Garcia wrote:
> +typedef struct ThrottleGroup {
> + char *name; /* This is constant during the lifetime of the group */Is this also protected by throttle_groups_lock? I guess throttle_groups_lock must be held in order to read this field - otherwise there is a risk that the object is freed unless you have already incremented the refcount. > + > + QemuMutex lock; What does this lock protect? I guess 'ts', 'head', and 'tokens' fields. Please document it. > + ThrottleState ts; > + QLIST_HEAD(, BlockDriverState) head; > + BlockDriverState *tokens[2];
pgpvJ1y8R3SaF.pgp
Description: PGP signature
