~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to e2fsck/journal.c

  • Committer: Package Import Robot
  • Author(s): Michael Vogt
  • Date: 2014-10-27 09:44:27 UTC
  • mfrom: (8.4.29 sid)
  • Revision ID: package-import@ubuntu.com-20141027094427-g56dce6sg7pasdgm
Tags: 1.42.12-1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules:
      Block pkg-create-dbgsym from operating on this package.
      Build without dietlibc-dev, which is in universe 
      Use the autotools-dev dh addon to update config.guess/config.sub for new
      ports.
  - debian/control:
      Regenerate with ./debian/rules debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
393
393
        if (ext_journal) {
394
394
                blk64_t maxlen;
395
395
 
396
 
                if (ctx->fs->blocksize == 1024)
397
 
                        start = 1;
 
396
                start = ext2fs_journal_sb_start(ctx->fs->blocksize) - 1;
398
397
                bh = getblk(dev_journal, start, ctx->fs->blocksize);
399
398
                if (!bh) {
400
399
                        retval = EXT2_ET_NO_MEMORY;
405
404
                        brelse(bh);
406
405
                        goto errout;
407
406
                }
408
 
                memcpy(&jsuper, start ? bh->b_data :  bh->b_data + 1024,
 
407
                memcpy(&jsuper, start ? bh->b_data :  bh->b_data + SUPERBLOCK_OFFSET,
409
408
                       sizeof(jsuper));
410
409
                brelse(bh);
411
410
#ifdef WORDS_BIGENDIAN
759
758
no_has_journal:
760
759
        if (!(sb->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL)) {
761
760
                recover = sb->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER;
762
 
                pctx.str = "inode";
763
761
                if (fix_problem(ctx, PR_0_JOURNAL_HAS_JOURNAL, &pctx)) {
764
762
                        if (recover &&
765
763
                            !fix_problem(ctx, PR_0_JOURNAL_RECOVER_SET, &pctx))
904
902
 
905
903
        ext2fs_mmp_stop(ctx->fs);
906
904
        ext2fs_free(ctx->fs);
907
 
        retval = ext2fs_open(ctx->filesystem_name, EXT2_FLAG_RW,
 
905
        retval = ext2fs_open(ctx->filesystem_name, ctx->openfs_flags,
908
906
                             ctx->superblock, blocksize, io_ptr,
909
907
                             &ctx->fs);
910
908
        if (retval) {