Re: PATCH: 2.6.10 - Still mishandles volumes without geometry data

From: Alan Cox
Date: Wed Dec 29 2004 - 10:43:11 EST


On Mer, 2004-12-29 at 02:52, Andries Brouwer wrote:
> > + /* No non-LBA info .. so valid! */
> > + if (id->cyls == 0)
> > + return 1;
> > +
> > /*
> > * The ATA spec tells large drives to return
> > * C/H/S = 16383/16/63 independent of their size.
>
> Reasonable in case this actually occurs. Do you have examples?

Yes - raid volumes on IT8212 is one such example.

> > - pr_debug("%s: CHS=%u/%u/%u\n", drive->name, cyl, head, sect);
> > + if(cyl)
> > + pr_debug("%s: CHS=%u/%u/%u\n", drive->name, cyl, head, sect);
> >
> > hwif->OUTB(0x00, IDE_FEATURE_REG);
> > hwif->OUTB(nsectors.b.low, IDE_NSECTOR_REG);
>
> Unreasonable. This part must be a misunderstanding.
> The cyl here is not the number of cylinders of a disk,

Yep - as Bartlomiej correctly noted this was a mismerge when I fixed up
to 2.6.10

> > - printk(", CHS=%d/%d/%d",
> > - drive->bios_cyl, drive->bios_head, drive->bios_sect);
> > + if(drive->bios_cyl)
> > + printk(", CHS=%d/%d/%d",
> > + drive->bios_cyl, drive->bios_head, drive->bios_sect);
> > if (drive->using_dma)
> > ide_dma_verbose(drive);
> > printk("\n");
>
> Reasonable. (But s/if(/if (/ .)
> On the other hand, I like the "CHS=0/0/0" - it makes very clear what is wrong
> in case lilo or so has geometry problems.

0/0/0 is valid in these cases - would it be better if it printed
something else instead for that situation ("No physical geometry, ")
perhaps ?

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