From: Stefano Stabellini Subject: Re: [PATCH 1/3] qemu-xen-traditional: use O_DIRECT to open disk images for IDE Date: Tue, 27 Mar 2012 17:30:06 +0100 Message-ID: References: <1332514289-28129-1-git-send-email-stefano.stabellini@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: "Zhang, Yang Z" Cc: "xen-devel@lists.xensource.com" , Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 27 Mar 2012, Zhang, Yang Z wrote: > > > > diff --git a/xenstore.c b/xenstore.c > > > > index 4c483e2..ac90366 100644 > > > > --- a/xenstore.c > > > > +++ b/xenstore.c > > > > @@ -643,7 +643,7 @@ void xenstore_parse_domain_config(int hvm_domid) > > > > } > > > > pstrcpy(bs->filename, sizeof(bs->filename), params); > > > > > > > > - flags = BDRV_O_CACHE_WB; /* snapshot and write-back */ > > > > + flags = BDRV_O_NOCACHE; > > > > is_readonly = 0; > > > > if (pasprintf(&buf, "%s/mode", bpath) == -1) > > > > continue; > > > Any reason for this change? > > > > performance and correctness: BDRV_O_NOCACHE in QEMU means opening the > > disk image with O_DIRECT > Doesn't cache mode have better performance than NOCACHE? Actually you are correct. I think that this patch should be dropped from the series. Of course we need O_DIRECT for QDISK otherwise we do loose correctness but considering that IDE should only be used during installation it can stay as it is.