All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <Ian.Campbell@citrix.com>
To: Wei Liu <wei.liu2@citrix.com>
Cc: "Stefano Stabellini" <stefano.stabellini@eu.citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Roger Pau Monné" <roger.pau@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH for-4.6] libxl, hotplug/Linux: default to phy backend for raw format file
Date: Thu, 8 Jan 2015 14:07:42 +0000	[thread overview]
Message-ID: <1420726062.19787.89.camel@citrix.com> (raw)
In-Reply-To: <1417020935-2934-1-git-send-email-wei.liu2@citrix.com>

On Wed, 2014-11-26 at 16:55 +0000, Wei Liu wrote:
> Modify libxl and hotplug script to allow raw format file to use phy
> backend.
> 
> The block script now tests the path and determine the actual type of
> file (block device or regular file) then use the actual type to
> determine which branch to run.
> 
> With these changes, plus the current ordering of backend preference (phy
> > qdisk > tap), we will use phy backend for raw format file by default.

http://lists.xen.org/archives/html/xen-devel/2012-04/msg00077.html
includes (in the quotes, Stefano's reply is about something else but has
conveniently trimmed most of the other uninteresting stuff):
        use /dev/loop+blkback. This requires loop driver AIO and
        O_DIRECT patches which are not (AFAIK) yet upstream.

and I have it in my mind that using /dev/loop+blkback is somehow unsafe,
for reasons relating to crash consistency and the proper implementation
(in /dev/loop, blkback is good I think) of barriers and such, e.g.
relating to whether data is really on the platter or not when we've to
the frontend that it is (which is critical for proper operation of
journalling file systems).

It's entirely possible that I'm either plain wrong or a decade out of
date on this though. CC-ing Konrad in case he has any insights as
blkback maintainer (I think, MAINTAINERS doesn't have a specific entry)

> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> Cc: Ian Campbell <ian.campbell@citrix.com>
> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
> Cc: Roger Pau Monné <roger.pau@citrix.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> ---
>  tools/hotplug/Linux/block  |   16 +++++++++-------
>  tools/libxl/libxl.c        |    6 +++---
>  tools/libxl/libxl_device.c |    2 ++
>  tools/libxl/libxl_linux.c  |    6 +++---
>  4 files changed, 17 insertions(+), 13 deletions(-)
> 
> diff --git a/tools/hotplug/Linux/block b/tools/hotplug/Linux/block
> index da26e22..8d2ee9d 100644
> --- a/tools/hotplug/Linux/block
> +++ b/tools/hotplug/Linux/block
> @@ -206,6 +206,13 @@ and so cannot be mounted ${m2}${when}."
>  
> 
>  t=$(xenstore_read_default "$XENBUS_PATH/type" 'MISSING')
> +p=$(xenstore_read "$XENBUS_PATH/params")
> +mode=$(xenstore_read "$XENBUS_PATH/mode")
> +if [ -b "$p" ]; then
> +    truetype="phy"
> +elif [ -f "$p" ]; then
> +    truetype="file"
> +fi

IIRC xend used to write file or phy to the type node as appropriate. I'm
unsure if that was in some way better than this approach, and perhaps
libxl doesn't even have the right information to hand.

Anyway, I just mention it for completeness, ignore it if you like.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

  parent reply	other threads:[~2015-01-08 14:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 16:55 [PATCH for-4.6] libxl, hotplug/Linux: default to phy backend for raw format file Wei Liu
2014-11-26 17:32 ` Roger Pau Monné
2014-11-26 17:44   ` Wei Liu
2014-11-27 15:00     ` Roger Pau Monné
2015-01-08 14:07 ` Ian Campbell [this message]
2015-01-08 16:07   ` Wei Liu
2015-01-08 16:11     ` Ian Campbell
2015-01-08 16:47       ` Stefano Stabellini
2015-01-12 16:41         ` Ian Campbell

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=1420726062.19787.89.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=roger.pau@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /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.