All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
@ 2015-01-08 13:46 Wei Liu
  2015-01-08 14:08 ` Ian Campbell
  2015-01-08 14:33 ` Fabio Fantoni
  0 siblings, 2 replies; 11+ messages in thread
From: Wei Liu @ 2015-01-08 13:46 UTC (permalink / raw)
  To: xen-devel
  Cc: Ian Jackson, Roger Pau Monné,
	Wei Liu, Ian Campbell, Stefano Stabellini

This patch resurrects 11a63a166. The previous patch had a bug that
wrong "physical-device" was written to xenstore causing block script
execution fail. This patch fixes that problem.

Following configurations have been tested:

1. Raw file and PV
2. Raw file and HVM
3. Block device and PV
4. Block device and HVM

Creation / destruction / local migration all worked.

Original commit message from 11a63a166:

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.

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: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Roger Pau Monné <roger.pau@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
 
 case "$command" in
   add)
@@ -217,16 +224,11 @@ case "$command" in
       exit 0
     fi
 
-    if [ -n "$t" ]
-    then
-      p=$(xenstore_read "$XENBUS_PATH/params")
-      mode=$(xenstore_read "$XENBUS_PATH/mode")
-    fi
     FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
     FRONTEND_UUID=$(xenstore_read_default \
             "/local/domain/$FRONTEND_ID/vm" 'unknown')
 
-    case $t in 
+    case $truetype in
       phy)
         dev=$(expand_dev $p)
 
@@ -319,7 +321,7 @@ mount it read-write in a guest domain."
     ;;
 
   remove)
-    case $t in 
+    case $truetype in
       phy)
 	exit 0
 	;;
diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
index 50a8928..fae9fac 100644
--- a/tools/libxl/libxl.c
+++ b/tools/libxl/libxl.c
@@ -2413,9 +2413,9 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
                 if (!disk->script &&
                     disk->backend_domid == LIBXL_TOOLSTACK_DOMID) {
                     int major, minor;
-                    libxl__device_physdisk_major_minor(dev, &major, &minor);
-                    flexarray_append_pair(back, "physical-device",
-                            libxl__sprintf(gc, "%x:%x", major, minor));
+                    if (!libxl__device_physdisk_major_minor(dev, &major, &minor))
+                        flexarray_append_pair(back, "physical-device",
+                                              libxl__sprintf(gc, "%x:%x", major, minor));
                 }
 
                 assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
index 4b51ded..0f50d04 100644
--- a/tools/libxl/libxl_device.c
+++ b/tools/libxl/libxl_device.c
@@ -332,6 +332,8 @@ int libxl__device_physdisk_major_minor(const char *physpath, int *major, int *mi
     struct stat buf;
     if (stat(physpath, &buf) < 0)
         return -1;
+    if (!S_ISBLK(buf.st_mode))
+        return -1;
     *major = major(buf.st_rdev);
     *minor = minor(buf.st_rdev);
     return 0;
diff --git a/tools/libxl/libxl_linux.c b/tools/libxl/libxl_linux.c
index ea5d8c1..b51930c 100644
--- a/tools/libxl/libxl_linux.c
+++ b/tools/libxl/libxl_linux.c
@@ -19,11 +19,11 @@
  
 int libxl__try_phy_backend(mode_t st_mode)
 {
-    if (!S_ISBLK(st_mode)) {
-        return 0;
+    if (S_ISBLK(st_mode) || S_ISREG(st_mode)) {
+        return 1;
     }
 
-    return 1;
+    return 0;
 }
 
 #define EXT_SHIFT 28
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-08 13:46 [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2 Wei Liu
@ 2015-01-08 14:08 ` Ian Campbell
  2015-01-08 14:33 ` Fabio Fantoni
  1 sibling, 0 replies; 11+ messages in thread
From: Ian Campbell @ 2015-01-08 14:08 UTC (permalink / raw)
  To: Wei Liu; +Cc: Stefano Stabellini, Ian Jackson, Roger Pau Monné, xen-devel

oops, I was literally reviewing the previous send as you sent this...

On Thu, 2015-01-08 at 13:46 +0000, Wei Liu wrote:
> This patch resurrects 11a63a166. The previous patch had a bug that
> wrong "physical-device" was written to xenstore causing block script
> execution fail. This patch fixes that problem.
> 
> Following configurations have been tested:
> 
> 1. Raw file and PV
> 2. Raw file and HVM
> 3. Block device and PV
> 4. Block device and HVM
> 
> Creation / destruction / local migration all worked.
> 
> Original commit message from 11a63a166:
> 
> 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.
> 
> 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: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Roger Pau Monné <roger.pau@citrix.com>
> Acked-by: Roger Pau Monné <roger.pau@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
>  
>  case "$command" in
>    add)
> @@ -217,16 +224,11 @@ case "$command" in
>        exit 0
>      fi
>  
> -    if [ -n "$t" ]
> -    then
> -      p=$(xenstore_read "$XENBUS_PATH/params")
> -      mode=$(xenstore_read "$XENBUS_PATH/mode")
> -    fi
>      FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
>      FRONTEND_UUID=$(xenstore_read_default \
>              "/local/domain/$FRONTEND_ID/vm" 'unknown')
>  
> -    case $t in 
> +    case $truetype in
>        phy)
>          dev=$(expand_dev $p)
>  
> @@ -319,7 +321,7 @@ mount it read-write in a guest domain."
>      ;;
>  
>    remove)
> -    case $t in 
> +    case $truetype in
>        phy)
>  	exit 0
>  	;;
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 50a8928..fae9fac 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -2413,9 +2413,9 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
>                  if (!disk->script &&
>                      disk->backend_domid == LIBXL_TOOLSTACK_DOMID) {
>                      int major, minor;
> -                    libxl__device_physdisk_major_minor(dev, &major, &minor);
> -                    flexarray_append_pair(back, "physical-device",
> -                            libxl__sprintf(gc, "%x:%x", major, minor));
> +                    if (!libxl__device_physdisk_major_minor(dev, &major, &minor))
> +                        flexarray_append_pair(back, "physical-device",
> +                                              libxl__sprintf(gc, "%x:%x", major, minor));
>                  }
>  
>                  assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index 4b51ded..0f50d04 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -332,6 +332,8 @@ int libxl__device_physdisk_major_minor(const char *physpath, int *major, int *mi
>      struct stat buf;
>      if (stat(physpath, &buf) < 0)
>          return -1;
> +    if (!S_ISBLK(buf.st_mode))
> +        return -1;
>      *major = major(buf.st_rdev);
>      *minor = minor(buf.st_rdev);
>      return 0;
> diff --git a/tools/libxl/libxl_linux.c b/tools/libxl/libxl_linux.c
> index ea5d8c1..b51930c 100644
> --- a/tools/libxl/libxl_linux.c
> +++ b/tools/libxl/libxl_linux.c
> @@ -19,11 +19,11 @@
>   
>  int libxl__try_phy_backend(mode_t st_mode)
>  {
> -    if (!S_ISBLK(st_mode)) {
> -        return 0;
> +    if (S_ISBLK(st_mode) || S_ISREG(st_mode)) {
> +        return 1;
>      }
>  
> -    return 1;
> +    return 0;
>  }
>  
>  #define EXT_SHIFT 28



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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-08 13:46 [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2 Wei Liu
  2015-01-08 14:08 ` Ian Campbell
@ 2015-01-08 14:33 ` Fabio Fantoni
  2015-01-09 14:42   ` Wei Liu
  1 sibling, 1 reply; 11+ messages in thread
From: Fabio Fantoni @ 2015-01-08 14:33 UTC (permalink / raw)
  To: Wei Liu, xen-devel
  Cc: Stefano Stabellini, Ian Jackson, Ian Campbell, Roger Pau Monné

Il 08/01/2015 14:46, Wei Liu ha scritto:
> This patch resurrects 11a63a166. The previous patch had a bug that
> wrong "physical-device" was written to xenstore causing block script
> execution fail. This patch fixes that problem.
>
> Following configurations have been tested:
>
> 1. Raw file and PV
> 2. Raw file and HVM
> 3. Block device and PV
> 4. Block device and HVM
>
> Creation / destruction / local migration all worked.
>
> Original commit message from 11a63a166:
>
> 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.

Sorry for the probably stupid question, what are the pros and cons of 
default use of phy instead qdisk for raw files as domU disk?

> 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: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Roger Pau Monné <roger.pau@citrix.com>
> Acked-by: Roger Pau Monné <roger.pau@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
>   
>   case "$command" in
>     add)
> @@ -217,16 +224,11 @@ case "$command" in
>         exit 0
>       fi
>   
> -    if [ -n "$t" ]
> -    then
> -      p=$(xenstore_read "$XENBUS_PATH/params")
> -      mode=$(xenstore_read "$XENBUS_PATH/mode")
> -    fi
>       FRONTEND_ID=$(xenstore_read "$XENBUS_PATH/frontend-id")
>       FRONTEND_UUID=$(xenstore_read_default \
>               "/local/domain/$FRONTEND_ID/vm" 'unknown')
>   
> -    case $t in
> +    case $truetype in
>         phy)
>           dev=$(expand_dev $p)
>   
> @@ -319,7 +321,7 @@ mount it read-write in a guest domain."
>       ;;
>   
>     remove)
> -    case $t in
> +    case $truetype in
>         phy)
>   	exit 0
>   	;;
> diff --git a/tools/libxl/libxl.c b/tools/libxl/libxl.c
> index 50a8928..fae9fac 100644
> --- a/tools/libxl/libxl.c
> +++ b/tools/libxl/libxl.c
> @@ -2413,9 +2413,9 @@ static void device_disk_add(libxl__egc *egc, uint32_t domid,
>                   if (!disk->script &&
>                       disk->backend_domid == LIBXL_TOOLSTACK_DOMID) {
>                       int major, minor;
> -                    libxl__device_physdisk_major_minor(dev, &major, &minor);
> -                    flexarray_append_pair(back, "physical-device",
> -                            libxl__sprintf(gc, "%x:%x", major, minor));
> +                    if (!libxl__device_physdisk_major_minor(dev, &major, &minor))
> +                        flexarray_append_pair(back, "physical-device",
> +                                              libxl__sprintf(gc, "%x:%x", major, minor));
>                   }
>   
>                   assert(device->backend_kind == LIBXL__DEVICE_KIND_VBD);
> diff --git a/tools/libxl/libxl_device.c b/tools/libxl/libxl_device.c
> index 4b51ded..0f50d04 100644
> --- a/tools/libxl/libxl_device.c
> +++ b/tools/libxl/libxl_device.c
> @@ -332,6 +332,8 @@ int libxl__device_physdisk_major_minor(const char *physpath, int *major, int *mi
>       struct stat buf;
>       if (stat(physpath, &buf) < 0)
>           return -1;
> +    if (!S_ISBLK(buf.st_mode))
> +        return -1;
>       *major = major(buf.st_rdev);
>       *minor = minor(buf.st_rdev);
>       return 0;
> diff --git a/tools/libxl/libxl_linux.c b/tools/libxl/libxl_linux.c
> index ea5d8c1..b51930c 100644
> --- a/tools/libxl/libxl_linux.c
> +++ b/tools/libxl/libxl_linux.c
> @@ -19,11 +19,11 @@
>    
>   int libxl__try_phy_backend(mode_t st_mode)
>   {
> -    if (!S_ISBLK(st_mode)) {
> -        return 0;
> +    if (S_ISBLK(st_mode) || S_ISREG(st_mode)) {
> +        return 1;
>       }
>   
> -    return 1;
> +    return 0;
>   }
>   
>   #define EXT_SHIFT 28


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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-08 14:33 ` Fabio Fantoni
@ 2015-01-09 14:42   ` Wei Liu
  2015-01-09 17:38     ` Dario Faggioli
  0 siblings, 1 reply; 11+ messages in thread
From: Wei Liu @ 2015-01-09 14:42 UTC (permalink / raw)
  To: Fabio Fantoni
  Cc: Wei Liu, Ian Campbell, Stefano Stabellini, Ian Jackson,
	xen-devel, Roger Pau Monné

On Thu, Jan 08, 2015 at 03:33:17PM +0100, Fabio Fantoni wrote:
> Il 08/01/2015 14:46, Wei Liu ha scritto:
> >This patch resurrects 11a63a166. The previous patch had a bug that
> >wrong "physical-device" was written to xenstore causing block script
> >execution fail. This patch fixes that problem.
> >
> >Following configurations have been tested:
> >
> >1. Raw file and PV
> >2. Raw file and HVM
> >3. Block device and PV
> >4. Block device and HVM
> >
> >Creation / destruction / local migration all worked.
> >
> >Original commit message from 11a63a166:
> >
> >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.
> 
> Sorry for the probably stupid question, what are the pros and cons of
> default use of phy instead qdisk for raw files as domU disk?
> 

There's no stupid question. :-)

I was told that it performs better and enables other potential
improvements.

Wei.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-09 14:42   ` Wei Liu
@ 2015-01-09 17:38     ` Dario Faggioli
  2015-01-12  9:15       ` Fabio Fantoni
  0 siblings, 1 reply; 11+ messages in thread
From: Dario Faggioli @ 2015-01-09 17:38 UTC (permalink / raw)
  To: Wei Liu
  Cc: Ian Campbell, Stefano Stabellini, Ian Jackson, xen-devel,
	Fabio Fantoni, Roger Pau Monné


[-- Attachment #1.1: Type: text/plain, Size: 818 bytes --]

On Fri, 2015-01-09 at 14:42 +0000, Wei Liu wrote:
> On Thu, Jan 08, 2015 at 03:33:17PM +0100, Fabio Fantoni wrote:

> > Sorry for the probably stupid question, what are the pros and cons of
> > default use of phy instead qdisk for raw files as domU disk?
> > 
> 
> There's no stupid question. :-)
> 
> I was told that it performs better and enables other potential
> improvements.
> 
Not a big deal, probably, but IMO it would be nice to have at least a
few words about when it's happening in the changelog, wouldn't it?

Regards,
Dario

-- 
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)


[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

[-- Attachment #2: Type: text/plain, Size: 126 bytes --]

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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-09 17:38     ` Dario Faggioli
@ 2015-01-12  9:15       ` Fabio Fantoni
  2015-01-12  9:31         ` Ian Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Fantoni @ 2015-01-12  9:15 UTC (permalink / raw)
  To: Dario Faggioli, Wei Liu
  Cc: Roger Pau Monné,
	xen-devel, Ian Jackson, Ian Campbell, Stefano Stabellini

Il 09/01/2015 18:38, Dario Faggioli ha scritto:
> On Fri, 2015-01-09 at 14:42 +0000, Wei Liu wrote:
>> On Thu, Jan 08, 2015 at 03:33:17PM +0100, Fabio Fantoni wrote:
>>> Sorry for the probably stupid question, what are the pros and cons of
>>> default use of phy instead qdisk for raw files as domU disk?
>>>
>> There's no stupid question. :-)
>>
>> I was told that it performs better and enables other potential
>> improvements.
>>
> Not a big deal, probably, but IMO it would be nice to have at least a
> few words about when it's happening in the changelog, wouldn't it?

I'm also interested in detailed changelog about.

In the meantime, I saw this:
http://lists.xen.org/archives/html/xen-users/2015-01/msg00047.html
Based on the post above seems that phy will have important risk of data 
loss if I understand good, from Ian Campbell post:
> xl also uses qdisk for raw disk images instead of loop+blkback which
> xend used, because there are concerns that the loop driver can lead to
> data loss (by not implementing direct i/o the underlying device, and/or
> not handling flushes correct, my memory is a bit fuzzy).

Thanks for any reply and sorry for my bad english.


>
> Regards,
> Dario
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-12  9:15       ` Fabio Fantoni
@ 2015-01-12  9:31         ` Ian Campbell
  2015-01-12  9:39           ` Fabio Fantoni
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Campbell @ 2015-01-12  9:31 UTC (permalink / raw)
  To: Fabio Fantoni
  Cc: Wei Liu, Stefano Stabellini, Dario Faggioli, Ian Jackson,
	xen-devel, Roger Pau Monné

On Mon, 2015-01-12 at 10:15 +0100, Fabio Fantoni wrote:
> In the meantime, I saw this:
> http://lists.xen.org/archives/html/xen-users/2015-01/msg00047.html
> Based on the post above seems that phy will have important risk of data 
> loss if I understand good, from Ian Campbell post:
> > xl also uses qdisk for raw disk images instead of loop+blkback which
> > xend used, because there are concerns that the loop driver can lead to
> > data loss (by not implementing direct i/o the underlying device, and/or
> > not handling flushes correct, my memory is a bit fuzzy).

Stefano already corrected me on this in this very thread.

Ian.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-12  9:31         ` Ian Campbell
@ 2015-01-12  9:39           ` Fabio Fantoni
  2015-01-12 10:06             ` Ian Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Fantoni @ 2015-01-12  9:39 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Wei Liu, Stefano Stabellini, Dario Faggioli, Ian Jackson,
	xen-devel, Roger Pau Monné

Il 12/01/2015 10:31, Ian Campbell ha scritto:
> On Mon, 2015-01-12 at 10:15 +0100, Fabio Fantoni wrote:
>> In the meantime, I saw this:
>> http://lists.xen.org/archives/html/xen-users/2015-01/msg00047.html
>> Based on the post above seems that phy will have important risk of data
>> loss if I understand good, from Ian Campbell post:
>>> xl also uses qdisk for raw disk images instead of loop+blkback which
>>> xend used, because there are concerns that the loop driver can lead to
>>> data loss (by not implementing direct i/o the underlying device, and/or
>>> not handling flushes correct, my memory is a bit fuzzy).
> Stefano already corrected me on this in this very thread.
>
> Ian.
>

Thanks for your reply.
I saw other posts about and if I understand good when O_DIRECT patches 
will be in upstream loop driver the data loss risk will be solved, right?

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-12  9:39           ` Fabio Fantoni
@ 2015-01-12 10:06             ` Ian Campbell
  2015-01-12 10:17               ` Fabio Fantoni
  0 siblings, 1 reply; 11+ messages in thread
From: Ian Campbell @ 2015-01-12 10:06 UTC (permalink / raw)
  To: Fabio Fantoni
  Cc: Wei Liu, Stefano Stabellini, Dario Faggioli, Ian Jackson,
	xen-devel, Roger Pau Monné

On Mon, 2015-01-12 at 10:39 +0100, Fabio Fantoni wrote:
> Il 12/01/2015 10:31, Ian Campbell ha scritto:
> > On Mon, 2015-01-12 at 10:15 +0100, Fabio Fantoni wrote:
> >> In the meantime, I saw this:
> >> http://lists.xen.org/archives/html/xen-users/2015-01/msg00047.html
> >> Based on the post above seems that phy will have important risk of data
> >> loss if I understand good, from Ian Campbell post:
> >>> xl also uses qdisk for raw disk images instead of loop+blkback which
> >>> xend used, because there are concerns that the loop driver can lead to
> >>> data loss (by not implementing direct i/o the underlying device, and/or
> >>> not handling flushes correct, my memory is a bit fuzzy).
> > Stefano already corrected me on this in this very thread.
> >
> > Ian.
> >
> 
> Thanks for your reply.
> I saw other posts about and if I understand good when O_DIRECT patches 
> will be in upstream loop driver the data loss risk will be solved, right?

Stefano says that O_DIRECT is not needed, only correct barrier semantics
are and he believes those are correctly implemented.

O_DIRECT would be an additional layer of safety perhaps, but sounds to
be not strictly needed.

Ian.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-12 10:06             ` Ian Campbell
@ 2015-01-12 10:17               ` Fabio Fantoni
  2015-01-12 10:18                 ` Ian Campbell
  0 siblings, 1 reply; 11+ messages in thread
From: Fabio Fantoni @ 2015-01-12 10:17 UTC (permalink / raw)
  To: Ian Campbell
  Cc: Wei Liu, Stefano Stabellini, Dario Faggioli, Ian Jackson,
	xen-devel, Roger Pau Monné

Il 12/01/2015 11:06, Ian Campbell ha scritto:
> On Mon, 2015-01-12 at 10:39 +0100, Fabio Fantoni wrote:
>> Il 12/01/2015 10:31, Ian Campbell ha scritto:
>>> On Mon, 2015-01-12 at 10:15 +0100, Fabio Fantoni wrote:
>>>> In the meantime, I saw this:
>>>> http://lists.xen.org/archives/html/xen-users/2015-01/msg00047.html
>>>> Based on the post above seems that phy will have important risk of data
>>>> loss if I understand good, from Ian Campbell post:
>>>>> xl also uses qdisk for raw disk images instead of loop+blkback which
>>>>> xend used, because there are concerns that the loop driver can lead to
>>>>> data loss (by not implementing direct i/o the underlying device, and/or
>>>>> not handling flushes correct, my memory is a bit fuzzy).
>>> Stefano already corrected me on this in this very thread.
>>>
>>> Ian.
>>>
>> Thanks for your reply.
>> I saw other posts about and if I understand good when O_DIRECT patches
>> will be in upstream loop driver the data loss risk will be solved, right?
> Stefano says that O_DIRECT is not needed, only correct barrier semantics
> are and he believes those are correctly implemented.

I not understand if manual changes and/or settings are needed, about 
this I mean:
> only correct barrier semantics are and he believes those are correctly implemented
If yes what exactly?

>
> O_DIRECT would be an additional layer of safety perhaps, but sounds to
> be not strictly needed.
>
> Ian.
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2
  2015-01-12 10:17               ` Fabio Fantoni
@ 2015-01-12 10:18                 ` Ian Campbell
  0 siblings, 0 replies; 11+ messages in thread
From: Ian Campbell @ 2015-01-12 10:18 UTC (permalink / raw)
  To: Fabio Fantoni
  Cc: Wei Liu, Stefano Stabellini, Dario Faggioli, Ian Jackson,
	xen-devel, Roger Pau Monné

On Mon, 2015-01-12 at 11:17 +0100, Fabio Fantoni wrote:
> Il 12/01/2015 11:06, Ian Campbell ha scritto:
> > On Mon, 2015-01-12 at 10:39 +0100, Fabio Fantoni wrote:
> >> Il 12/01/2015 10:31, Ian Campbell ha scritto:
> >>> On Mon, 2015-01-12 at 10:15 +0100, Fabio Fantoni wrote:
> >>>> In the meantime, I saw this:
> >>>> http://lists.xen.org/archives/html/xen-users/2015-01/msg00047.html
> >>>> Based on the post above seems that phy will have important risk of data
> >>>> loss if I understand good, from Ian Campbell post:
> >>>>> xl also uses qdisk for raw disk images instead of loop+blkback which
> >>>>> xend used, because there are concerns that the loop driver can lead to
> >>>>> data loss (by not implementing direct i/o the underlying device, and/or
> >>>>> not handling flushes correct, my memory is a bit fuzzy).
> >>> Stefano already corrected me on this in this very thread.
> >>>
> >>> Ian.
> >>>
> >> Thanks for your reply.
> >> I saw other posts about and if I understand good when O_DIRECT patches
> >> will be in upstream loop driver the data loss risk will be solved, right?
> > Stefano says that O_DIRECT is not needed, only correct barrier semantics
> > are and he believes those are correctly implemented.
> 
> I not understand if manual changes and/or settings are needed, about 
> this I mean:
> > only correct barrier semantics are and he believes those are correctly implemented
> If yes what exactly?

If Stefano is correct then it should all just work, no manual steps
needed (if manual steps were needed we wouldn't be taking this patch).

Ian.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-12 10:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-08 13:46 [PATCH resend] libxl, hotplug/Linux: default to phy backend for raw format file, take 2 Wei Liu
2015-01-08 14:08 ` Ian Campbell
2015-01-08 14:33 ` Fabio Fantoni
2015-01-09 14:42   ` Wei Liu
2015-01-09 17:38     ` Dario Faggioli
2015-01-12  9:15       ` Fabio Fantoni
2015-01-12  9:31         ` Ian Campbell
2015-01-12  9:39           ` Fabio Fantoni
2015-01-12 10:06             ` Ian Campbell
2015-01-12 10:17               ` Fabio Fantoni
2015-01-12 10:18                 ` Ian Campbell

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.