Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 31 Oct 2001 12:29:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 31 Oct 2001 12:28:58 -0500 Received: from ns.caldera.de ([212.34.180.1]:10904 "EHLO ns.caldera.de") by vger.kernel.org with ESMTP id ; Wed, 31 Oct 2001 12:28:32 -0500 Date: Wed, 31 Oct 2001 18:28:14 +0100 Message-Id: <200110311728.f9VHSE207521@ns.caldera.de> From: hch@caldera.de (Christoph Hellwig) To: adilger@turbolabs.com (Andreas Dilger) Cc: alan@lxorguk.ukuu.org.uk (Alan Cox), zzz@cd-club.ru (Denis Zaitsev), torvalds@transmeta.com (Linus Torvalds), linux-kernel@vger.kernel.org To: Linus Torvalds Subject: Re: [PATCH] init/main.c/root_dev_names - another one #ifdef X-Newsgroups: caldera.lists.linux.kernel In-Reply-To: <20011030182810.B800@lynx.no> User-Agent: tin/1.4.4-20000803 ("Vet for the Insane") (UNIX) (Linux/2.4.2 (i686)) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org In article <20011030182810.B800@lynx.no> you wrote: > I have a patch from way back (not mine) which allows the name to be > generated by the block device driver code. Let me know if you are > interested. This also fixes the ugly "lvma" "lvmb" devices that are > in /proc/partitions. In OpenGFS CVS we have such a patch as well. Version for -ac is attached. Christoph -- Of course it doesn't work. We've performed a software upgrade. diff -uNr -Xdontdiff ../master/linux-2.4.10-ac4/drivers/ide/ide-probe.c linux/drivers/ide/ide-probe.c --- ../master/linux-2.4.10-ac4/drivers/ide/ide-probe.c Tue Oct 30 14:54:22 2001 +++ linux/drivers/ide/ide-probe.c Wed Oct 31 18:21:20 2001 @@ -759,6 +759,8 @@ } minors = units * (1<sizes = kmalloc (minors * sizeof(int), GFP_KERNEL); gd->part = kmalloc (minors * sizeof(struct hd_struct), GFP_KERNEL); bs = kmalloc (minors*sizeof(int), GFP_KERNEL); diff -uNr -Xdontdiff ../master/linux-2.4.10-ac4/fs/partitions/check.c linux/fs/partitions/check.c --- ../master/linux-2.4.10-ac4/fs/partitions/check.c Tue Oct 30 14:54:29 2001 +++ linux/fs/partitions/check.c Wed Oct 31 18:20:40 2001 @@ -99,6 +99,9 @@ unsigned int unit = (minor >> hd->minor_shift); unsigned int part = (minor & ((1 << hd->minor_shift) -1 )); + if (hd->device_names) + return hd->device_names[minor]; + if ((unit < hd->nr_real) && hd->part[minor].de) { int pos; diff -uNr -Xdontdiff ../master/linux-2.4.10-ac4/include/linux/genhd.h linux/include/linux/genhd.h --- ../master/linux-2.4.10-ac4/include/linux/genhd.h Tue Oct 30 14:54:31 2001 +++ linux/include/linux/genhd.h Wed Oct 31 18:20:54 2001 @@ -83,6 +83,8 @@ devfs_handle_t *de_arr; /* one per physical disc */ char *flags; /* one per physical disc */ +#define _HAVE_GENDISK_DEVICE_NAMES + char **device_names; }; /* drivers/block/genhd.c */ - 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/