[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v7 16/18] xen: automatically create XenBlockDevice-s



> -----Original Message-----
> From: Anthony PERARD [mailto:anthony.perard@xxxxxxxxxx]
> Sent: 04 January 2019 16:31
> To: Paul Durrant <Paul.Durrant@xxxxxxxxxx>
> Cc: qemu-devel@xxxxxxxxxx; qemu-block@xxxxxxxxxx; xen-
> devel@xxxxxxxxxxxxxxxxxxxx; Kevin Wolf <kwolf@xxxxxxxxxx>; Max Reitz
> <mreitz@xxxxxxxxxx>; Stefano Stabellini <sstabellini@xxxxxxxxxx>
> Subject: Re: [PATCH v7 16/18] xen: automatically create XenBlockDevice-s
> 
> Almost done, there is one thing left which I believe is an issue.
> Whenever I attach a raw file to QEMU, it print:
>     qemu-system-i386: warning: Opening a block device as a file using the
> 'file' driver is deprecated

Oh, I'd not noticed that... but then I only use raw files occasionally.

> 
> So, I think the comment below isn't true. We should create a "raw"
> driver for "raw" files.
> 
> On Thu, Dec 20, 2018 at 05:14:37PM +0000, Paul Durrant wrote:
> > +static XenBlockDrive *xen_block_drive_create(const char *id,
> > +                                             const char *device_type,
> > +                                             QDict *opts, Error **errp)
> > +{
> ...
> 
> > +    if (params) {
> > +        char **v = g_strsplit(params, ":", 2);
> > +
> > +        if (v[1] == NULL) {
> > +            filename = g_strdup(v[0]);
> > +            driver = g_strdup("file");
> > +        } else {
> > +            if (strcmp(v[0], "aio") == 0) {
> > +                driver = g_strdup("file");
> > +            } else if (strcmp(v[0], "vhd") == 0) {
> > +                driver = g_strdup("vpc");
> > +            } else {
> > +                driver = g_strdup(v[0]);
> > +            }
> > +            filename = g_strdup(v[1]);
> > +        }
> > +
> > +        g_strfreev(v);
> > +    }
> > +
> ...
> 
> > +    /* If the image is a raw file then we are done */
> 
> raw files should use the "raw" driver, so we aren't done yet.
> 

Ok. Having a strictly 2-layer stack actually makes things simpler anyway :-)

  Paul

> > +    if (!strcmp(driver, "file")) {
> > +        goto done;
> > +    }
> 
> --
> Anthony PERARD

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.