[patch] 2.6.8 Errors during initrd loading with / on LVM over RAID

From: Frans Pop (aragorn_at_tiscali.nl)
Date: 07/30/05

  • Next message: Pavel Machek: "Re: Power consumption HZ100, HZ250, HZ1000: new numbers"
    To: linux-kernel@vger.kernel.org
    Date:	Sat, 30 Jul 2005 21:50:07 +0200
    
    
    
    

    I'm aware that devfs is being removed in 2.6.13, but this patch may still
    interest maintainers of older versions.
    I've debugged this problem using kernel version 2.6.8, but a check showed
    this code is unchanged in 2.6.12. My system is Debian Sarge.

    During boot using an initrd on a system having / on LVM over RAID, I
    noticed the following messages on console and in /var/log/kern.log:

    kernel: Inspecting /boot/System.map-2.6.8-2-686
    kernel: Loaded 27390 symbols from /boot/System.map-2.6.8-2-686.
    kernel: Symbols match kernel version 2.6.8.
    kernel: No module symbols loaded - kernel modules not enabled.
    kernel: ould not append to parent for /disc
    kernel: devfs_mk_dir: invalid argument.<4>devfs_mk_dev: could not append
    to parent for /disc
    last message repeated 151 times

    Cleaned for a missing \n in a printk and with added debug printk's in
    fs/devfs/base.c, this looks like:
    kernel: devfs_mk_dir: invalid argument, buf: .
    kernel: _devfs_append_entry: -EEXIST for :disc
    kernel: devfs_mk_dev: could not append to parent for /disc
    (repeated)

    The last two errors are a consequence of the error in devfs_mk_dir, so
    can be ignored. The basic problem is that buf is empty when devfs_mk_dir
    is called.

    Tracing back I ended up in fs/partitions/check.c, which has the following
    code in function register_disk:

            /* No minors to use for partitions */
            if (disk->minors == 1) {
                    if (disk->devfs_name[0] != '\0')
                            devfs_add_disk(disk);
                    return;
            }

            /* always add handle for the whole disk */
            devfs_add_partitioned(disk);

    This looks unlogical: why does the first statement check for empty
    disk->devfs_name and is the second one called blindly?

    Changing the last statement to:
            if (disk->devfs_name[0] != '\0')
                    devfs_add_partitioned(disk);
            else
                    printk(KERN_WARNING "%s: No devfs_name for %s.\n",
    __FUNCTION__, disk->disk_name);
    resulted in the errors disappearing and the following log output:

    kernel: register_disk: No devfs_name for md_d0.
    kernel: register_disk: No devfs_name for md_d64.
    kernel: register_disk: No devfs_name for md_d128.
    kernel: register_disk: No devfs_name for md_d192.
    kernel: register_disk: No devfs_name for md_d4.
    kernel: register_disk: No devfs_name for md_d68.
    kernel: register_disk: No devfs_name for md_d132.
    kernel: register_disk: No devfs_name for md_d196.
    (repeated to md_d255)

    The attached patch fixes the problem (and adds the missing \n).

    
    

    
    

    -
    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/




  • Next message: Pavel Machek: "Re: Power consumption HZ100, HZ250, HZ1000: new numbers"

    Relevant Pages

    • Re: RT patch acceptance
      ... judge the complexity of a design for that type of system. ... claim that you cannot judge the complexity of a kernel modification. ... Since the patch in question doesn't actually need that information to ... nanokernel's API up to date with additions to Linux's API that RT people ...
      (Linux-Kernel)
    • Re: Granting some root permissions to certain users
      ... We use a kernel patch called trustees to do just what you're talking ... Unfortunately the patch hasn't really been kept up-to-date. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: RT-V0.7.47-17 build fails
      ... On Monday 06 June 2005 03:41, Ingo Molnar wrote: ... >> I thought maybe I'd exersize this kernel, but a patch I thought ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: [PATCH] 2.6 workaround for Athlon/Opteron prefetch errata
      ... to avoid so we can get this in to the 2.6 kernel ASAP. ... I am pretty certain the patch won't impact the ... > might want to kill the condition depending on the stepping, ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: 2.6.3-rc1-mm1
      ... > This is the first time that anyone told me that it even existed. ... When we're at kernel version 2.6.3! ... without this patch. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)