Re: Heads up: update for e2fsprogs intended for stable-proposed-updates
On Sun, May 08, 2011 at 05:05:33PM +0200, Philipp Kern wrote:
>
> nope. The process is that all problems ought to be fixed in unstable
> first and then you send us a debdiff for a targetted upload to
> stable-proposed-updates (diff against what's currently in stable),
> we approve it and then you upload the result. We cannot cherry-pick
> from testing. (However sometimes what's in s-p-u gets copied over
> into testing if it's newer.)
Well, what I uploaded into unstable was built in a stable chroot, so
assuming it's approved it's just a matter of my uploading to
stable-proposed-updates, right? (Or do you want to build the x86
binary packages from source?)
> Your list seems sane, however I'd prefer to see a debdiff first. :)
Is this what you want (see below)? (Created via debdiff
e2fsprogs_1.41.12-2.dsc e2fsprogs_1.41.12-4.dsc)
You can also get a blow-by-blow description here (as soon as it
mirrors out):
http://git.kernel.org/?p=fs/ext2/e2fsprogs.git;a=shortlog;h=refs/heads/debian-stable
- Ted
P.S. One change I'd probably make, but didn't make the 1.41.12-4 that
I uploaded due to an oversight: The first change described in the
changelog for 1.41.12-4 should have had a "Closes: #614611". I'm not
sure it's worth bumping the version to -5 before uploading to s-p-u
just to add that bit to the documentation; what do you think?
Oh, one other missed bug #; "Fix badblocks so it the progress message
correctly handles UTF-8 characters for I18N systems (Closes: #583782,
#587834)" should also have included "#619182" to the bug closed list.
diff -u e2fsprogs-1.41.12/debian/control e2fsprogs-1.41.12/debian/control
--- e2fsprogs-1.41.12/debian/control
+++ e2fsprogs-1.41.12/debian/control
@@ -130,7 +130,7 @@
hard disks on Debian and other Linux systems.
.
This package contains programs for creating, checking, and maintaining
- ext-based file systems, and the generic fsck wrapper.
+ ext2/3/4-based file systems.
Package: e2fsprogs-dbg
Section: debug
diff -u e2fsprogs-1.41.12/debian/changelog e2fsprogs-1.41.12/debian/changelog
--- e2fsprogs-1.41.12/debian/changelog
+++ e2fsprogs-1.41.12/debian/changelog
@@ -1,3 +1,34 @@
+e2fsprogs (1.41.12-4) unstable; urgency=high
+
+ * Clear ext4 error fields in the superblock. Otherwise users will see
+ scary messages every 24 hours after a file system error is detected,
+ even after e2fsck has fixed it, if they are using Linux 2.6.35 or later.
+ * Fix usage message for logsave (Closes: #619788)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu> Sat, 07 May 2011 21:22:54 -0400
+
+e2fsprogs (1.41.12-3) unstable; urgency=high
+
+ * Fix signed vs. unsigned char bug in getopt in e2fsprogs which
+ afflicts systems with default unsigned char
+ * Fix bug in e2fsck where it would fail to fix file systems
+ where both the primary and backup block group descriptors are
+ corrupted. (Addresses Ubuntu Launchpad bug: #711799)
+ * Fix package description: fsck has been moved to util-linux
+ (Closes: #588726)
+ * Fix badblocks so it the progress message correctly handles UTF-8
+ characters for I18N systems (Closes: #583782, #587834)
+ * Prevent e2fsck from accidentally scrambling a file system when
+ checking a snapshot which has an external journal device (which has
+ not been snapshotted). (Closes: #587531)
+ * Fix inode nlink accounting that would lead to very scary PROGRAMMING
+ BUG errors. (Closes: #555456)
+ * Fix typos, spelling mistakes, spelling-out-the-obvious-to-clueless-
+ sysadmins, etc. in man pages. (Closes: #589345, #594004, #580236,
+ #591083, #505719, #599786)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu> Sat, 30 Apr 2011 12:30:24 -0400
+
e2fsprogs (1.41.12-2) unstable; urgency=high
* Allow tune2fs to set uninit_bg without requiring an fsck
diff -u e2fsprogs-1.41.12/lib/ext2fs/ext2_fs.h e2fsprogs-1.41.12/lib/ext2fs/ext2_fs.h
--- e2fsprogs-1.41.12/lib/ext2fs/ext2_fs.h
+++ e2fsprogs-1.41.12/lib/ext2fs/ext2_fs.h
@@ -501,6 +501,12 @@
#define EXT2_ERRORS_PANIC 3 /* Panic */
#define EXT2_ERRORS_DEFAULT EXT2_ERRORS_CONTINUE
+#if (__GNUC__ >= 4)
+#define ext4_offsetof(TYPE,MEMBER) __builtin_offsetof(TYPE,MEMBER)
+#else
+#define ext4_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
/*
* Structure of the super block
*/
@@ -594,9 +600,24 @@
__u64 s_snapshot_r_blocks_count; /* reserved blocks for active
snapshot's future use */
__u32 s_snapshot_list; /* inode number of the head of the on-disk snapshot list */
- __u32 s_reserved[155]; /* Padding to the end of the block */
+#define EXT4_S_ERR_START ext4_offsetof(struct ext2_super_block, s_error_count)
+ __u32 s_error_count; /* number of fs errors */
+ __u32 s_first_error_time; /* first time an error happened */
+ __u32 s_first_error_ino; /* inode involved in first error */
+ __u64 s_first_error_block; /* block involved of first error */
+ __u8 s_first_error_func[32]; /* function where the error happened */
+ __u32 s_first_error_line; /* line number where error happened */
+ __u32 s_last_error_time; /* most recent time of an error */
+ __u32 s_last_error_ino; /* inode involved in last error */
+ __u32 s_last_error_line; /* line number where error happened */
+ __u64 s_last_error_block; /* block involved of last error */
+ __u8 s_last_error_func[32]; /* function where the error happened */
+#define EXT4_S_ERR_END ext4_offsetof(struct ext2_super_block, s_error_count)
+ __u32 s_reserved[128]; /* Padding to the end of the block */
};
+#define EXT4_S_ERR_LEN (EXT4_S_ERR_END - EXT4_S_ERR_START)
+
/*
* Codes for operating systems
*/
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsprogs.spec
+++ e2fsprogs-1.41.12/e2fsprogs.spec
@@ -5,7 +5,7 @@
Summary: Utilities for managing ext2/ext3/ext4 filesystems
Name: e2fsprogs
-Version: 1.41.12
+Version: 1.41.14
Release: 0
License: GPLv2
Group: System Environment/Base
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/public_config.h
+++ e2fsprogs-1.41.12/public_config.h
@@ -0,0 +1,3 @@
+/* These defines are needed for the public ext2fs.h header file */
+#define HAVE_SYS_TYPES_H 1
+#undef WORDS_BIGENDIAN
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/configure
+++ e2fsprogs-1.41.12/configure
@@ -1,10 +1,12 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.64.
+# Generated by GNU Autoconf 2.65.
+#
#
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software
-# Foundation, Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+#
#
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
@@ -524,7 +526,8 @@
as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-exec 7<&0 </dev/null 6>&1
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
# Name of the host.
# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
@@ -588,6 +591,7 @@
# include <unistd.h>
#endif"
+ac_header_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
BUILD_LDFLAGS
@@ -1478,7 +1482,7 @@
LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
nonstandard directory <lib dir>
LIBS libraries to pass to the linker, e.g. -l<library>
- CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
you have headers in a nonstandard directory <include dir>
CPP C preprocessor
PKG_CONFIG path to pkg-config utility
@@ -1550,7 +1554,7 @@
if $ac_init_version; then
cat <<\_ACEOF
configure
-generated by GNU Autoconf 2.64
+generated by GNU Autoconf 2.65
Copyright (C) 2009 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -1597,7 +1601,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1643,7 +1647,7 @@
# left behind by Apple's compiler. We do this before executing the actions.
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_link
@@ -1680,7 +1684,7 @@
ac_retval=1
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1809,7 +1813,7 @@
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -2139,7 +2143,7 @@
fi
eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- return $ac_retval
+ as_fn_set_status $ac_retval
} # ac_fn_c_compute_int
@@ -2243,7 +2247,7 @@
running configure, to aid debugging if configure makes a mistake.
It was created by $as_me, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
$ $0 $@
@@ -2496,7 +2500,7 @@
for ac_site_file in "$ac_site_file1" "$ac_site_file2"
do
test "x$ac_site_file" = xNONE && continue
- if test -r "$ac_site_file"; then
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
$as_echo "$as_me: loading site script $ac_site_file" >&6;}
sed 's/^/| /' "$ac_site_file" >&5
@@ -2505,9 +2509,9 @@
done
if test -r "$cache_file"; then
- # Some versions of bash will fail to source /dev/null (special
- # files actually), so we avoid doing that.
- if test -f "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
$as_echo "$as_me: loading cache $cache_file" >&6;}
case $cache_file in
@@ -2521,6 +2525,9 @@
>$cache_file
fi
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_header_list " sys/param.h"
# Check that the precious variables saved in the cache have kept the same
# value.
ac_cache_corrupted=false
@@ -3067,32 +3074,30 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <stdio.h>
+
int
main ()
{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
;
return 0;
}
_ACEOF
ac_clean_files_save=$ac_clean_files
-ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out conftest.out"
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
# Try to create an executable without -o first, disregard a.out.
# It will help us diagnose broken compilers, and finding out an intuition
# of exeext.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
# The possible output files:
@@ -3154,10 +3159,10 @@
else
ac_file=''
fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
if test -z "$ac_file"; then :
- $as_echo "$as_me: failed program was:" >&5
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
@@ -3165,51 +3170,18 @@
{ as_fn_set_status 77
as_fn_error "C compiler cannot create executables
See \`config.log' for more details." "$LINENO" 5; }; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
ac_exeext=$ac_cv_exeext
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&6; }
-# If not cross compiling, check that we can run a simple program.
-if test "$cross_compiling" != yes; then
- if { ac_try='./$ac_file'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out conftest.out
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
ac_clean_files=$ac_clean_files_save
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
$as_echo_n "checking for suffix of executables... " >&6; }
if { { ac_try="$ac_link"
@@ -3242,13 +3214,72 @@
as_fn_error "cannot compute suffix of executables: cannot compile and link
See \`config.log' for more details." "$LINENO" 5; }
fi
-rm -f conftest$ac_cv_exeext
+rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
$as_echo "$ac_cv_exeext" >&6; }
rm -f conftest.$ac_ext
EXEEXT=$ac_cv_exeext
ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." "$LINENO" 5; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
if test "${ac_cv_objext+set}" = set; then :
@@ -3905,8 +3936,8 @@
... rest of stderr output deleted ...
10q' conftest.err >conftest.er1
cat conftest.er1 >&5
- rm -f conftest.er1 conftest.err
fi
+ rm -f conftest.er1 conftest.err
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }
done
@@ -6792,10 +6823,14 @@
fi
-for ac_header in stdlib.h unistd.h
+
+
+
+ for ac_header in $ac_header_list
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
eval as_val=\$$as_ac_Header
if test "x$as_val" = x""yes; then :
cat >>confdefs.h <<_ACEOF
@@ -6806,6 +6841,13 @@
done
+
+
+
+
+
+
+
for ac_func in getpagesize
do :
ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
@@ -6862,11 +6904,6 @@
/* This mess was copied from the GNU getpagesize.h. */
#ifndef HAVE_GETPAGESIZE
-/* Assume that all systems that can run configure have sys/param.h. */
-# ifndef HAVE_SYS_PARAM_H
-# define HAVE_SYS_PARAM_H 1
-# endif
-
# ifdef _SC_PAGESIZE
# define getpagesize() sysconf(_SC_PAGESIZE)
# else /* no _SC_PAGESIZE */
@@ -6901,8 +6938,9 @@
main ()
{
char *data, *data2, *data3;
+ const char *cdata2;
int i, pagesize;
- int fd;
+ int fd, fd2;
pagesize = getpagesize ();
@@ -6915,27 +6953,41 @@
umask (0);
fd = creat ("conftest.mmap", 0600);
if (fd < 0)
- return 1;
+ return 2;
if (write (fd, data, pagesize) != pagesize)
- return 1;
+ return 3;
close (fd);
+ /* Next, check that the tail of a page is zero-filled. File must have
+ non-zero length, otherwise we risk SIGBUS for entire page. */
+ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
+ if (fd2 < 0)
+ return 4;
+ cdata2 = "";
+ if (write (fd2, cdata2, 1) != 1)
+ return 5;
+ data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
+ if (data2 == MAP_FAILED)
+ return 6;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data2 + i))
+ return 7;
+ close (fd2);
+ if (munmap (data2, pagesize))
+ return 8;
+
/* Next, try to mmap the file at a fixed address which already has
something else allocated at it. If we can, also make sure that
we see the same garbage. */
fd = open ("conftest.mmap", O_RDWR);
if (fd < 0)
- return 1;
- data2 = (char *) malloc (2 * pagesize);
- if (!data2)
- return 1;
- data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+ return 9;
if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_FIXED, fd, 0L))
- return 1;
+ return 10;
for (i = 0; i < pagesize; ++i)
if (*(data + i) != *(data2 + i))
- return 1;
+ return 11;
/* Finally, make sure that changes to the mapped area do not
percolate back to the file as seen by read(). (This is a bug on
@@ -6944,12 +6996,12 @@
*(data2 + i) = *(data2 + i) + 1;
data3 = (char *) malloc (pagesize);
if (!data3)
- return 1;
+ return 12;
if (read (fd, data3, pagesize) != pagesize)
- return 1;
+ return 13;
for (i = 0; i < pagesize; ++i)
if (*(data + i) != *(data3 + i))
- return 1;
+ return 14;
close (fd);
return 0;
}
@@ -6971,7 +7023,7 @@
$as_echo "#define HAVE_MMAP 1" >>confdefs.h
fi
-rm -f conftest.mmap
+rm -f conftest.mmap conftest.txt
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
@@ -10647,7 +10699,7 @@
fi
fi
-for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology
+for ac_func in chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology mbstowcs
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -11593,7 +11645,7 @@
# values after options handling.
ac_log="
This file was extended by $as_me, which was
-generated by GNU Autoconf 2.64. Invocation command line was
+generated by GNU Autoconf 2.65. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -11629,6 +11681,7 @@
-h, --help print this help, then exit
-V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
-q, --quiet, --silent
do not print progress messages
-d, --debug don't remove temporary files
@@ -11646,10 +11699,11 @@
_ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
config.status
-configured by $0, generated by GNU Autoconf 2.64,
- with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+configured by $0, generated by GNU Autoconf 2.65,
+ with options \\"\$ac_cs_config\\"
Copyright (C) 2009 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
@@ -11686,6 +11740,8 @@
ac_cs_recheck=: ;;
--version | --versio | --versi | --vers | --ver | --ve | --v | -V )
$as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
--debug | --debu | --deb | --de | --d | -d )
debug=: ;;
--file | --fil | --fi | --f )
@@ -11894,7 +11950,7 @@
t delim
:nl
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more1
s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
p
@@ -11908,7 +11964,7 @@
t nl
:delim
h
-s/\(.\{148\}\).*/\1/
+s/\(.\{148\}\)..*/\1/
t more2
s/["\\]/\\&/g; s/^/"/; s/$/"/
p
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/asm_types.h
+++ e2fsprogs-1.41.12/asm_types.h
@@ -0,0 +1,8 @@
+#define __S8_TYPEDEF __signed__ char
+#define __U8_TYPEDEF unsigned char
+#define __S16_TYPEDEF __signed__ short
+#define __U16_TYPEDEF unsigned short
+#define __S32_TYPEDEF __signed__ int
+#define __U32_TYPEDEF unsigned int
+#define __S64_TYPEDEF __signed__ long long
+#define __U64_TYPEDEF unsigned long long
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/configure.in
+++ e2fsprogs-1.41.12/configure.in
@@ -853,7 +853,7 @@
AC_SEARCH_LIBS([blkid_probe_all], [blkid])
fi
dnl
-AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology)
+AC_CHECK_FUNCS(chflags getrusage llseek lseek64 open64 fstat64 ftruncate64 getmntinfo strtoull strcasecmp srandom jrand48 fchown mallinfo fdatasync strnlen strptime strdup sysconf pathconf posix_memalign memalign valloc __secure_getenv prctl mmap utime setresuid setresgid usleep nanosleep getdtablesize getrlimit blkid_probe_get_topology mbstowcs)
dnl
dnl Check to see if -lsocket is required (solaris) to make something
dnl that uses socket() to compile; this is needed for the UUID library
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/lib/e2p/ls.c
+++ e2fsprogs-1.41.12/lib/e2p/ls.c
@@ -330,6 +330,37 @@
fprintf(f, "type %u\n", sb->s_jnl_backup_type);
}
}
+ if (sb->s_error_count)
+ fprintf(f, "FS Error count: %u\n",
+ sb->s_error_count);
+ if (sb->s_first_error_time) {
+ tm = sb->s_first_error_time;
+ fprintf(f, "First error time: %s", ctime(&tm));
+ memset(buf, 0, sizeof(buf));
+ strncpy(buf, sb->s_first_error_func,
+ sizeof(sb->s_first_error_func));
+ fprintf(f, "First error function: %s\n", buf);
+ fprintf(f, "First error line #: %u\n",
+ sb->s_first_error_line);
+ fprintf(f, "First error inode #: %u\n",
+ sb->s_first_error_ino);
+ fprintf(f, "First error block #: %llu\n",
+ sb->s_first_error_block);
+ }
+ if (sb->s_last_error_time) {
+ tm = sb->s_last_error_time;
+ fprintf(f, "Last error time: %s", ctime(&tm));
+ memset(buf, 0, sizeof(buf));
+ strncpy(buf, sb->s_last_error_func,
+ sizeof(sb->s_last_error_func));
+ fprintf(f, "Last error function: %s\n", buf);
+ fprintf(f, "Last error line #: %u\n",
+ sb->s_last_error_line);
+ fprintf(f, "Last error inode #: %u\n",
+ sb->s_last_error_ino);
+ fprintf(f, "Last error block #: %llu\n",
+ sb->s_last_error_block);
+ }
}
void list_super (struct ext2_super_block * s)
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/tests/progs/test_rel.c
+++ e2fsprogs-1.41.12/tests/progs/test_rel.c
@@ -713,7 +713,7 @@
int retval;
int sci_idx;
const char *usage = "Usage: test_rel [-R request] [-f cmd_file]";
- char c;
+ int c;
char *request = 0;
int exit_status = 0;
char *cmd_file = 0;
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/debian/control.in
+++ e2fsprogs-1.41.12/debian/control.in
@@ -243,7 +243,7 @@
hard disks on Debian and other Linux systems.
.
This package contains programs for creating, checking, and maintaining
- ext-based file systems, and the generic fsck wrapper.
+ ext2/3/4-based file systems.
Package: e2fsprogs-dbg
Section: debug
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsck/pass4.c
+++ e2fsprogs-1.41.12/e2fsck/pass4.c
@@ -121,6 +121,8 @@
/* Protect loop from wrap-around if s_inodes_count maxed */
for (i=1; i <= fs->super->s_inodes_count && i > 0; i++) {
+ int isdir = ext2fs_test_inode_bitmap(ctx->inode_dir_map, i);
+
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
goto errout;
if ((i % fs->super->s_inodes_per_group) == 0) {
@@ -153,14 +155,14 @@
ext2fs_icount_fetch(ctx->inode_count, i,
&link_counted);
}
- if (ext2fs_test_inode_bitmap(ctx->inode_dir_map, i) &&
- (link_counted > EXT2_LINK_MAX))
+ if (isdir && (link_counted > EXT2_LINK_MAX))
link_counted = 1;
if (link_counted != link_count) {
e2fsck_read_inode(ctx, i, inode, "pass4");
pctx.ino = i;
pctx.inode = inode;
- if (link_count != inode->i_links_count) {
+ if ((link_count != inode->i_links_count) && !isdir &&
+ (inode->i_links_count <= EXT2_LINK_MAX)) {
pctx.num = link_count;
fix_problem(ctx,
PR_4_INCONSISTENT_COUNT, &pctx);
@@ -168,10 +170,10 @@
pctx.num = link_counted;
/* i_link_count was previously exceeded, but no longer
* is, fix this but don't consider it an error */
- if ((LINUX_S_ISDIR(inode->i_mode) && link_counted > 1 &&
+ if ((isdir && link_counted > 1 &&
(inode->i_flags & EXT2_INDEX_FL) &&
link_count == 1 && !(ctx->options & E2F_OPT_NO)) ||
- (fix_problem(ctx, PR_4_BAD_REF_COUNT, &pctx))) {
+ fix_problem(ctx, PR_4_BAD_REF_COUNT, &pctx)) {
inode->i_links_count = link_counted;
e2fsck_write_inode(ctx, i, inode, "pass4");
}
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsck/e2fsck.conf.5.in
+++ e2fsprogs-1.41.12/e2fsck/e2fsck.conf.5.in
@@ -11,7 +11,7 @@
.BR e2fsck (8).
It controls the default behavior of
.BR e2fsck (8)
-while it is checking ext2 or ext3 filesystems.
+while it is checking ext2, ext3, or ext4 filesystems.
.PP
The
.I e2fsck.conf
@@ -112,14 +112,14 @@
.I broken_system_clock
The
.BR e2fsck (8)
-program has some hueristics that assume that the system clock is
+program has some heuristics that assume that the system clock is
correct. In addition, many system programs make similar assumptions.
For example, the UUID library depends on time not going backwards in
order for it to be able to make its guarantees about issuing universally
unique ID's. Systems with broken system clocks, are well, broken.
However, broken system clocks, particularly in embedded systems, do
-exist. E2fsck will attempt to use hueristics to determine if the time
-can no tbe trusted; and to skip time-based checks if this is true. If
+exist. E2fsck will attempt to use heuristics to determine if the time
+can not be trusted; and to skip time-based checks if this is true. If
this boolean is set to true, then e2fsck will always assume that the
system clock can not be trusted.
.TP
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsck/ea_refcount.c
+++ e2fsprogs-1.41.12/e2fsck/ea_refcount.c
@@ -196,9 +196,14 @@
range = 0;
else if (blk > highval)
range = 1;
- else
+ else {
range = ((float) (blk - lowval)) /
(highval - lowval);
+ if (range > 0.9)
+ range = 0.9;
+ if (range < 0.1)
+ range = 0.1;
+ }
mid = low + ((int) (range * (high-low)));
}
#endif
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsck/iscan.c
+++ e2fsprogs-1.41.12/e2fsck/iscan.c
@@ -51,7 +51,7 @@
static void PRS(int argc, char *argv[])
{
int flush = 0;
- char c;
+ int c;
#ifdef MTRACE
extern void *mallwatch;
#endif
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsck/unix.c
+++ e2fsprogs-1.41.12/e2fsck/unix.c
@@ -1054,6 +1054,8 @@
orig_retval = retval;
retval = try_open_fs(ctx, flags, io_ptr, &fs);
if ((orig_retval == 0) && retval != 0) {
+ if (fs)
+ ext2fs_close(fs);
com_err(ctx->program_name, retval,
"when using the backup blocks");
printf(_("%s: going back to original "
@@ -1441,6 +1443,8 @@
sb->s_mnt_count = 0;
if (!(ctx->flags & E2F_FLAG_TIME_INSANE))
sb->s_lastcheck = ctx->now;
+ memset(((char *) sb) + EXT4_S_ERR_START, 0,
+ EXT4_S_ERR_LEN);
ext2fs_mark_super_dirty(fs);
}
}
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/e2fsck/journal.c
+++ e2fsprogs-1.41.12/e2fsck/journal.c
@@ -368,7 +368,8 @@
#ifndef USE_INODE_IO
if (ext_journal)
#endif
- retval = io_ptr->open(journal_name, IO_FLAG_RW,
+ retval = io_ptr->open(journal_name,
+ IO_FLAG_RW | IO_FLAG_EXCLUSIVE,
&ctx->journal_io);
if (retval)
goto errout;
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/debugfs/debugfs.8.in
+++ e2fsprogs-1.41.12/debugfs/debugfs.8.in
@@ -207,7 +207,7 @@
.IP
(Please note that the length and range of blocks for the last extent in
an interior node is an estimate by the extents library functions, and is
-not stored in file esystem data structures. Hence, the values displayed
+not stored in filesystem data structures. Hence, the values displayed
may not necessarily by accurate and does not indicate a problem or
corruption in the file system.)
.TP
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/resize/online.c
+++ e2fsprogs-1.41.12/resize/online.c
@@ -38,8 +38,7 @@
"on-line resizing required\n"), fs->device_name, mtpt);
if (*new_size < sb->s_blocks_count) {
- printf(_("On-line shrinking from %u to %u not supported.\n"),
- sb->s_blocks_count, *new_size);
+ com_err(program_name, 0, _("On-line shrinking not supported"));
exit(1);
}
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/resize/extent.c
+++ e2fsprogs-1.41.12/resize/extent.c
@@ -167,9 +167,14 @@
range = 0;
else if (old_loc > highval)
range = 1;
- else
+ else {
range = ((float) (old_loc - lowval)) /
(highval - lowval);
+ if (range > 0.9)
+ range = 0.9;
+ if (range < 0.1)
+ range = 0.1;
+ }
mid = low + ((int) (range * (high-low)));
}
#endif
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/resize/resize2fs.8.in
+++ e2fsprogs-1.41.12/resize/resize2fs.8.in
@@ -31,7 +31,7 @@
If the filesystem is mounted, it can be used to expand the size of the
mounted filesystem, assuming the kernel supports on-line resizing. (As
of this writing, the Linux 2.6 kernel supports on-line resize for
-filesystems mounted using ext3 only.).
+filesystems mounted using ext3 and ext4.).
.PP
The
.I size
@@ -51,6 +51,14 @@
.I size
parameter is not specified, it will default to the size of the partition.
.PP
+Note: when kilobytes is used above, I mean
+.IR real ,
+power-of-2 kilobytes, (i.e., 1024 bytes), which some politically correct
+folks insist should be the stupid-sounding ``kibibytes''. The same
+holds true for megabytes, also sometimes known as ``mebibytes'', or
+gigabytes, as the amazingly silly ``gibibytes''. Makes you want to
+gibber, doesn't it?
+.PP
The
.B resize2fs
program does not manipulate the size of partitions. If you wish to enlarge
@@ -108,8 +116,8 @@
.B \-p
Prints out a percentage completion bars for each
.B resize2fs
-operation, so that the user can keep track of what
-the program is doing.
+operation during an offline resize, so that the user can keep track
+of what the program is doing.
.TP
.B \-P
Print the minimum size of the filesystem and exit.
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/misc/e2freefrag.c
+++ e2fsprogs-1.41.12/misc/e2freefrag.c
@@ -258,7 +258,8 @@
ext2_filsys fs = NULL;
char *device_name;
char *progname;
- char c, *end;
+ char *end;
+ int c;
add_error_table(&et_ext2_error_table);
progname = argv[0];
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/misc/mke2fs.conf.5.in
+++ e2fsprogs-1.41.12/misc/mke2fs.conf.5.in
@@ -337,10 +337,10 @@
.IR tea .
.TP
.I flex_bg_size
-This relation specifies the number of block goups that will be packed
+This relation specifies the number of block groups that will be packed
together to create one large virtual block group on an ext4 filesystem.
This improves meta-data locality and performance on meta-data heavy
-workloads. The number of goups must be a power of 2 and may only be
+workloads. The number of groups must be a power of 2 and may only be
specified if the flex_bg filesystem feature is enabled.
.I options
This relation specifies additional extended options which should be
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/misc/tune2fs.8.in
+++ e2fsprogs-1.41.12/misc/tune2fs.8.in
@@ -96,6 +96,12 @@
program, or by using the
.BR dumpe2fs (8)
program.
+.PP
+The
+.I device
+specifer can either be a filename (i.e., /dev/sda1), or a LABEL or UUID
+specifer: "\fBLABEL=\fIvolume-name\fR" or "\fBUUID=\fIuuid\fR". (i.e.,
+LABEL=home or UUID=e40486c6-84d5-4f2f-b99c-032281799c9d).
.SH OPTIONS
.TP
.BI \-c " max-mount-counts"
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/misc/badblocks.c
+++ e2fsprogs-1.41.12/misc/badblocks.c
@@ -203,6 +203,9 @@
calc_percent((unsigned long) currently_testing,
(unsigned long) num_blocks),
time_diff_format(&time_end, &time_start, diff_buf));
+#ifdef HAVE_MBSTOWCS
+ len = mbstowcs(NULL, line_buf, sizeof(line_buf));
+#endif
fputs(line_buf, stderr);
memset(line_buf, '\b', len);
line_buf[len] = 0;
only in patch2:
unchanged:
--- e2fsprogs-1.41.12.orig/misc/logsave.c
+++ e2fsprogs-1.41.12/misc/logsave.c
@@ -41,7 +41,7 @@
static void usage(char *progname)
{
- printf("Usage: %s [-v] [-d dir] logfile program\n", progname);
+ printf("Usage: %s [-asv] logfile program\n", progname);
exit(1);
}
Reply to: