First off, just wanted to let the developers know this is good stuff, and I''ve been having fun playing around with Xen so far, despite some of the difficulties. I hope to contribute some work soon to add a couple of more network drivers to the mix, now that I finally got xeno-unstable working. I ran into a regression between 1.1 and unstable in the xl_block driver related to IDE CD-ROM drives. The drive is correctly detected at boot both by Xen and Xenolinux, but when I attempt to mount it, like so: mount /dev/hda /mnt I get the error "/dev/hda is not a valid block device." The problems seems to be in this section of code in xenolinux_block_open() in xl_block.c: if(!gd->part[minor].nr_sects) { /* Device either doesn''t exist, or has zero capacity; we use a few cheesy heuristics to return the relevant error code */ if(disk->capacity || (minor & (gd->max_p - 1))) { // we have a real device, but no such partition, or we just // have a partition number so guess this is the problem return -ENXIO; // no such device or address } else if (gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) { // this is a removable device => assume that media is missing return -ENOMEDIUM; // media not present (this is a guess) } else // just go for the general ''no such device'' error return -ENODEV; // no such device } If I remove this code, I can mount the CD-ROM with no difficulty. I''ve been investigating the problem myself, but I figured I''d forward to the experts in charge who have been into this code a lot more than I have. -- Evan Deaubl evan@inuum.com ------------------------------------------------------- This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/ _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> I ran into a regression between 1.1 and unstable in the xl_block > driver related to IDE CD-ROM drives. The drive is correctly > detected at boot both by Xen and Xenolinux, but when I attempt to > mount it, like so: > > mount /dev/hda /mnt > > I get the error "/dev/hda is not a valid block device."First question: is there a CD-Rom in the drive at boot time? In the current world we''re not so good at detecting things like CDs being inserted or removed....> The problems seems to be in this section of code in xenolinux_block_open() in > xl_block.c: > > if(!gd->part[minor].nr_sects) { > /* Device either doesn''t exist, or has zero capacity; we use > a few cheesy heuristics to return the relevant error code */ > if(disk->capacity || (minor & (gd->max_p - 1))) { > // we have a real device, but no such partition, or we just > // have a partition number so guess this is the problem > return -ENXIO; // no such device or address > } else if (gd->flags[minor >> gd->minor_shift] & GENHD_FL_REMOVABLE) { > // this is a removable device => assume that media is missing > return -ENOMEDIUM; // media not present (this is a guess) > } else > // just go for the general ''no such device'' error > return -ENODEV; // no such device > }Indeed - as the comments indicate, this is pretty gross stuff trying to work around the fact that we didn''t bother porting all the cdrom stuff to do with media (and audio stuff etc). However I''d expect it to ''work'' in the sense that it should produce the error "mount: No medium found" if there''s no CD in the drive, or never trigger this if code if there was a CD in the drive at boot time. If you''re getting "Not a valid block device" that seems like something else is going on... Can you post the output from Xen and XenoLinux booting if you have it?> If I remove this code, I can mount the CD-ROM with no difficulty. I''ve been > investigating the problem myself, but I figured I''d forward to the experts in > charge who have been into this code a lot more than I have.Removing it completely is not the right thing to do, although it may well need to be fixed ''properly'' (i.e. pull in all the cdrom crap :-( cheers, S. ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM''s Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
> Indeed - as the comments indicate, this is pretty gross stuff trying > to work around the fact that we didn''t bother porting all the cdrom > stuff to do with media (and audio stuff etc). > > However I''d expect it to ''work'' in the sense that it should produce > the error "mount: No medium found" if there''s no CD in the drive, or > never trigger this if code if there was a CD in the drive at boot > time. If you''re getting "Not a valid block device" that seems like > something else is going on... > > Can you post the output from Xen and XenoLinux booting if you have it? > > > > If I remove this code, I can mount the CD-ROM with no difficulty. I''ve been > > investigating the problem myself, but I figured I''d forward to the experts in > > charge who have been into this code a lot more than I have. > > Removing it completely is not the right thing to do, although it may > well need to be fixed ''properly'' (i.e. pull in all the cdrom crap :-(I think I may have now fixed this problem in the unstable tree. I made a few other cleanups at the same time -- I''d appreciate it if you can pull teh updates and see if the problem has gone away (or got worse! ;-). -- Keir ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM''s Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
The only platform I''ve been able to test this on so far is a VMWare setup (I don''t imagine native hardware being different, as I''ve had the same results from both thus far), but here are the results. If I boot now with no disk in the drive, it reports "No medium found" in the drive, even when I put a disk in the drive to mount. If I boot with a disk in the drive, then it behaves the same as it did when I removed the block of code in xenolinux_block_open(). I will try and get the boot output to dump to a serial file and post it tomorrow. I concur, though, looks like bringing in all the CD-ROM code would be icky... -- Evan Deaubl evan@inuum.com Quoting Keir Fraser <Keir.Fraser@cl.cam.ac.uk>:> > > Indeed - as the comments indicate, this is pretty gross stuff trying > > to work around the fact that we didn''t bother porting all the cdrom > > stuff to do with media (and audio stuff etc). > > > > However I''d expect it to ''work'' in the sense that it should produce > > the error "mount: No medium found" if there''s no CD in the drive, or > > never trigger this if code if there was a CD in the drive at boot > > time. If you''re getting "Not a valid block device" that seems like > > something else is going on... > > > > Can you post the output from Xen and XenoLinux booting if you have it? > > > > > > > If I remove this code, I can mount the CD-ROM with no difficulty. I''ve > been > > > investigating the problem myself, but I figured I''d forward to the > experts in > > > charge who have been into this code a lot more than I have. > > > > Removing it completely is not the right thing to do, although it may > > well need to be fixed ''properly'' (i.e. pull in all the cdrom crap :-( > > I think I may have now fixed this problem in the unstable tree. I made > a few other cleanups at the same time -- I''d appreciate it if you can > pull teh updates and see if the problem has gone away (or got worse! > ;-).------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM''s Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click _______________________________________________ Xen-devel mailing list Xen-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xen-devel
>The only platform I''ve been able to test this on so far is a VMWare setup (I >don''t imagine native hardware being different, as I''ve had the same results >from both thus far), but here are the results. If I boot now with no disk in >the drive, it reports "No medium found" in the drive, even when I put a disk >in the drive to mount. If I boot with a disk in the drive, then it behaves >the same as it did when I removed the block of code in xenolinux_block_open().Ok good -- this is exactly what I''d expect it to do. For now the ''correct'' mode of operation is: if you ever think you want to use CD, make sure there''s one in the drive at boot. You can eject that and replace it with another and mount that later on, etc, and that should all work.>I will try and get the boot output to dump to a serial file and post it >tomorrow.Not really necessary I think.>I concur, though, looks like bringing in all the CD-ROM code would be icky...Ack; but what we should (and probably will) do is re-implement the ''revalidate'' functionality for 1.2 and arrange for that to check the CD-ROM status in addition to regrooving the VBD state as necessary; nothing really hard there save trying to work out which linux genhd/blkdev functions are idempotent. It''s still not perfect, but at least nicer than the soln above :-) cheers, S.