WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [patch 20/20] XEN-paravirt: Add Xen virtual block de

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] Re: [patch 20/20] XEN-paravirt: Add Xen virtual block device driver.
From: Mark Williamson <mark.williamson@xxxxxxxxxxxx>
Date: Tue, 16 Jan 2007 02:53:42 +0000
Cc: Andrew Morton <akpm@xxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, virtualization@xxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Chris Wright <chrisw@xxxxxxxxxxxx>, Ian Pratt <ian.pratt@xxxxxxxxxxxxx>, Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>, Arjan van de Ven <arjan@xxxxxxxxxxxxx>
Delivery-date: Mon, 15 Jan 2007 18:53:27 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1168736848.3123.352.camel@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20070113014539.408244126@xxxxxxxx> <20070113014649.256179743@xxxxxxxx> <1168736848.3123.352.camel@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.5
> > +
> > +   err = xenbus_printf(xbt, dev->nodename,
> > +                       "ring-ref","%u", info->ring_ref);
>
> why do you need your own printf?

xenbus_printf isn't a printf replacement - it is used for writing a formatted 
string into XenStore (which contains  VM configuration data in a 
human-readable form).

Internally it does a vsnprintf into a buffer and writes the resulting string 
to the XenStore.

Cheers,
Mark

> > +static inline int GET_ID_FROM_FREELIST(
>
> does this really need screaming?
>
> > +
> > +int blkif_ioctl(struct inode *inode, struct file *filep,
> > +           unsigned command, unsigned long argument)
> > +{
> > +   int i;
> > +
> > +   DPRINTK_IOCTL("command: 0x%x, argument: 0x%lx, dev: 0x%04x\n",
> > +                 command, (long)argument, inode->i_rdev);
> > +
> > +   switch (command) {
> > +   case CDROMMULTISESSION:
> > +           DPRINTK("FIXME: support multisession CDs later\n");
> > +           for (i = 0; i < sizeof(struct cdrom_multisession); i++)
> > +                   if (put_user(0, (char __user *)(argument + i)))
> > +                           return -EFAULT;
> > +           return 0;
> > +
> > +   default:
> > +           /*printk(KERN_ALERT "ioctl %08x not supported by Xen blkdev\n",
> > +             command);*/
> > +           return -EINVAL; /* same return as native Linux */
> > +   }
>
> eh so you implement no ioctls.. why then implement the ioctl method at
> all?

I'm not familiar with this code...  but perhaps the (fake) multisession 
handling is to keep userspace that queries this happy?  I can't really think 
of anywhere this would apply off the top of my head, though.

Cheers,
Mark

> > +static struct xenbus_driver blkfront = {
> > +   .name = "vbd",
> > +   .owner = THIS_MODULE,
> > +   .ids = blkfront_ids,
> > +   .probe = blkfront_probe,
> > +   .remove = blkfront_remove,
> > +   .resume = blkfront_resume,
> > +   .otherend_changed = backend_changed,
> > +};
>
> this can be const
>
> > +
> > +#define DPRINTK(_f, _a...) pr_debug(_f, ## _a)
>
> why this silly abstraction? Just use pr_debug in the code directly
>
>
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel

-- 
Dave: Just a question. What use is a unicyle with no seat?  And no pedals!
Mark: To answer a question with a question: What use is a skateboard?
Dave: Skateboards have wheels.
Mark: My wheel has a wheel!

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>