diff --git a/patches/e2fsprogs-lfsck.patch b/patches/e2fsprogs-lfsck.patch index afd478e..0832b56 100644 --- a/patches/e2fsprogs-lfsck.patch +++ b/patches/e2fsprogs-lfsck.patch @@ -92,7 +92,7 @@ Index: e2fsprogs/configure.in dnl handle --enable-compression dnl AC_ARG_ENABLE([compression], -@@ -763,6 +811,7 @@ AC_CHECK_HEADERS(net/if.h,,, +@@ -763,6 +819,7 @@ AC_CHECK_HEADERS(net/if.h,,, #include #endif ]]) @@ -100,7 +100,7 @@ Index: e2fsprogs/configure.in AC_FUNC_VPRINTF dnl Check to see if dirent has member d_reclen. On cygwin those d_reclen dnl is not decleared. -@@ -880,6 +929,31 @@ SOCKET_LIB='' +@@ -880,6 +937,31 @@ SOCKET_LIB='' AC_CHECK_LIB(socket, socket, [SOCKET_LIB=-lsocket]) AC_SUBST(SOCKET_LIB) dnl @@ -442,7 +442,7 @@ Index: e2fsprogs/e2fsck/pass1.c * it seems like a corruption. it's very unlikely we could repair @@ -1005,6 +1015,12 @@ void e2fsck_pass1(e2fsck_t ctx) ext2fs_mark_block_bitmap2(ctx->block_found_map, - fs->super->s_mmp_block); + fs->super->s_mmp_block); + if (!(ctx->options & E2F_OPT_READONLY) && + (ctx->lustre_devtype & LUSTRE_TYPE) == LUSTRE_MDS) { @@ -452,8 +452,8 @@ Index: e2fsprogs/e2fsck/pass1.c + while (1) { if (ino % EXT2_MMP_INODE_INTERVAL == 0) { - if (e2fsck_mmp_update(fs)) -@@ -1513,6 +1529,9 @@ void e2fsck_pass1(e2fsck_t ctx) + if (e2fsck_mmp_update(fs)) +@@ -1510,6 +1526,9 @@ void e2fsck_pass1(e2fsck_t ctx) } e2fsck_pass1_dupblocks(ctx, block_buf); } @@ -463,7 +463,7 @@ Index: e2fsprogs/e2fsck/pass1.c ext2fs_free_mem(&inodes_to_process); endit: e2fsck_use_inode_shortcuts(ctx, 0); -@@ -1780,6 +1799,8 @@ static int check_ext_attr(e2fsck_t ctx, +@@ -1777,6 +1796,8 @@ static int check_ext_attr(e2fsck_t ctx, struct ext2_ext_attr_entry *entry; int count; region_t region = 0; @@ -472,7 +472,7 @@ Index: e2fsprogs/e2fsck/pass1.c int ret; blk = ext2fs_file_acl_block(inode); -@@ -1936,8 +1957,19 @@ static int check_ext_attr(e2fsck_t ctx, +@@ -1933,8 +1954,19 @@ static int check_ext_attr(e2fsck_t ctx, entry->e_hash = hash; } @@ -734,17 +734,15 @@ Index: e2fsprogs/e2fsprogs.spec.in Provides: e2fsprogs-libs = %{version} ldiskfsprogs = %{version} Obsoletes: e4fsprogs e2fsprogs-libs < %{version} %endif -@@ -72,7 +76,8 @@ SMP systems. +@@ -72,6 +76,7 @@ SMP systems. %build %configure --enable-elf-shlibs --enable-nls --disable-defrag \ -- %{?extra_config_flags:%extra_config_flags} + @WITH_LUSTRE@ @ENABLE_LFSCK@ \ -+ %{?extra_config_flags:%extra_config_flags} + %{?extra_config_flags:%extra_config_flags} make make check - -@@ -142,6 +146,7 @@ exit 0 +@@ -142,6 +147,7 @@ exit 0 %{_root_sbindir}/resize2fs %{_root_sbindir}/tune2fs %{_sbindir}/filefrag @@ -752,7 +750,7 @@ Index: e2fsprogs/e2fsprogs.spec.in %{_sbindir}/mklost+found %{_sbindir}/e2freefrag -@@ -170,6 +175,7 @@ exit 0 +@@ -169,6 +175,7 @@ exit 0 %{_mandir}/man8/debugfs.8* %{_mandir}/man8/dumpe2fs.8* %{_mandir}/man8/e2fsck.8* @@ -3713,7 +3711,7 @@ Index: e2fsprogs/e2fsck/pass6.c =================================================================== --- /dev/null +++ e2fsprogs/e2fsck/pass6.c -@@ -0,0 +1,1511 @@ +@@ -0,0 +1,1514 @@ +/* -*- mode: c; c-basic-offset: 8; -*- + * vim:shiftwidth=8:tabstop=8: + * @@ -4153,6 +4151,9 @@ Index: e2fsprogs/e2fsck/pass6.c + if (!LINUX_S_ISREG(inode->i_mode)) + return 0; + ++ if (entry->e_name_len == 0) ++ return 0; ++ + if (entry->e_name_index == EXT3_XATTR_INDEX_TRUSTED && + entry->e_name_index == EXT3_XATTR_INDEX_LUSTRE) + return 0;