qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 03/17] blockdev: Introduce DriveInfo.enable_auto


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH 03/17] blockdev: Introduce DriveInfo.enable_auto_del
Date: Fri, 20 Sep 2013 17:12:17 +0200
User-agent: Mutt/1.5.21 (2010-09-15)

Am 20.09.2013 um 17:03 hat Eric Blake geschrieben:
> On 09/20/2013 05:54 AM, Kevin Wolf wrote:
> > BlockDriverStates shouldn't be affected by an unplugged guest device,
> > except if created with the legacy -drive command line option or the
> > drive_add HMP command.
> > 
> > Make the automatic deletion as well as cancelling of jobs conditional on
> > an enable_auto_del boolean that is only set in drive_init().
> > 
> > Signed-off-by: Kevin Wolf <address@hidden>
> > ---
> 
> > +++ b/include/sysemu/blockdev.h
> > @@ -37,6 +37,7 @@ struct DriveInfo {
> >      int bus;
> >      int unit;
> >      int auto_del;               /* see blockdev_mark_auto_del() */
> > +    bool enable_auto_del; /* Only for legacy drive_init() */
> 
> auto_del is 0-initialized, and only ever assigned to 1.  Should it also
> be bool?

Probably. A lot of qemu code uses int for boolean values. I'm trying to
get rid of them in the block layer in the long run, but so far I haven't
aggressively converted fields that I don't touch otherwise.

Kevin



reply via email to

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