public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: Christoph Hellwig <hch@infradead.org>,
	Andries Brouwer <aebr@win.tue.nl>,
	Pierre Ossman <drzeus-list@drzeus.cx>,
	Al Viro <viro@ftp.uk.linux.org>, Jens Axboe <axboe@suse.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] MMC block removable flag
Date: Sat, 8 Jan 2005 12:45:38 +0000	[thread overview]
Message-ID: <20050108124538.B11515@flint.arm.linux.org.uk> (raw)
In-Reply-To: <20050108120517.GA27414@infradead.org>; from hch@infradead.org on Sat, Jan 08, 2005 at 12:05:17PM +0000

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

  reply	other threads:[~2005-01-08 12:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-30  2:14 [PATCH] MMC block removable flag Pierre Ossman
2004-12-30  9:54 ` Russell King
2004-12-30 15:56   ` Pierre Ossman
2005-01-07 12:39     ` Russell King
2005-01-07 14:00       ` Andries Brouwer
2005-01-08 11:09         ` Russell King
2005-01-08 12:05           ` Christoph Hellwig
2005-01-08 12:45             ` Russell King [this message]
2005-01-08 13:07           ` Andries Brouwer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050108124538.B11515@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=aebr@win.tue.nl \
    --cc=axboe@suse.de \
    --cc=drzeus-list@drzeus.cx \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ftp.uk.linux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox