All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xensource.com,
	Ian Campbell <Ian.Campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: [PATCH v2] introduce a cache options for PV disks
Date: Thu, 27 Jun 2013 18:50:00 +0100	[thread overview]
Message-ID: <alpine.DEB.2.02.1306271848210.4782@kaball.uk.xensource.com> (raw)
In-Reply-To: <20940.31210.191976.244639@mariner.uk.xensource.com>

On Thu, 27 Jun 2013, Ian Jackson wrote:
> 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.

BDRV_O_NATIVE_AIO is ignored if BDRV_O_NOCACHE is not also set, so there
would be not behavioural change. However the code would be clearer.

  reply	other threads:[~2013-06-27 17:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-27 11:40 [PATCH v2] introduce a cache options for PV disks Stefano Stabellini
2013-06-27 14:21 ` Ian Jackson
2013-06-27 16:09   ` Ian Jackson
2013-06-27 16:24     ` Ian Campbell
2013-06-27 16:30       ` Ian Jackson
2013-06-27 16:34         ` Ian Jackson
2013-06-27 16:41           ` Ian Campbell
2013-06-27 16:50             ` Ian Jackson
2013-06-27 16:58               ` Ian Campbell
2013-06-27 16:41         ` Ian Campbell
2013-06-27 16:35       ` Ian Jackson
2013-06-27 16:20 ` Ian Jackson
2013-06-27 17:06   ` Stefano Stabellini
2013-06-27 17:13     ` Stefano Stabellini
2013-06-27 17:44     ` Ian Jackson
2013-06-27 17:50       ` Stefano Stabellini [this message]
2013-06-27 17:59         ` Ian Jackson
2013-06-27 18:01         ` Ian Jackson
2013-06-27 18:04           ` Ian Jackson
2013-06-28  7:39             ` Ian Campbell
2013-06-27 18:12           ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.02.1306271848210.4782@kaball.uk.xensource.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.