From: Ian Jackson Subject: Re: [PATCH v2] introduce a cache options for PV disks Date: Thu, 27 Jun 2013 18:44:10 +0100 Message-ID: <20940.31210.191976.244639@mariner.uk.xensource.com> References: <20940.26172.875919.504123@mariner.uk.xensource.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: Stefano Stabellini Cc: xen-devel@lists.xensource.com, Ian Campbell List-Id: xen-devel@lists.xenproject.org Stefano Stabellini writes ("Re: [PATCH v2] introduce a cache options for PV disks"): > It's mostly OK, just few minor corrections for code readability Thanks. > > int info = 0; > > + char *directiosafe == NULL; > ^ = I did warn that I hadn't compiled it :-). > > out_error: > > @@ -773,6 +779,7 @@ out_error: > > blkdev->dev = NULL; > > g_free(blkdev->devtype); > > blkdev->devtype = NULL; > > + g_free(directiosafe); > > maybe add > > blkdev->directiosafe = false; Sure, does no harm. > > + if (blkdev->directiosafe) { > > + qflags = BDRV_O_NOCACHE | BDRV_O_NATIVE_AIO; > > + } > > Please change this into: > > if (blkdev->directiosafe) { > qflags = BDRV_O_NOCACHE | BDRV_O_NATIVE_AIO; > } else { > qflags = BDRV_O_CACHE_WB; > } I don't think that can be right. The result would be that the value non-directiosafe value of qflags is changed. But I will break it apart as you suggest. Ian.