Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-12-01 Thread Wouter van Heyst
On Sun, Nov 22, 2009 at 12:32:16PM +, Ben Hutchings wrote: > On Sun, 2009-11-22 at 12:42 +0100, Wouter van Heyst wrote: ... > > I'm running 2.6.32-rc7 with this patch applied and > > CONFIG_MMC_UNSAFE_RESUME=y > > That works as desired for my non-removable case. Is it desired that I > > test

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Maxim Levitsky
On Mon, 2009-11-30 at 13:51 +, Alan Cox wrote: > > Before we do suspend, pick few random sectors from the media, run that > > through some hash function, thus creating some sort of watermark. > > Statistically speaking the chances are you'll catch zero sectors and > lose. You'll also not dete

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Alan Cox
> Before we do suspend, pick few random sectors from the media, run that > through some hash function, thus creating some sort of watermark. Statistically speaking the chances are you'll catch zero sectors and lose. You'll also not detect the suspend, move to other box, use, put back error. That i

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Maxim Levitsky
On Mon, 2009-11-30 at 13:39 +0100, Pierre Ossman wrote: > On Tue, 17 Nov 2009 08:53:00 +0100 > Stefan Richter wrote: > > > Ben Hutchings wrote: > > > In general, it is not possible to tell whether a card present in an MMC > > > slot after resume is the same that was there before suspend. > > >

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Pierre Ossman
On Mon, 30 Nov 2009 12:54:05 + Alan Cox 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 b

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Alan Cox
> You do not cater for having more than one slot e.g. N900 has two: > one internal non-removable and one external that is removable. > > What about a sysfs entry instead e.g. > > /sys/class/mmc-host/mmc*/nonremovable That continues the assumption that the user will somehow ever know about this

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Adrian Hunter
Ben Hutchings wrote: Some people run general-purpose distribution kernels on netbooks with a card that is physically non-removable or logically non-removable (e.g. used for /home) and cannot be cleanly unmounted during suspend. Add a module parameter to set whether cards are assumed removable or

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Alan Cox
> I'm afraid that's insufficient. What it would need to do is to is > flush everything (to make sure what's on disk matches what's in > memory), but also read back the filesystem on resume to verify that > nothing else modified it (i.e. making sure what's on disk still matches > what's in memory).

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-30 Thread Pierre Ossman
On Tue, 17 Nov 2009 08:53:00 +0100 Stefan Richter wrote: > Ben Hutchings wrote: > > In general, it is not possible to tell whether a card present in an MMC > > slot after resume is the same that was there before suspend. > > That's true for virtually all storage devices, not just MMC. > > > So

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-22 Thread Ben Hutchings
On Sun, 2009-11-22 at 12:42 +0100, Wouter van Heyst wrote: > On Mon, Nov 16, 2009 at 10:31:49PM +, Ben Hutchings wrote: [...] > > In general, it is not possible to tell whether a card present in an MMC > > slot after resume is the same that was there before suspend. So there > > are two possib

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-22 Thread Wouter van Heyst
On Mon, Nov 16, 2009 at 10:31:49PM +, Ben Hutchings wrote: > On Mon, 2009-11-16 at 12:23 -0800, Andrew Morton wrote: > > On Wed, 11 Nov 2009 04:44:36 + > > Ben Hutchings wrote: > > > > > Some people run general-purpose distribution kernels on netbooks with > > > a card that is physically

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-17 Thread Stefan Richter
Ben Hutchings wrote: > In general, it is not possible to tell whether a card present in an MMC > slot after resume is the same that was there before suspend. That's true for virtually all storage devices, not just MMC. > So there are two possible behaviours, each of which will cause data > loss i

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-16 Thread Ben Hutchings
On Mon, 2009-11-16 at 12:23 -0800, Andrew Morton wrote: > On Wed, 11 Nov 2009 04:44:36 + > Ben Hutchings wrote: > > > Some people run general-purpose distribution kernels on netbooks with > > a card that is physically non-removable or logically non-removable > > (e.g. used for /home) and cann

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-16 Thread Andrew Morton
On Wed, 11 Nov 2009 04:44:36 + Ben Hutchings wrote: > Some people run general-purpose distribution kernels on netbooks with > a card that is physically non-removable or logically non-removable > (e.g. used for /home) and cannot be cleanly unmounted during suspend. > Add a module parameter to

Bug#504391: [PATCH] mmc: add module parameter to set whether cards are assumed removable

2009-11-10 Thread Ben Hutchings
Some people run general-purpose distribution kernels on netbooks with a card that is physically non-removable or logically non-removable (e.g. used for /home) and cannot be cleanly unmounted during suspend. Add a module parameter to set whether cards are assumed removable or non-removable, with the