public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Todd Poynor <tpoynor@mvista.com>
To: linux-mtd@lists.infradead.org
Subject: mtdblock cache flush at remount
Date: Wed, 18 Aug 2004 18:10:49 -0700	[thread overview]
Message-ID: <4123FE19.9000109@mvista.com> (raw)

So far as I've been able to determine, the mtdblock cache is not 
automatically flushed after a remount read-only, including remounts 
performed by a sysrq-s emergency sync.

To pick the somewhat silly example of an ext3 filesystem, the "no 
recovery needed" superblock modification of which still sits in the 
cache after the remount:

# mount -o remount -o ro /mnt/mtd
# dumpe2fs /dev/mtd2
...
Filesystem features:      has_journal filetype needs_recovery sparse_super
...
# # Block access shows the modified value, and the mount/unmount
# # flushes the value to flash.
# dumpe2fs /dev/mtdblock2
...
Filesystem features:      has_journal filetype sparse_super
...
# dumpe2fs /dev/mtd2
...
Filesystem features:      has_journal filetype sparse_super

Since the block is committed from the block layer's point of view, even 
a following sync won't flush it out; it seems only something like an 
unmount (which explicitly calls the block device layer to release the 
superblock) will flush it.  In certain admittedly unusual situations 
this is undesirable (in particular, consumer electronics device flushing 
and marking clean filesystems prior to a prolonged system suspend 
interval during which it is expected batteries may die or be changed).

Figured I'd check whether anybody feels this is something that could and 
should be fixed or whether there's already a solution for this.  I've 
recommended use of only mtd-savvy filesystems like JFFS2 for this sort 
of usage, but the CE developers I talked to felt filesystems over 
mtdblock were also important.  Thanks,

-- 
Todd Poynor
MontaVista Software

             reply	other threads:[~2004-08-19  1:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-19  1:10 Todd Poynor [this message]
2004-08-19  8:27 ` mtdblock cache flush at remount David Woodhouse
2004-09-14  1:08   ` Todd Poynor
2004-09-14  6:52     ` David Woodhouse

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=4123FE19.9000109@mvista.com \
    --to=tpoynor@mvista.com \
    --cc=linux-mtd@lists.infradead.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