From: Theodore Ts'o Date: Tue, 22 Jul 2014 18:57:40 +0000 (-0400) Subject: Merge branch 'maint' into next X-Git-Tag: v1.43-WIP-2015-05-18~275 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f9f3050a0ad9be1c37b00c8478199d286ddcaeda;p=thirdparty%2Fe2fsprogs.git Merge branch 'maint' into next Conflicts: debian/changelog e2fsck/pass1.c lib/ext2fs/Makefile.in --- f9f3050a0ad9be1c37b00c8478199d286ddcaeda diff --cc debian/changelog index 1d8da2ef3,f01607b8a..87aefdc42 --- a/debian/changelog +++ b/debian/changelog @@@ -1,9 -1,13 +1,19 @@@ +e2fsprogs (1.43~WIP-2014-02-04-1) unstable; urgency=low + + * Merge in updates from the maint branch (changes from 1.42.10-1) + + -- Theodore Y. Ts'o Wed, 04 Feb 2014 23:31:56 -0500 + + e2fsprogs (1.42.11-2) unstable; urgency=low + + * Don't try to build lib/ext2fs/tst_ext2fs unless running "make + check"; this fixes a MIPS FTBFS problem because mips has a special + no-pics build needed for bootloaders where we only build libext2fs + but not libss or other libraries (Closes: #754605) + * Update French translation + + -- Theodore Y. Ts'o Sun, 13 Jul 2014 16:18:27 -0500 + e2fsprogs (1.42.11-1) unstable; urgency=medium * New upstream version diff --cc debugfs/debug_cmds.ct index 814fd529f,ed3728fda..5bd3fe159 --- a/debugfs/debug_cmds.ct +++ b/debugfs/debug_cmds.ct @@@ -188,20 -188,8 +188,20 @@@ request do_zap_block, "Zap block: fill zap_block, zap; request do_block_dump, "Dump contents of a block", - block_dump, bd; + block_dump, bdump, bd; +request do_list_xattr, "List extended attributes of an inode", + ea_list; + +request do_get_xattr, "Get an extended attribute of an inode", + ea_get; + +request do_set_xattr, "Set an extended attribute of an inode", + ea_set; + +request do_rm_xattr, "Remove an extended attribute of an inode", + ea_rm; + request do_list_quota, "List quota", list_quota, lq; diff --cc e2fsck/pass1.c index ba600292b,784195a00..fa0f89e26 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@@ -1961,17 -1810,6 +1962,19 @@@ static void scan_extent_node(e2fsck_t c (1 << (21 - ctx->fs->super->s_log_block_size)))) problem = PR_1_TOOBIG_DIR; + /* Corrupt but passes checks? Ask to fix checksum. */ + if (failed_csum) { + pctx->blk = extent.e_pblk; + pctx->blk2 = extent.e_lblk; + pctx->num = extent.e_len; + problem = 0; + if (fix_problem(ctx, PR_1_EXTENT_ONLY_CSUM_INVALID, - pctx)) ++ pctx)) { ++ pb->inode_modified = 1; + ext2fs_extent_replace(ehandle, 0, &extent); ++ } + } + if (problem) { report_problem: pctx->blk = extent.e_pblk; @@@ -1979,8 -1817,28 +1982,29 @@@ pctx->num = extent.e_len; pctx->blkcount = extent.e_lblk + extent.e_len; if (fix_problem(ctx, problem, pctx)) { +fix_problem_now: + if (ctx->invalid_bitmaps) { + /* + * If fsck knows the bitmaps are bad, + * skip to the next extent and + * try to clear this extent again + * after fixing the bitmaps, by + * restarting fsck. + */ + pctx->errcode = ext2fs_extent_get( + ehandle, + EXT2_EXTENT_NEXT_SIB, + &extent); + ctx->flags |= E2F_FLAG_RESTART_LATER; + if (pctx->errcode == + EXT2_ET_NO_CURRENT_NODE) { + pctx->errcode = 0; + break; + } + continue; + } e2fsck_read_bitmaps(ctx); + pb->inode_modified = 1; pctx->errcode = ext2fs_extent_delete(ehandle, 0); if (pctx->errcode) { @@@ -2254,6 -2093,15 +2287,16 @@@ static void check_blocks(e2fsck_t ctx, if (extent_fs && (inode->i_flags & EXT4_EXTENTS_FL)) check_blocks_extents(ctx, pctx, &pb); else { + /* + * If we've modified the inode, write it out before + * iterate() tries to use it. + */ + if (dirty_inode) { + e2fsck_write_inode(ctx, ino, inode, + "check_blocks"); + dirty_inode = 0; + } ++ fs->flags |= EXT2_FLAG_IGNORE_CSUM_ERRORS; pctx->errcode = ext2fs_block_iterate3(fs, ino, pb.is_dir ? BLOCK_FLAG_HOLE : 0, block_buf, process_block, &pb); @@@ -2262,11 -2110,16 +2305,21 @@@ * files. */ pb.last_init_lblock = pb.last_block; + /* + * If iterate() changed a block mapping, we have to + * re-read the inode. If we decide to clear the + * inode after clearing some stuff, we'll re-write the + * bad mappings into the inode! + */ + if (pb.inode_modified) + e2fsck_read_inode(ctx, ino, inode, + "check_blocks"); ++ fs->flags &= ~EXT2_FLAG_IGNORE_CSUM_ERRORS; } + } else { + /* check inline data */ + if (inlinedata_fs && (inode->i_flags & EXT4_INLINE_DATA_FL)) + check_blocks_inline_data(ctx, pctx, &pb); } end_problem_latch(ctx, PR_LATCH_BLOCK); end_problem_latch(ctx, PR_LATCH_TOOBIG); diff --cc lib/ext2fs/Makefile.in index c39210710,4fc149a38..f88545d40 --- a/lib/ext2fs/Makefile.in +++ b/lib/ext2fs/Makefile.in @@@ -444,14 -429,10 +444,15 @@@ tst_libext2fs: $(DEBUG_OBJS) tst_inline: $(srcdir)/inline.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(E) " LD $@" - $(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) -DDEBUG \ - $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS) + $(Q) $(CC) -o tst_inline $(srcdir)/inline.c $(ALL_CFLAGS) \ + $(ALL_LDFLAGS) -DDEBUG $(STATIC_LIBEXT2FS) \ + $(STATIC_LIBCOM_ERR) $(SYSLIBS) +tst_inline_data: inline_data.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) + $(E) " LD $@" + $(Q) $(CC) -o tst_inline_data $(srcdir)/inline_data.c $(ALL_CFLAGS) \ + -DDEBUG $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) + tst_csum: csum.c $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR) $(STATIC_LIBE2P) \ $(top_srcdir)/lib/e2p/e2p.h $(E) " LD $@" @@@ -471,7 -452,7 +472,7 @@@ mkjournal: mkjournal.c $(STATIC_LIBEXT2 check:: tst_bitops tst_badblocks tst_iscan tst_types tst_icount \ tst_super_size tst_types tst_inode_size tst_csum tst_crc32c tst_bitmaps \ - tst_inline tst_inline_data - tst_inline tst_libext2fs ++ tst_inline tst_inline_data tst_libext2fs LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_bitops LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_badblocks LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_iscan