From: Pierre Ossman <pierre@ossman.eu>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>,
Ben Hutchings <ben@decadent.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mmc@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
504391@bugs.debian.org,
Wouter van Heyst <larstiq@larstiq.dyndns.org>
Subject: Re: [PATCH] mmc: add module parameter to set whether cards are assumed removable
Date: Mon, 30 Nov 2009 14:09:28 +0100 [thread overview]
Message-ID: <20091130140928.29d847a4@mjolnir.ossman.eu> (raw)
In-Reply-To: <20091130125405.541a6a01@lxorguk.ukuu.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1662 bytes --]
On Mon, 30 Nov 2009 12:54:05 +0000
Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>
> For most file systems it is sufficient to check the superblock related
> information. So we'd need an fs->ops->validate_media() or somesuch but it
> wouldn't be that horrific or need to do much I/O in most cases.
>
> You could defeat that by being really stupid, but the purpose of the
> check isn't a stupidity filter but to stop accidents happening in normal
> use.
>
Agreed. Something like that would more or less solve the issue. Someone
just needs to write the code for all (or most) filesystems.
> > Another way of putting it is that the kernel needs to umount/mount
> > around suspend in a way that's transparent to users of the filesystem.
>
> No. The kernel needs to push stuff to media on suspend (which is good
> manners anyway), and validate on resume. if the validate fails you mark
> the media as changed and the block layer will already see to it that
> everything gets aborted as it already does with a truely removable device.
>
> In fact if you did this by media serial numbers and idents you don't even
> need the fs hook, although it would certainly be safer that way.
>
The hardware driver layer can only check if it's the same device being
plugged in, not if someone has done something with it during suspend,
so I see no other way than solving this in the filesystem layer.
Rgds
--
-- Pierre Ossman
WARNING: This correspondence is being monitored by FRA, a
Swedish intelligence agency. Make sure your server uses
encryption for SMTP traffic and consider using PGP for
end-to-end encryption.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
next prev parent reply other threads:[~2009-11-30 13:09 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-11 4:44 [PATCH] mmc: add module parameter to set whether cards are assumed removable Ben Hutchings
2009-11-16 20:23 ` Andrew Morton
2009-11-16 22:31 ` Ben Hutchings
2009-11-17 7:53 ` Stefan Richter
2009-11-30 12:39 ` Pierre Ossman
2009-11-30 12:54 ` Alan Cox
2009-11-30 13:09 ` Pierre Ossman [this message]
2009-11-30 13:32 ` Maxim Levitsky
2009-11-30 13:51 ` Alan Cox
2009-11-30 15:27 ` Maxim Levitsky
2009-11-22 11:42 ` Bug#504391: " Wouter van Heyst
2009-11-22 12:32 ` Ben Hutchings
2009-12-01 19:57 ` Wouter van Heyst
2009-11-30 12:38 ` Adrian Hunter
2009-11-30 12:48 ` Alan Cox
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=20091130140928.29d847a4@mjolnir.ossman.eu \
--to=pierre@ossman.eu \
--cc=504391@bugs.debian.org \
--cc=akpm@linux-foundation.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=ben@decadent.org.uk \
--cc=larstiq@larstiq.dyndns.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=stefanr@s5r6.in-berlin.de \
/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