From: Andries Brouwer <aebr@win.tue.nl>
To: 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: Fri, 7 Jan 2005 15:00:35 +0100 [thread overview]
Message-ID: <20050107140035.GA5920@pclin040.win.tue.nl> (raw)
In-Reply-To: <20050107123947.B23665@flint.arm.linux.org.uk>
On Fri, Jan 07, 2005 at 12:39:47PM +0000, Russell King wrote:
> On Thu, Dec 30, 2004 at 04:56:45PM +0100, Pierre Ossman wrote:
> > Russell King wrote:
> > >On Thu, Dec 30, 2004 at 03:14:07AM +0100, Pierre Ossman wrote:
> > >>A MMC card is a highly removable device. This patch makes the block
> > >>layer part of the MMC layer set the removable flag.
> > >
> > >I have this patch also floating around, but I've decided it isn't needed.
> > >I believe this flag is to indicate that we have removable media for a
> > >block device rather than to indicate that the block device can be removed.
> > >
> > >However, when we insert and remove a MMC card, we create and destroy the
> > >block device itself. Therefore, as far as the block layer is concerned,
> > >the device itself is being inserted and removed, so telling the block
> > >layer that the media is removable is just silly - you can't separate the
> > >flash media from the on-board MMC controller.
> > >
> > >(Note: any block device can be removed - you just rmmod the module
> > >supplying the block device driver, but this doesn't mean we mark all
> > >block devices with GENHD_FL_REMOVABLE.)
> >
> > I suspect that the removable flag might be used in different GUI:s to
> > figure out with block devices should be presented to the user in a nice
> > way. It's usually just the removable devices that need some form of
> > special handling. So even though, as you point out, the entire device
> > disappears it might be useful from a user interface perspective to have
> > this hint set. From what I've found this flag doesn't seem to change any
> > handling inside the kernel, just how the device should be perceived.
>
> Can anyone comment on the purpose of this (GENHD_FL_REMOVABLE) flag?
> Al? Jens?
GENHD_FL_REMOVABLE is set by a number of drivers (floppy, CDROM, ...).
It is used in two places:
(1) to fill the file /sys/block/*/removable
(2) in genhd to suppress listing a nonpartitioned removable device
in /proc/partitions.
In other words, it is for user space only, precisely as Pierre Ossman said.
Andries
next prev parent reply other threads:[~2005-01-07 14:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-30 2:14 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 [this message]
2005-01-08 11:09 ` Russell King
2005-01-08 12:05 ` Christoph Hellwig
2005-01-08 12:45 ` Russell King
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=20050107140035.GA5920@pclin040.win.tue.nl \
--to=aebr@win.tue.nl \
--cc=axboe@suse.de \
--cc=drzeus-list@drzeus.cx \
--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
all inboxes | Powered by JetHome®