From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Syed Mohammed, Khasim" <khasim@ti.com>
Cc: Pierre Ossman <drzeus@drzeus.cx>,
"Chikkature Rajashekar, Madhusudhan" <madhu.cr@ti.com>,
"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: Re: MMC/SD cards hotplug scenario
Date: Thu, 22 May 2008 21:01:23 +0100 [thread overview]
Message-ID: <20080522200123.GS15328@flint.arm.linux.org.uk> (raw)
In-Reply-To: <0680EC522D0CC943BC586913CF3768C0015799CFD8@dbde02.ent.ti.com>
On Fri, May 23, 2008 at 01:16:39AM +0530, Syed Mohammed, Khasim wrote:
> > The obscene amount of noise here seems to be caused by ext2 being
> > extremely persistent. This is generally a good thing for your data
> > though. :)
> >
> > What is missing is a decent way for a block device to tell the upper
> > layers that is gone with no hope of ever coming back. Right now we just
> > tell it that there was a write error, which just makes the upper layers
> > retry and retry.
> >
> In this scenario, do you think it would be right to kill the ongoing
> copy from application space, say for example an UI is running for MMC
> copy and when the card is removed the app gets notified may be through
> hotplug event or signaling and then app just kills the process that is
> issuing this copy request. This will prevent long running errors. Just
> a thought,
If you pick out the errors from 'cp', you'll see that the system is
telling 'cp' that it's getting IO errors. Nevertheless, 'cp' carries
on trying to copy each file (and rightfully so.)
However, there is another issue here - if you're going to be ejecting
a medium containing an ext2fs filesystem at some random point, you
absolutely must run e2fsck before remounting it - the filesystem _will_
be in an inconsistent state at the point you eject the card.
Moreover, I wouldn't be surprised if you keep doing this with a card,
that the card's firmware will eventually get confused and die.
Basically, what I'm trying to say is that ejecting any medium randomly
from the system is _always_ going to result in problems of some nature.
Some of which you can reduce the impact from, others are fairly terminal.
The only safe solution is the unmount, wait for data to be written, and
then eject the card.
next prev parent reply other threads:[~2008-05-22 20:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-21 6:12 MMC/SD cards hotplug scenario Madhusudhan Chikkature Rajashekar
2008-05-21 7:30 ` Russell King - ARM Linux
2008-05-21 9:31 ` Madhusudhan Chikkature Rajashekar
2008-05-21 18:32 ` Pierre Ossman
2008-05-22 13:40 ` Madhusudhan Chikkature Rajashekar
2008-06-01 10:03 ` Pierre Ossman
2008-05-22 19:46 ` Syed Mohammed, Khasim
2008-05-22 20:01 ` Russell King - ARM Linux [this message]
2008-05-22 20:39 ` Igor Stoppa
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=20080522200123.GS15328@flint.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=drzeus@drzeus.cx \
--cc=khasim@ti.com \
--cc=linux-omap@vger.kernel.org \
--cc=madhu.cr@ti.com \
/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