linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Kulow <coolo@suse.de>
To: Theodore Tso <tytso@mit.edu>
Cc: linux-ext4@vger.kernel.org
Subject: Re: buggy_init_scritps and e2fsprogs 1.41.9
Date: Fri, 11 Sep 2009 12:38:49 +0200	[thread overview]
Message-ID: <200909111238.50029.coolo@suse.de> (raw)
In-Reply-To: <20090911005503.GI6705@mit.edu>

On Friday 11 September 2009 02:55:03 Theodore Tso wrote:
> On Thu, Sep 10, 2009 at 10:57:54PM +0200, Stephan Kulow wrote:
> > The work flow is as such:
> > - boot into live cd, live cd thinks system is UTC, mounts sda1 (ro)
> >   at 9am, umounts cleanly, updates mount time to 11am (hardware clock)
> 
> That doesn't make any sense.  The mount time is only set if the
> filesystem is mounted read/write.  So if you only mounted the
> filesystem read/only, the mount time wouldn't be changed.  Watch:
> 
I wasn't certain if it also happens with ro, so I put the ro in ().

> 
> Now, if the Live CD is going to be repairing a filesystem, it should
> mount the root filesystem read/only, extract the time zone, fix the
> system clock, and only then mount the filesystem read/write.
> 
> Or the Live CD should fix the system clock over the network before it
> tries mounting any hard drives.  The point is, there are ways for the
> Live CD to do the right thing.  If it's not willing to do that, then
> its init scripts are buggy.  :-)
> 
It doesn't matter if the live init scripts are buggy or not, because the
real system's fsck will be the one to complain about future mounts.

Ok, perhaps it's clearer if you think about it this way:
- installing openSUSE using local time
- boot ubuntu live cd (assuming utc), mount /data (in the future), 
  umount cleanly
- reboot into openSUSE (without buggy init scripts) 
   -> UNEXPECTED INCONSISTENCY, need to repair

I think this is pretty much expected as ubuntu has little chance to figure out 
the timezone of the system using /data normally.

What you're saying is basically: screw everyone living east and using dual 
boot. fsck repairs way more serious problems without any problem, but if I 
share data between ubuntu and openSUSE I need to go into single mode 
afterwards?

At least consider this one:

--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -836,7 +836,7 @@ void check_super_block(e2fsck_t ctx)
                pctx.num = fs->super->s_wtime;
                problem = PR_0_FUTURE_SB_LAST_WRITE;
                if (fs->super->s_wtime <= (__u32) ctx->now + ctx->time_fudge)
-                       problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+                       problem = PR_0_FUTURE_SB_LAST_WRITE_FUDGED;
                if (fix_problem(ctx, problem, &pctx)) {
                        fs->super->s_wtime = ctx->now;
                        ext2fs_mark_super_dirty(fs);

Greetings, Stephan

  reply	other threads:[~2009-09-11 10:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-10 12:55 buggy_init_scritps and e2fsprogs 1.41.9 Stephan Kulow
2009-09-10 13:03 ` Stephan Kulow
2009-09-10 13:11   ` Stephan Kulow
2009-09-10 20:29 ` Theodore Tso
2009-09-10 20:57   ` Stephan Kulow
2009-09-11  0:55     ` Theodore Tso
2009-09-11 10:38       ` Stephan Kulow [this message]
2009-09-10 21:32   ` Theodore Tso

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=200909111238.50029.coolo@suse.de \
    --to=coolo@suse.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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).