From: Neil Brown If programs like mount use /proc/partitions to find filesystems based on labels, then surely we want md devices in there as they often contain filesystems. If the problem is that mount-by-label takes forever with removable media then surely the "right" approch is the following patch, and then actually set this flag on the "floppy.c" device. (It is already set for ide-floppy and sd devices). DESC Mark floppies as being removeable EDESC --- drivers/block/floppy.c | 1 + drivers/block/genhd.c | 6 ++++-- drivers/ide/ide-cd.c | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff -puN drivers/block/genhd.c~proc-partitions-omit-removable-media drivers/block/genhd.c --- 25/drivers/block/genhd.c~proc-partitions-omit-removable-media 2004-01-29 18:30:49.000000000 -0800 +++ 25-akpm/drivers/block/genhd.c 2004-01-29 18:30:49.000000000 -0800 @@ -260,8 +260,10 @@ static int show_partition(struct seq_fil if (&sgp->kobj.entry == block_subsys.kset.list.next) seq_puts(part, "major minor #blocks name\n\n"); - /* Don't show non-partitionable devices or empty devices */ - if (!get_capacity(sgp) || sgp->minors == 1) + /* Don't show non-partitionable removeable devices or empty devices */ + if (!get_capacity(sgp) || + (sgp->minors == 1 && (sgp->flags & GENHD_FL_REMOVABLE)) + ) return 0; /* show the full disk and all non-0 size partitions of it */ diff -puN drivers/ide/ide-cd.c~proc-partitions-omit-removable-media drivers/ide/ide-cd.c --- 25/drivers/ide/ide-cd.c~proc-partitions-omit-removable-media 2004-01-29 18:30:49.000000000 -0800 +++ 25-akpm/drivers/ide/ide-cd.c 2004-01-29 18:30:49.000000000 -0800 @@ -3511,7 +3511,7 @@ static int ide_cdrom_attach (ide_drive_t snprintf(g->devfs_name, sizeof(g->devfs_name), "%s/cd", drive->devfs_name); g->driverfs_dev = &drive->gendev; - g->flags = GENHD_FL_CD; + g->flags = GENHD_FL_CD | GENHD_FL_REMOVABLE; if (ide_cdrom_setup(drive)) { struct cdrom_device_info *devinfo = &info->devinfo; DRIVER(drive)->busy--; diff -puN drivers/block/floppy.c~proc-partitions-omit-removable-media drivers/block/floppy.c --- 25/drivers/block/floppy.c~proc-partitions-omit-removable-media 2004-01-29 18:31:03.000000000 -0800 +++ 25-akpm/drivers/block/floppy.c 2004-01-29 18:31:03.000000000 -0800 @@ -4376,6 +4376,7 @@ int __init floppy_init(void) /* to be cleaned up... */ disks[drive]->private_data = (void*)(long)drive; disks[drive]->queue = floppy_queue; + disks[drive]->flags |= GENHD_FL_REMOVABLE; add_disk(disks[drive]); } _