lkml.org 
[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC PATCH 35/35] Add Xen virtual block device driver.
    Chris Wright wrote:
    > The block device frontend driver allows the kernel to access block
    > devices exported exported by a virtual machine containing a physical
    > block device driver.
    >

    > +
    > +static struct xlbd_type_info xlbd_ide_type = {
    > + .partn_shift = 6,
    > + .disks_per_major = 2,
    > + .devname = "ide",
    > + .diskname = "hd",
    > +};
    > +
    > +static struct xlbd_type_info xlbd_scsi_type = {
    > + .partn_shift = 4,
    > + .disks_per_major = 16,
    > + .devname = "sd",
    > + .diskname = "sd",
    > +};
    > +
    > +static struct xlbd_type_info xlbd_vbd_type = {
    > + .partn_shift = 4,
    > + .disks_per_major = 16,
    > + .devname = "xvd",
    > + .diskname = "xvd",
    > +};
    >

    This is another thing that has always put me off. The virtual block
    device driver has the ability to masquerade as other types of block
    devices. It actually claims to be an IDE or SCSI device allocating the
    appropriate major/minor numbers.

    This seems to be pretty evil and creating interesting failure conditions
    for users who load IDE or SCSI modules. I've seen it trip up a number
    of people in the past. I think we should only ever use the major number
    that was actually allocated to us.

    Regards,

    Anthony Liguori

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-03-22 17:42    [W:4.034 / U:0.060 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site