[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 04/14] qemu-img: Set "share-rw" flag in read-onl
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] [PATCH 04/14] qemu-img: Set "share-rw" flag in read-only commands |
Date: |
Thu, 8 Dec 2016 15:19:18 +0800 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Fri, 12/02 01:52, Max Reitz wrote:
> > diff --git a/qemu-img.c b/qemu-img.c
> > index afcd51f..b2f4077 100644
> > --- a/qemu-img.c
> > +++ b/qemu-img.c
> > @@ -679,6 +679,10 @@ static int img_check(int argc, char **argv)
> > break;
> > }
> > }
> > +
> > + if (!(flags & BDRV_O_RDWR)) {
> > + flags |= BDRV_O_SHARE_RW;
> > + }
>
> If you want to keep this for img_check() (and I'm not going to stop you
> if you do), I think it would be better to put this right in front of
> img_open() to make it really clear that both are not set at the same
> time (without having to look into bdrv_parse_cache_mode()).
Sounds good, will move it.
Fam