<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Am Sa., 15. Juni 2019 um 14:59 Uhr schrieb Michal Prívozník <<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 5/28/19 2:55 PM, Silvan Kaiser wrote:<br>
> Adds detection of a Quobyte shared file system for<br>
> live migration.<br>
> <br>
> Signed-off-by: Silvan Kaiser <<a href="mailto:silvan@quobyte.com" target="_blank">silvan@quobyte.com</a>><br>
> ---<br>
>  src/util/virfile.c            | 13 ++++++++++++-<br>
>  src/util/virfile.h            |  1 +<br>
>  tests/virfiledata/mounts3.txt |  1 +<br>
>  tests/virfilemock.c           |  3 +++<br>
>  tests/virfiletest.c           |  1 +<br>
>  5 files changed, 18 insertions(+), 1 deletion(-)<br>
> <br>
> diff --git a/src/util/virfile.c b/src/util/virfile.c<br>
> index f7415cf633..a46b8792f6 100644<br>
> --- a/src/util/virfile.c<br>
> +++ b/src/util/virfile.c<br>
> @@ -3434,6 +3434,9 @@ int virFilePrintf(FILE *fp, const char *msg, ...)<br>
>  # ifndef GPFS_SUPER_MAGIC<br>
>  #  define GPFS_SUPER_MAGIC 0x47504653<br>
>  # endif<br>
> +# ifndef QB_MAGIC<br>
> +#  define QB_MAGIC 0x51626d6e<br>
> +# endif<br>
>  <br>
>  # define PROC_MOUNTS "/proc/mounts"<br>
>  <br>
> @@ -3490,6 +3493,10 @@ virFileIsSharedFixFUSE(const char *path,<br>
>          VIR_DEBUG("Found gluster FUSE mountpoint=%s for path=%s. "<br>
>                    "Fixing shared FS type", mntDir, canonPath);<br>
>          *f_type = GFS2_MAGIC;<br>
> +    } else if (STREQ_NULLABLE(mntType, "fuse.quobyte")) {<br>
> +        VIR_DEBUG("Found Quobyte FUSE mountpoint=%s for path=%s. "<br>
> +                  "Fixing shared FS type", mntDir, canonPath);<br>
> +        *f_type = QB_MAGIC;<br>
>      }<br>
>  <br>
>      ret = 0;<br>
> @@ -3582,6 +3589,9 @@ virFileIsSharedFSType(const char *path,<br>
>      if ((fstypes & VIR_FILE_SHFS_GPFS) &&<br>
>          (f_type == GPFS_SUPER_MAGIC))<br>
>          return 1;<br>
> +    if ((fstypes & VIR_FILE_SHFS_QB) &&<br>
> +        (f_type == QB_MAGIC))<br>
> +        return 1;<br>
>  <br>
>      return 0;<br>
>  }<br>
> @@ -3771,7 +3781,8 @@ int virFileIsSharedFS(const char *path)<br>
>                                   VIR_FILE_SHFS_SMB |<br>
>                                   VIR_FILE_SHFS_CIFS |<br>
>                                   VIR_FILE_SHFS_CEPH |<br>
> -                                 VIR_FILE_SHFS_GPFS);<br>
> +                                 VIR_FILE_SHFS_GPFS|<br>
> +                                 VIR_FILE_SHFS_QB);<br>
>  }<br>
>  <br>
>  <br>
> diff --git a/src/util/virfile.h b/src/util/virfile.h<br>
> index 641960e2ca..e06855ea86 100644<br>
> --- a/src/util/virfile.h<br>
> +++ b/src/util/virfile.h<br>
> @@ -212,6 +212,7 @@ enum {<br>
>      VIR_FILE_SHFS_CIFS = (1 << 5),<br>
>      VIR_FILE_SHFS_CEPH = (1 << 6),<br>
>      VIR_FILE_SHFS_GPFS = (1 << 7),<br>
> +    VIR_FILE_SHFS_QB = (1 << 8),<br>
>  };<br>
>  <br>
>  int virFileIsSharedFSType(const char *path, int fstypes) ATTRIBUTE_NONNULL(1);<br>
> diff --git a/tests/virfiledata/mounts3.txt b/tests/virfiledata/mounts3.txt<br>
> index 4377e5d471..b91804a4e4 100644<br>
> --- a/tests/virfiledata/mounts3.txt<br>
> +++ b/tests/virfiledata/mounts3.txt<br>
> @@ -36,3 +36,4 @@ root@host:/tmp/mkdir /gluster/sshfs fuse.sshfs rw 0 0<br>
>  192.168.0.1:/ceph/data /ceph ceph rw,noatime,name=cephfs,secret=<hidden>,acl,wsize=16777216 0 0<br>
>  192.168.0.1,192.168.0.2,192.168.0.3:/ceph/data2 /ceph/multi ceph rw,noatime,name=cephfs,secret=<hidden>,acl,wsize=16777216 0 0<br>
>  gpfs_data /gpfs/data gpfs rw,relatime 0 0<br>
> +<a href="http://quobyte@192.168.0.1/data" rel="noreferrer" target="_blank">quobyte@192.168.0.1/data</a> /quobyte fuse.quobyte rw,nosuid,nodev,noatime,user_id=0,group_id=0,allow_other 0 0<br>
> diff --git a/tests/virfilemock.c b/tests/virfilemock.c<br>
> index 106032f857..54c57d417b 100644<br>
> --- a/tests/virfilemock.c<br>
> +++ b/tests/virfilemock.c<br>
> @@ -92,6 +92,9 @@ setmntent(const char *filename, const char *type)<br>
>  #ifndef GPFS_SUPER_MAGIC<br>
>  # define GPFS_SUPER_MAGIC 0x47504653<br>
>  #endif<br>
> +# ifndef QB_MAGIC<br>
> +#  define QB_MAGIC 0x51626d6e<br>
> +# endif<br>
<br>
Misaligned lines. I'll fix that before push.</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
But before ACK and push this, is there some place I can verify this<br>
magic number? Also, just to make sure we are on the same page here, a<br>
sole fact that a FS is distributed does not qualify it for being<br>
detected as shared FS by libvirt. Because of how qemu handles migration,<br>
libvirt can allow only those shared FS which are also cache coherent. I<br>
have no experience with quobyte and it looks like a proprietary<br>
solution. Wasn't it formerly known as XtreemFS?<br>
<br>
Michal<br>
</blockquote></div><div><br></div><div>The magic number was defined only in this patch, so far we've never needed</div><div>to define this. It's serving as a unique id for the Quobyte filesystem.</div><div><br></div><div>Regarding cache coherence: yes this is supported. Quobyte has specific libvirt</div><div>migration support to ensure this.</div><div><br></div><div>Regarding XtreemFS: Yep, Quobyte basically is a rewritten, improved and over</div><div>the years much more advanced proprietary version of XtreemFS. A major portion</div><div>of the original xtreemfs dev team founded and/or worked/works at Quobyte.</div><div><br></div><div>Thanks for reviewing and sorry for the late reply, i was on vacation.</div><div>Best</div><div>Silvan<br clear="all"><div><br></div><div><br></div>-- <br><div dir="ltr" class="m_-1168007180718423439m_-148720466963194433gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><span style="color:rgb(0,0,0);font-size:small">Dr.-Ing. Silvan Kaiser</span></div><div dir="ltr"><span style="color:rgb(0,0,0);font-size:small">Quobyte GmbH</span><br style="color:rgb(0,0,0);font-size:small"><span style="color:rgb(0,0,0);font-size:small">Hardenbergplatz 2, 10623 Berlin - Germany</span><br style="color:rgb(0,0,0);font-size:small"><span style="color:rgb(0,0,0);font-size:small">+49-30-814 591 800 - </span><a href="http://www.quobyte.com/" style="color:rgb(17,85,204);text-decoration:none;font-size:small" target="_blank">www.quobyte.com</a><span style="color:rgb(0,0,0);font-size:small"><</span><a href="http://www.quobyte.com/" style="color:rgb(17,85,204);text-decoration:none;font-size:small" target="_blank">http://www.quobyte.com/</a><span style="color:rgb(0,0,0);font-size:small">></span><br style="color:rgb(0,0,0);font-size:small"><span style="color:rgb(0,0,0);font-size:small">Amtsgericht Berlin-Charlottenburg, HRB 149012B</span><br style="color:rgb(0,0,0);font-size:small"><span style="color:rgb(0,0,0);font-size:small">Management board: Dr. Felix Hupfeld, Dr. Björn Kolbeck</span><br></div></div></div></div></div></div></div></div></div></div></div></div>