lkml.org 
[lkml]   [2005]   [Jan]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] MMC block removable flag
On Sat, Jan 08, 2005 at 12:05:17PM +0000, Christoph Hellwig wrote:
> On Sat, Jan 08, 2005 at 11:09:57AM +0000, Russell King wrote:
> > Your point 2 isn't user space though.
> > Also, it's buggy. Consider a SCSI PCMCIA card with SCSI disks attached.
> > When you eject that card, your SCSI disks disappear, yet they aren't
> > marked as removable. If user space is relying on /sys/block/*/removable
> > to tell it if things may go away, then user space is buggy.
>
> It means removable media. The actual device can disappear for just about
> any driver these days, considering pci hotplug or PCMCIA or usb or..
>
> > Maybe it's for devices which may be present (eg, floppy driver), but
> > which have removable media (eg, floppy disk), rather than removable
> > devices?
>
> Yes. Else there would be very little driver that don't set the flag.

Ok. So the requirement is:

(a) removable media with permanent block devices should set this flag.
(b) removable block devices with permanent media should not set this flag.

MMC is definitely case (b) - the block device is created and destroyed
when the card is inserted and removed, since the block device corresponds
to the controller on the card rather than the MMC host adapter. The
media is permanently attached to the on-board controller.

Therefore, it would be incorrect for the MMC block device driver to set
the "removable" flag.

I guess we now find out how many user applications incorrectly interpret
this flag as meaning "this device may be user removable".

Maybe this needs documenting in Documentation/block so that everyone
knows what this flag is supposed to represent ?

--
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial core
-
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/

\
 
 \ /
  Last update: 2005-03-22 14:09    [from the cache]
©2003-2011 Jasper Spaans