~csurbhi/ubuntu/maverick/e2fsprogs/e2fsprogs.fix-505719

« back to all changes in this revision

Viewing changes to e2fsck/super.c

  • Committer: Bazaar Package Importer
  • Author(s): Scott James Remnant
  • Date: 2010-06-07 15:49:29 UTC
  • mfrom: (8.2.4 sid)
  • Revision ID: james.westby@ubuntu.com-20100607154929-grzivujb4fs2nvb3
Tags: 1.41.12-1ubuntu1
* Merge from Debian unstable, remaining changes:
  - Do not build-depend on dietlibc-dev, which is universe.
  - Do now allow pkg-create-dbgsym to operate on this package.
  - Always use external libblkid and libuuid from util-linux, rather than
    building our own.
  - Includes debian/control in the source package to force the above.
  - Build with -O2 on powerpc to avoid a suspected toolchain bug
    (LP: #450214).
  - Do not include /etc/e2fsck.conf and remove on upgrade.
  (Fixes LP: #521648, #537483, #530071)

Show diffs side-by-side

added added

removed removed

Lines of Context:
464
464
        int     ipg_max;
465
465
        int     inode_size;
466
466
        int     accept_time_fudge;
 
467
        int     broken_system_clock;
467
468
        dgrp_t  i;
468
469
        blk_t   should_be;
469
470
        struct problem_context  pctx;
821
822
                            0, accept_time_fudge, &accept_time_fudge);
822
823
        ctx->time_fudge = accept_time_fudge ? 86400 : 0;
823
824
 
 
825
        profile_get_boolean(ctx->profile, "options", "broken_system_clock",
 
826
                            0, 0, &broken_system_clock);
 
827
 
824
828
        /*
825
829
         * Check to see if the superblock last mount time or last
826
830
         * write time is in the future.
827
831
         */
828
 
        if (fs->super->s_mtime > (__u32) ctx->now) {
 
832
        if (!broken_system_clock &&
 
833
            !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
 
834
            fs->super->s_mtime > (__u32) ctx->now) {
829
835
                pctx.num = fs->super->s_mtime;
830
836
                problem = PR_0_FUTURE_SB_LAST_MOUNT;
831
837
                if (fs->super->s_mtime <= (__u32) ctx->now + ctx->time_fudge)
835
841
                        ext2fs_mark_super_dirty(fs);
836
842
                }
837
843
        }
838
 
        if (fs->super->s_wtime > (__u32) ctx->now) {
 
844
        if (!broken_system_clock &&
 
845
            !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
 
846
            fs->super->s_wtime > (__u32) ctx->now) {
839
847
                pctx.num = fs->super->s_wtime;
840
848
                problem = PR_0_FUTURE_SB_LAST_WRITE;
841
849
                if (fs->super->s_wtime <= (__u32) ctx->now + ctx->time_fudge)