Re: [PATCH] Re: Old HD driver does not compile in 2.3.99pre9-2

From: Alexander Viro (aviro@redhat.com)
Date: Sat May 20 2000 - 20:18:28 EDT

  • Next message: Dave Jones: "Incorrect values in /proc/sys/fs/file-nr [pre9-2]"

    On Sun, 21 May 2000, Andries Brouwer wrote:

    > > hda: 0MB, CHS=1108/255/63
    > > ^^^^^
    > > Partition check:
    > > hda: hda1 hda2 hda3
    > > ...
    > >
    > > and kernel cannot mount root fs on hda3.
    >
    > Yes. That is a bug introduced in 2.3.40 by Al Viro's
    > "grok_partitions" patch, if I am not mistaken.

    "0Mb" one - guilty as charged, but "cannot mount root" is something else.

    > Patch (on 2.3.99p8):
    > ----------------------------------------------------------------
    > --- hd.c~ Sun Mar 26 13:06:39 2000
    > +++ hd.c Sun May 21 01:19:35 2000
    > @@ -778,6 +778,8 @@
    > #endif
    >
    > for (drive=0 ; drive < NR_HD ; drive++) {
    > + hd[drive<<6].nr_sects = hd_info[drive].head *
    > + hd_info[drive].sect * hd_info[drive].cyl;
    > printk ("hd%c: %ldMB, CHS=%d/%d/%d\n", drive+'a',
    > hd[drive<<6].nr_sects / 2048, hd_info[drive].cyl,
    > hd_info[drive].head, hd_info[drive].sect);
    > ----------------------------------------------------------------
    >
    > > Any suggestions how should it be fixed ?
    >
    > See above. Please complain if this doesnt fix it.

    Very odd - check the register_disk() call several lines below. It does exactly
    the same assignment and code between these points is not affected by
    your change. I would be _very_ surprised if simple substitution
    hd_info[drive].sect*...*.... in place of hd[drive<<6].nr_sects would
    have an effect different from your patch.

    > > Or is the "old disk-only driver" hd.c obsolete and to be dropped ?
    >
    > The fact that you are the first to complain is an indication
    > that not many kernel developers use this old hd.c.
    > But it should remain functional.

    That's true, but it looks like his problems are not limited to fscked
    printk() argument...

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



    This archive was generated by hypermail 2b29 : Sat May 20 2000 - 20:43:27 EDT