[Top][All Lists]

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

Re: [Qemu-block] [PATCH] block: Always call bdrv_child_check_perm first

From: Kevin Wolf
Subject: Re: [Qemu-block] [PATCH] block: Always call bdrv_child_check_perm first
Date: Wed, 15 Mar 2017 13:02:14 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Am 15.03.2017 um 12:09 hat Fam Zheng geschrieben:
> On Wed, 03/15 11:52, Kevin Wolf wrote:
> > Am 14.03.2017 um 03:30 hat Fam Zheng geschrieben:
> > > bdrv_child_set_perm alone is not very usable because the caller must
> > > call bdrv_child_check_perm first.
> > 
> > Well, you can imagine use cases where you want to check multiple
> > children first and then set or abort all of them, but apparently we
> > haven't found such a case yet, so I'm fine with making the functions
> > private for now.  If we ever need it, making them public again is
> > trivial.
> Yes, no problem with that use case but by then I suppose we should also add an
> assertion about the calling sequence: e.g. in image locking, raw_set_perm goes
> nut if not preceded by `raw_check_perm.

Yes, that makes sense.


reply via email to

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