mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-30 16:13:54 +08:00
bd68e0838f
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 default set by CONFIG_MMC_UNSAFE_RESUME. 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 possible behaviours, each of which will cause data loss in some cases: CONFIG_MMC_UNSAFE_RESUME=n (default): Cards are assumed to be removed during suspend. Any filesystem on them must be unmounted before suspend; otherwise, buffered writes will be lost. CONFIG_MMC_UNSAFE_RESUME=y: Cards are assumed to remain present during suspend. They must not be swapped during suspend; otherwise, buffered writes will be flushed to the wrong card. Currently the choice is made at compile time and this allows that to be overridden at module load time. Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Cc: Wouter van Heyst <larstiq@larstiq.dyndns.org> Cc: <linux-mmc@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
19 lines
637 B
Plaintext
19 lines
637 B
Plaintext
#
|
|
# MMC core configuration
|
|
#
|
|
|
|
config MMC_UNSAFE_RESUME
|
|
bool "Assume MMC/SD cards are non-removable (DANGEROUS)"
|
|
help
|
|
If you say Y here, the MMC layer will assume that all cards
|
|
stayed in their respective slots during the suspend. The
|
|
normal behaviour is to remove them at suspend and
|
|
redetecting them at resume. Breaking this assumption will
|
|
in most cases result in data corruption.
|
|
|
|
This option is usually just for embedded systems which use
|
|
a MMC/SD card for rootfs. Most people should say N here.
|
|
|
|
This option sets a default which can be overridden by the
|
|
module parameter "removable=0" or "removable=1".
|