linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Camille Moncelier <pix@devlife.org>
Cc: linux-fsdevel@vger.kernel.org, Andreas Dilger <adilger@sun.com>,
	ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [ext3] Changes to block device after an ext3 mount point has been remounted readonly
Date: Mon, 22 Feb 2010 23:32:52 +0100	[thread overview]
Message-ID: <20100222223252.GA13882@atrey.karlin.mff.cuni.cz> (raw)
In-Reply-To: <baaef4711002182338g17e42a7dpa47242dd334a27c2@mail.gmail.com>

> On Thu, Feb 18, 2010 at 10:41 PM, Andreas Dilger <adilger@sun.com> wrote:
> 
> > Are you sure this isn't because e2fsck has been run at boot time and changed
> > e.g. the "last checked" timestamp in the superblock?
> >
> No, I replaced /sbin/init by something which compute the sha1sum of
> the root partition, display it then call /sbin/init and I can see that
> the hash has changed after mount -o remount,ro.
> 
> As little as I understand, I managed to make a diff between two
> hexdump of small images where changes happened after I created a file
> and remounted the fs ro and it seems that, the driver didn't wrote
> changes to the disk until unmount  ( The hexdump clearly shows that
> /lost+found and /test file has been written after the umount )
> 
> workaround: Is there some knob in /proc or /sys which can trigger all
> pending changes to disk ? ( Like /proc/sys/vm/drop_caches but for
> filesystems ? )
  I've looked at your script. The problem is that "echo s >/proc/sysrq_trigger"
isn't really a data integrity operation. In particular it does not wait on
IO to finish (with the new writeback code it does not even wait for IO to be
submitted) so you sometimes take the image checksum before the sync actually
happens. If you used sync(1) instead, everything should work as expected...

								Honza
-- 
Jan Kara <jack@suse.cz>
SuSE CR Labs

  reply	other threads:[~2010-02-22 22:32 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-18 16:45 [ext3] Changes to block device after an ext3 mount point has been remounted readonly PiX
2010-02-18 16:50 ` Camille Moncelier
2010-02-18 21:41 ` Andreas Dilger
2010-02-19  7:38   ` Camille Moncelier
2010-02-22 22:32     ` Jan Kara [this message]
2010-02-22 23:05       ` Jan Kara
2010-02-22 23:09         ` Andreas Dilger
2010-02-23  8:42           ` Camille Moncelier
2010-02-23 13:55             ` Jan Kara
2010-02-24 16:01               ` Dmitry Monakhov
2010-02-24 16:26                 ` Camille Moncelier
2010-02-24 16:59                   ` Jan Kara
2010-02-24 16:56                 ` Jan Kara
2010-03-02  9:34                   ` Christoph Hellwig
2010-03-02 10:01                     ` Dmitry Monakhov
2010-03-02 13:26                       ` Jan Kara
2010-03-02 23:10                     ` Joel Becker
2010-02-24 16:57                 ` Eric Sandeen
2010-02-24 17:05                   ` Jan Kara
2010-02-24 17:26                     ` Dmitry Monakhov
2010-02-24 21:36                       ` Jan Kara
2010-03-02 10:29         ` Nick Piggin

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=20100222223252.GA13882@atrey.karlin.mff.cuni.cz \
    --to=jack@suse.cz \
    --cc=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=pix@devlife.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;
as well as URLs for NNTP newsgroup(s).