Merge branch 'next' into debian
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 3575d49..567f276 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -1,3 +1,58 @@
+E2fsprogs 1.43.4-WIP (January 17, 2017) -- 75a790455c43abf
+=======================================
+
+Fix a bug which was causing mke2fs -d and fuse2fs to improperly handle
+Posix ACL's.
+
+Fix a bug which could cause mke2fs -d to fail if there is an
+zero-length file in source directory tree.
+
+Debugfs will now display project quota information.
+
+Debugfs's do_set_xattr now uses C strings to parse extended attribute
+values, and will print the extended attributes using either C strings
+or hex bytes when using debugfs's do_get_xattr command.  It will now
+allow developers to see the contents of the system.data extended
+attribute.
+
+Fix a bug in mke2fs where I/O errors weren't getting properly reported
+to the user.
+
+Fix multiblock writes in the unaligned Direct I/O fallback code.
+(Which is rarely needed on Linux systems, but which is required on
+Freebsd systems.)
+
+Make sure the default mke2fs.conf file includes the uninit_bg feature
+flag.  (Which was accidentally dropped in v1.43).
+
+Fix a bug in resize2fs when operating on very large file systems which
+have a block size different from the VM page size.
+
+If the reported device size is absurdly large, mke2fs will now report
+an error instead looping forever or crashing.
+
+Replace a test file but which had a "non-commercial use-only"
+copyright permission file with a newer version from the Cyrus imapd
+package which now has a 4-clause BSD license, which was making some
+lawyers nervous, even though the test file in question was only used
+in lib/et's regression testing and was never included in any compiled
+binary.  (Addresses Debian Bug: #840733)
+
+Programming notes
+-----------------
+
+Fix more FreeBSD-11 compatibility bugs, including some unmasked by
+FreeBSD 11-rc2.
+
+Fix the Mac build.
+
+Fix build failure on RHEL 5.x systems caused by an old version of
+libmagic.
+
+Fix a number of bugs reported by ASAN that can cause some (mostly
+harmless) memory dereferences beyond allocated memory.
+
+
 E2fsprogs 1.43.3 (September 4, 2016)
 ====================================
 
diff --git a/acinclude.m4 b/acinclude.m4
index b4bdc5d..912383a 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -108,7 +108,7 @@
         [CHECK_GNU_MAKE], [ AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
                 _cv_gnu_make_command='' ;
 dnl Search all the common names for GNU make
-                if test -z "$FORCE_NATIVE_MAKE" ; then
+                if test -n "$FORCE_NATIVE_MAKE" ; then
                    MAKES="make"
                 else
                    MAKES="make gmake gnumake"
diff --git a/configure b/configure
index 6825bd2..5f7b429 100755
--- a/configure
+++ b/configure
@@ -11515,7 +11515,7 @@
   $as_echo_n "(cached) " >&6
 else
   _cv_gnu_make_command='' ;
-                if test -z "$FORCE_NATIVE_MAKE" ; then
+                if test -n "$FORCE_NATIVE_MAKE" ; then
                    MAKES="make"
                 else
                    MAKES="make gmake gnumake"
@@ -12305,7 +12305,7 @@
 
 
 if test "_$MAKEINFO" = "_"; then
-    MAKEINFO="@echo Makeinfo is missing. Info documentation will not be built.;true"
+    MAKEINFO="echo Makeinfo is missing. Info documentation will not be built."
 else
     case "$MAKEINFO" in
       */missing.*)
diff --git a/configure.ac b/configure.ac
index 1c73301..9da7b86 100644
--- a/configure.ac
+++ b/configure.ac
@@ -877,7 +877,7 @@
 AC_CHECK_TOOL(STRIP, strip, :)
 AC_CHECK_PROG(MAKEINFO, makeinfo, makeinfo, )
 if test "_$MAKEINFO" = "_"; then
-    MAKEINFO="@echo Makeinfo is missing. Info documentation will not be built.;true"
+    MAKEINFO="echo Makeinfo is missing. Info documentation will not be built."
 else
     case "$MAKEINFO" in
       */missing.*)
diff --git a/contrib/Android.mk b/contrib/Android.mk
index 282d47e..f8d74c3 100644
--- a/contrib/Android.mk
+++ b/contrib/Android.mk
@@ -31,6 +31,7 @@
 LOCAL_MODULE := fsstress_host
 LOCAL_MODULE_STEM := fsstress
 LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_HOST_OS := linux
 
 include $(BUILD_HOST_EXECUTABLE)
 
diff --git a/debian/changelog b/debian/changelog
index 86377aa..a0eb435 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,25 @@
+e2fsprogs (1.43.4~WIP.2017.01.30-1) unstable; urgency=medium
+
+  * Fix a bug which was causing mke2fs -d and fuse2fs to improperly
+    handle Posix ACL's.
+  * Fix a bug which could cause mke2fs -d to fail if there is an
+    zero-length file in source directory tree.
+  * Debugfs will now display project quota information.
+  * Debugfs has a more friendly and powerful to print and set extended
+    attributes.
+  * Fix a bug in mke2fs where I/O errors weren't getting properly
+    reported to the user.
+  * Fix a bug in resize2fs when operating on very large file systems
+    which have a block size different from the VM page size.
+  * If the reported device size is absurdly large, mke2fs will now
+    report an error instead looping forever or crashing.
+  * Replace a test file in the sources with an updated version which has
+    a DFSG-compliant copyright license.  This was making lawyers
+    nervous, even though the file was only used in regression tests and
+    was never used when building any binaries.   (Closes: #840733)
+
+ -- Theodore Y. Ts'o <tytso@mit.edu>  Mon, 30 Jan 2017 22:14:07 -0400
+
 e2fsprogs (1.43.3-1) unstable; urgency=medium
 
   * Fix e2fsck's handling of timestamps on 32-bit system (Closes: #836559)
diff --git a/debian/e2fslibs.symbols b/debian/e2fslibs.symbols
index 00da445..380cacd 100644
--- a/debian/e2fslibs.symbols
+++ b/debian/e2fslibs.symbols
@@ -606,6 +606,7 @@
  ext2fs_xattr_set@Base 1.43
  ext2fs_xattrs_close@Base 1.43
  ext2fs_xattrs_count@Base 1.43
+ ext2fs_xattrs_flags@Base 1.43.4~WIP.2017.01.30
  ext2fs_xattrs_iterate@Base 1.43
  ext2fs_xattrs_open@Base 1.43
  ext2fs_xattrs_read@Base 1.43
diff --git a/debugfs/Makefile.in b/debugfs/Makefile.in
index a3fe13e..3ac80d9 100644
--- a/debugfs/Makefile.in
+++ b/debugfs/Makefile.in
@@ -68,6 +68,11 @@
 	$(Q) $(CC) $(LDFLAGS_STATIC) -o debugfs.static $(DEBUG_OBJS) \
 		$(STATIC_LIBS) $(READLINE_LIB)
 
+debugfs.static-libs: $(DEBUG_OBJS) $(STATIC_DEPLIBS)
+	$(E) "	LD $@"
+	$(Q) $(CC) -o debugfs.static-libs $(DEBUG_OBJS) \
+		$(STATIC_LIBS) $(READLINE_LIB)
+
 rdebugfs: $(RO_DEBUG_OBJS) $(DEPLIBS)
 	$(E) "	LD $@"
 	$(Q) $(CC) $(ALL_LDFLAGS) -o rdebugfs $(RO_DEBUG_OBJS) $(LIBS)
@@ -146,7 +151,7 @@
 clean::
 	$(RM) -f $(PROGS) debugfs.8 \#* *.s *.o *.a *~ debug_cmds.c \
 		extent_cmds.c ro_debug_cmds.c core rdebugfs debugfs.static \
-		tst_set_fields
+		debugfs.static-libs tst_set_fields
 
 mostlyclean: clean
 distclean: clean
@@ -335,7 +340,8 @@
  $(top_srcdir)/lib/ext2fs/fiemap.h $(srcdir)/../misc/create_inode.h \
  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/nls-enable.h
 xattrs.o: $(srcdir)/xattrs.c $(top_builddir)/lib/config.h \
- $(top_builddir)/lib/dirpaths.h $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/support/cstring.h \
+ $(srcdir)/debugfs.h $(top_srcdir)/lib/ss/ss.h \
  $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
  $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
@@ -355,11 +361,11 @@
  $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
  $(top_srcdir)/lib/support/quotaio_tree.h
 journal.o: $(srcdir)/journal.c $(top_builddir)/lib/config.h \
- $(top_builddir)/lib/dirpaths.h $(srcdir)/../e2fsck/jfs_user.h \
- $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
- $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
- $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
- $(top_builddir)/lib/ext2fs/ext2_err.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/journal.h \
+ $(srcdir)/../e2fsck/jfs_user.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
+ $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
+ $(top_srcdir)/lib/ext2fs/ext3_extents.h $(top_srcdir)/lib/et/com_err.h \
+ $(top_srcdir)/lib/ext2fs/ext2_io.h $(top_builddir)/lib/ext2fs/ext2_err.h \
  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
  $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
  $(top_srcdir)/lib/ext2fs/kernel-list.h
@@ -388,6 +394,7 @@
  $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
  $(srcdir)/../misc/create_inode.h $(top_srcdir)/lib/e2p/e2p.h \
  $(top_srcdir)/lib/support/quotaio.h $(top_srcdir)/lib/support/dqblk_v2.h \
- $(top_srcdir)/lib/support/quotaio_tree.h $(srcdir)/../e2fsck/jfs_user.h \
+ $(top_srcdir)/lib/support/quotaio_tree.h \
  $(top_srcdir)/lib/ext2fs/kernel-jbd.h $(top_srcdir)/lib/ext2fs/jfs_compat.h \
- $(top_srcdir)/lib/ext2fs/kernel-list.h
+ $(top_srcdir)/lib/ext2fs/kernel-list.h $(srcdir)/journal.h \
+ $(srcdir)/../e2fsck/jfs_user.h
diff --git a/debugfs/journal.c b/debugfs/journal.c
index fcd5d5e..9997c7c 100644
--- a/debugfs/journal.c
+++ b/debugfs/journal.c
@@ -655,6 +655,8 @@
 		if (fs->io != fs->journal_io)
 			io_channel_close(fs->journal_io);
 		fs->journal_io = NULL;
+		free(fs->journal_name);
+		fs->journal_name = NULL;
 	}
 
 #ifndef USE_INODE_IO
diff --git a/debugfs/quota.c b/debugfs/quota.c
index 9b8dbaf..0b7c2ee 100644
--- a/debugfs/quota.c
+++ b/debugfs/quota.c
@@ -25,7 +25,7 @@
 
 #include "debugfs.h"
 
-const char *quota_type[] = { "user", "group", NULL };
+const char *quota_type[] = { "user", "group", "project", NULL };
 
 static int load_quota_ctx(char *progname)
 {
@@ -42,7 +42,7 @@
 	if (current_qctx)
 		return 0;
 
-	retval = quota_init_context(&current_qctx, current_fs, QUOTA_ALL_BIT);
+	retval = quota_init_context(&current_qctx, current_fs, 0);
 	if (retval) {
 		com_err(current_fs->device_name, retval,
 			"while trying to load quota information");
@@ -92,7 +92,7 @@
 static int list_quota_callback(struct dquot *dq,
 			       void *cb_data EXT2FS_ATTR((unused)))
 {
-	printf("%8u   %8lld %8lld %8lld    %8lld %8lld %8lld\n",
+	printf("%10u   %8lld %8lld %8lld    %8lld %8lld %8lld\n",
 	       dq->dq_id, (long long)dq->dq_dqb.dqb_curspace,
 	       (long long)dq->dq_dqb.dqb_bsoftlimit,
 	       (long long)dq->dq_dqb.dqb_bhardlimit,
@@ -120,8 +120,8 @@
 	if (type < 0)
 		return;
 
-	printf("%8s   %8s %8s %8s    %8s %8s %8s\n",
-	       (type == 0) ? "user id" : "group id",
+	printf("%7s %2s   %8s %8s %8s    %8s %8s %8s\n",
+	       quota_type[type], "id",
 	       "blocks", "quota", "limit", "inodes", "quota", "limit");
 	qh = current_qctx->quota_file[type];
 	retval = qh->qh_ops->scan_dquots(qh, list_quota_callback, NULL);
@@ -154,8 +154,8 @@
 	if (err)
 		return;
 
-	printf("%8s   %8s %8s %8s    %8s %8s %8s\n",
-	       (type == 0) ? "user id" : "group id",
+	printf("%7s %2s   %8s %8s %8s    %8s %8s %8s\n",
+	       quota_type[type], "id",
 	       "blocks", "quota", "limit", "inodes", "quota", "limit");
 
 	qh = current_qctx->quota_file[type];
diff --git a/debugfs/xattrs.c b/debugfs/xattrs.c
index b938cc0..1112da4 100644
--- a/debugfs/xattrs.c
+++ b/debugfs/xattrs.c
@@ -14,29 +14,71 @@
 extern char *optarg;
 #endif
 #include <ctype.h>
+#include "support/cstring.h"
 
 #include "debugfs.h"
 
+#define PRINT_XATTR_HEX		0x01
+#define PRINT_XATTR_RAW		0x02
+#define PRINT_XATTR_C		0x04
+#define PRINT_XATTR_STATFMT	0x08
+#define PRINT_XATTR_NOQUOTES	0x10
+
 /* Dump extended attributes */
-static void dump_xattr_string(FILE *out, const char *str, int len)
+static void print_xattr_hex(FILE *f, const char *str, int len)
+{
+	int i;
+
+	for (i = 0; i < len; i++)
+		fprintf(f, "%02x ", (unsigned char)str[i]);
+}
+
+/* Dump extended attributes */
+static void print_xattr_string(FILE *f, const char *str, int len, int flags)
 {
 	int printable = 0;
 	int i;
 
-	/* check: is string "printable enough?" */
-	for (i = 0; i < len; i++)
-		if (isprint(str[i]))
-			printable++;
+	if (flags & PRINT_XATTR_RAW) {
+		fwrite(str, len, 1, f);
+		return;
+	}
 
-	if (printable <= len*7/8)
-		printable = 0;
+	if ((flags & PRINT_XATTR_C) == 0) {
+		/* check: is string "printable enough?" */
+		for (i = 0; i < len; i++)
+			if (isprint(str[i]))
+				printable++;
 
-	for (i = 0; i < len; i++)
-		if (printable)
-			fprintf(out, isprint(str[i]) ? "%c" : "\\%03o",
-				(unsigned char)str[i]);
-		else
-			fprintf(out, "%02x ", (unsigned char)str[i]);
+		if (printable <= len*7/8)
+			flags |= PRINT_XATTR_HEX;
+	}
+
+	if (flags & PRINT_XATTR_HEX) {
+		print_xattr_hex(f, str, len);
+	} else {
+		if ((flags & PRINT_XATTR_NOQUOTES) == 0)
+			fputc('\"', f);
+		print_c_string(f, str, len);
+		if ((flags & PRINT_XATTR_NOQUOTES) == 0)
+			fputc('\"', f);
+	}
+}
+
+static void print_xattr(FILE *f, char *name, char *value, size_t value_len,
+			int print_flags)
+{
+	print_xattr_string(f, name, strlen(name), PRINT_XATTR_NOQUOTES);
+	fprintf(f, " (%zu)", value_len);
+	if ((print_flags & PRINT_XATTR_STATFMT) &&
+	    (strcmp(name, "system.data") == 0))
+		value_len = 0;
+	if (value_len != 0 &&
+	    (!(print_flags & PRINT_XATTR_STATFMT) || (value_len < 40))) {
+		fprintf(f, " = ");
+		print_xattr_string(f, value, value_len, print_flags);
+	}
+	fputc('\n', f);
 }
 
 static int dump_attr(char *name, char *value, size_t value_len, void *data)
@@ -44,14 +86,7 @@
 	FILE *out = data;
 
 	fprintf(out, "  ");
-	dump_xattr_string(out, name, strlen(name));
-	if (strcmp(name, "system.data") != 0) {
-		fprintf(out, " = \"");
-		dump_xattr_string(out, value, value_len);
-		fprintf(out, "\"");
-	}
-	fprintf(out, " (%zu)\n", value_len);
-
+	print_xattr(out, name, value, value_len, PRINT_XATTR_STATFMT);
 	return 0;
 }
 
@@ -110,10 +145,12 @@
 	char *buf = NULL;
 	size_t buflen;
 	int i;
+	int print_flags = 0;
+	int handle_flags = 0;
 	errcode_t err;
 
 	reset_getopt();
-	while ((i = getopt(argc, argv, "f:")) != -1) {
+	while ((i = getopt(argc, argv, "Cf:rxV")) != -1) {
 		switch (i) {
 		case 'f':
 			if (fp)
@@ -124,16 +161,28 @@
 				return;
 			}
 			break;
+		case 'r':
+			handle_flags |= XATTR_HANDLE_FLAG_RAW;
+			break;
+		case 'x':
+			print_flags |= PRINT_XATTR_HEX;
+			break;
+		case 'V':
+			print_flags |= PRINT_XATTR_RAW;
+			break;
+		case 'C':
+			print_flags |= PRINT_XATTR_C;
+			break;
 		default:
-			printf("%s: Usage: %s <file> <attr> [-f outfile]\n",
-			       argv[0], argv[0]);
-			goto out2;
+			goto usage;
 		}
 	}
 
 	if (optind != argc - 2) {
-		printf("%s: Usage: %s <file> <attr> [-f outfile]\n", argv[0],
-		       argv[0]);
+	usage:
+		printf("%s: Usage: %s [-f outfile]|[-xVC] [-r] <file> <attr>\n",
+			       argv[0], argv[0]);
+
 		goto out2;
 	}
 
@@ -148,6 +197,10 @@
 	if (err)
 		goto out2;
 
+	err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
+	if (err)
+		goto out;
+
 	err = ext2fs_xattrs_read(h);
 	if (err)
 		goto out;
@@ -159,7 +212,14 @@
 	if (fp) {
 		fwrite(buf, buflen, 1, fp);
 	} else {
-		dump_xattr_string(stdout, buf, buflen);
+		if (print_flags & PRINT_XATTR_RAW) {
+			if (print_flags & PRINT_XATTR_HEX|PRINT_XATTR_C)
+				print_flags &= ~PRINT_XATTR_RAW;
+			print_xattr_string(stdout, buf, buflen, print_flags);
+		} else {
+			print_xattr(stdout, argv[optind + 1],
+				    buf, buflen, print_flags);
+		}
 		printf("\n");
 	}
 
@@ -180,11 +240,13 @@
 	FILE *fp = NULL;
 	char *buf = NULL;
 	size_t buflen;
+	int print_flags = 0;
+	int handle_flags = 0;
 	int i;
 	errcode_t err;
 
 	reset_getopt();
-	while ((i = getopt(argc, argv, "f:")) != -1) {
+	while ((i = getopt(argc, argv, "f:r")) != -1) {
 		switch (i) {
 		case 'f':
 			if (fp)
@@ -195,6 +257,9 @@
 				return;
 			}
 			break;
+		case 'r':
+			handle_flags |= XATTR_HANDLE_FLAG_RAW;
+			break;
 		default:
 			goto print_usage;
 		}
@@ -203,7 +268,7 @@
 	if (!(fp && optind == argc - 2) && !(!fp && optind == argc - 3)) {
 	print_usage:
 		printf("Usage:\t%s <file> <attr> <value>\n", argv[0]);
-		printf("\t%s -f <value_file> <file> <attr>\n", argv[0]);
+		printf("\t%s -f <value_file> [-r] <file> <attr>\n", argv[0]);
 		goto out2;
 	}
 
@@ -222,6 +287,10 @@
 	if (err)
 		goto out2;
 
+	err = ext2fs_xattrs_flags(h, &handle_flags, NULL);
+	if (err)
+		goto out;
+
 	err = ext2fs_xattrs_read(h);
 	if (err)
 		goto out;
@@ -233,7 +302,7 @@
 		buflen = fread(buf, 1, current_fs->blocksize, fp);
 	} else {
 		buf = argv[optind + 2];
-		buflen = strlen(argv[optind + 2]);
+		buflen = parse_c_string(buf);
 	}
 
 	err = ext2fs_xattr_set(h, argv[optind + 1], buf, buflen);
diff --git a/e2fsck/e2fsck.c b/e2fsck/e2fsck.c
index 6fb2f40..5184a17 100644
--- a/e2fsck/e2fsck.c
+++ b/e2fsck/e2fsck.c
@@ -146,6 +146,10 @@
 		ext2fs_u32_list_free(ctx->encrypted_dirs);
 		ctx->encrypted_dirs = 0;
 	}
+	if (ctx->inode_count) {
+		ext2fs_free_icount(ctx->inode_count);
+		ctx->inode_count = 0;
+	}
 
 	/* Clear statistic counters */
 	ctx->fs_directory_count = 0;
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index ac4d554..8ef40f6 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -1063,6 +1063,7 @@
 	int		imagic_fs, extent_fs, inlinedata_fs;
 	int		low_dtime_check = 1;
 	int		inode_size = EXT2_INODE_SIZE(fs->super);
+	int		bufsize;
 	int		failed_csum = 0;
 	ext2_ino_t	ino_threshold = 0;
 	dgrp_t		ra_group = 0;
@@ -1162,8 +1163,11 @@
 		ctx->flags |= E2F_FLAG_ABORT;
 		return;
 	}
+	bufsize = inode_size;
+	if (bufsize < sizeof(struct ext2_inode_large))
+		bufsize = sizeof(struct ext2_inode_large);
 	inode = (struct ext2_inode *)
-		e2fsck_allocate_memory(ctx, inode_size, "scratch inode");
+		e2fsck_allocate_memory(ctx, bufsize, "scratch inode");
 
 	inodes_to_process = (struct process_inode_block *)
 		e2fsck_allocate_memory(ctx,
diff --git a/e2fsck/pass2.c b/e2fsck/pass2.c
index 5020a19..11c19e8 100644
--- a/e2fsck/pass2.c
+++ b/e2fsck/pass2.c
@@ -121,7 +121,7 @@
 	if (cd.pctx.errcode) {
 		fix_problem(ctx, PR_2_ALLOCATE_ICOUNT, &cd.pctx);
 		ctx->flags |= E2F_FLAG_ABORT;
-		return;
+		goto cleanup;
 	}
 	buf = (char *) e2fsck_allocate_memory(ctx, 2*fs->blocksize,
 					      "directory scan buffer");
@@ -156,17 +156,17 @@
 	}
 
 	if (ctx->flags & E2F_FLAG_RUN_RETURN)
-		return;
+		goto cleanup;
 
 	if (cd.pctx.errcode) {
 		fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx);
 		ctx->flags |= E2F_FLAG_ABORT;
-		return;
+		goto cleanup;
 	}
 
 	for (i=0; (dx_dir = e2fsck_dx_dir_info_iter(ctx, &i)) != 0;) {
 		if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
-			return;
+			goto cleanup;
 		if (e2fsck_dir_will_be_rehashed(ctx, dx_dir->ino) ||
 		    dx_dir->numblocks == 0)
 			continue;
@@ -285,6 +285,8 @@
 	}
 
 	print_resource_track(ctx, _("Pass 2"), &rtrack, fs->io);
+cleanup:
+	ext2fs_free_mem(&buf);
 }
 
 #define MAX_DEPTH 32000
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index e00fa16..eb9f311 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -1338,7 +1338,6 @@
 	int old_bitmaps;
 	__u32 features[3];
 	char *cp;
-	unsigned int qtype_bits = 0;
 	enum quota_type qtype;
 
 	clear_problem_context(&pctx);
@@ -1786,14 +1785,8 @@
 
 	if (ext2fs_has_feature_quota(sb)) {
 		/* Quotas were enabled. Do quota accounting during fsck. */
-		for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
-			if (*quota_sb_inump(sb, qtype) != 0)
-				qtype_bits |= 1 << qtype;
-		}
-
 		clear_problem_context(&pctx);
-		pctx.errcode = quota_init_context(&ctx->qctx, ctx->fs,
-						  qtype_bits);
+		pctx.errcode = quota_init_context(&ctx->qctx, ctx->fs, 0);
 		if (pctx.errcode) {
 			fix_problem(ctx, PR_0_QUOTA_INIT_CTX, &pctx);
 			fatal_error(ctx, 0);
@@ -1842,7 +1835,7 @@
 		int needs_writeout;
 
 		for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
-			if (((1 << qtype) & qtype_bits) == 0)
+			if (*quota_sb_inump(sb, qtype) == 0)
 				continue;
 			needs_writeout = 0;
 			pctx.num = qtype;
diff --git a/lib/e2p/ostype.c b/lib/e2p/ostype.c
index d002e75..7f08844 100644
--- a/lib/e2p/ostype.c
+++ b/lib/e2p/ostype.c
@@ -66,6 +66,7 @@
 		s = e2p_os2string(i);
 		os = e2p_string2os(s);
 		printf("%d: %s (%d)\n", i, s, os);
+		free(s);
 		if (i != os) {
 			fprintf(stderr, "Failure!\n");
 			exit(1);
diff --git a/lib/et/test_cases/imap_err.c b/lib/et/test_cases/imap_err.c
index 6f576d3..4d2ffc6 100644
--- a/lib/et/test_cases/imap_err.c
+++ b/lib/et/test_cases/imap_err.c
@@ -8,16 +8,28 @@
 #define N_(a) a
 
 static const char * const text[] = {
+	N_(   "Internal Error"),
 	N_(   "System I/O error"),
+	N_(   "Item does not exist"),
+	N_(   "Operating System Error"),
+	N_(   "mail system storage has been exceeded"),
 	N_(   "Permission denied"),
 	N_(   "Over quota"),
+	N_(   "Message size exceeds fixed limit"),
 	N_(   "Too many user flags in mailbox"),
+	N_(   "Invalid namespace prefix in configuration file"),
 	N_(   "Mailbox has an invalid format"),
+	N_(   "Replication inconsistency detected"),
+	N_(   "Mailbox format corruption detected"),
 	N_(   "Operation is not supported on mailbox"),
 	N_(   "Mailbox does not exist"),
 	N_(   "Mailbox already exists"),
 	N_(   "Invalid mailbox name"),
-	N_(   "Mailbox is locked by POP server"),
+	N_(   "Invalid mailbox type"),
+	N_(   "Mailbox has been moved to another server"),
+	N_(   "Mailbox is currently reserved"),
+	N_(   "Mailbox is locked"),
+	N_(   "Delivery to mailbox is disabled"),
 	N_(   "Unknown/invalid partition"),
 	N_(   "Invalid identifier"),
 	N_(   "Message contains NUL characters"),
@@ -26,16 +38,35 @@
 	N_(   "Message contains invalid header"),
 	N_(   "Message has no header/body separator"),
 	N_(   "Quota root does not exist"),
+	N_(   "Bad protocol"),
+	N_(   "Syntax error in parameters"),
+	N_(   "Invalid annotation entry"),
+	N_(   "Invalid annotation attribute"),
+	N_(   "Invalid annotation value"),
+	N_(   "Bad URL"),
+	N_(   "Zero-length message literal"),
+	N_(   "Invalid server requested"),
+	N_(   "Server(s) unavailable to complete operation"),
+	N_(   "The remote Server(s) denied the operation"),
+	N_(   "Retry operation"),
+	N_(   "This mailbox hierarchy does not exist on a single backend server."),
+	N_(   "The remote server does not support MULTIAPPEND"),
 	N_(   "Unrecognized character set"),
 	N_(   "Invalid user"),
 	N_(   "Login incorrect"),
 	N_(   "Anonymous login is not permitted"),
 	N_(   "Unsupported quota resource"),
-	N_(   "Mailbox is over quota"),
-	N_(   "Mailbox is at %d%% of quota"),
+	N_(   "Authentication failed"),
+	N_(   "Client cancelled authentication"),
+	N_(   "Protocol error during authentication"),
+	N_(   "Mailbox is over %s quota"),
+	N_(   "Mailbox is at %d%% of %s quota"),
 	N_(   "Message %d no longer exists"),
 	N_(   "Unable to checkpoint \\Seen state"),
 	N_(   "Unable to preserve \\Seen state"),
+	N_(   "No matching messages"),
+	N_(   "No matching annotations"),
+	N_(   "[UNKNOWN-CTE] Can not process the binary data"),
 	N_(   "LOGOUT received"),
 	N_(   "Completed"),
     0
@@ -52,7 +83,7 @@
 };
 extern struct et_list *_et_list;
 
-const struct error_table et_imap_error_table = { text, -1904809472L, 30 };
+const struct error_table et_imap_error_table = { text, -1904809472L, 61 };
 
 static struct et_list link = { 0, 0 };
 
diff --git a/lib/et/test_cases/imap_err.et b/lib/et/test_cases/imap_err.et
index 33f5bbc..bfae243 100644
--- a/lib/et/test_cases/imap_err.et
+++ b/lib/et/test_cases/imap_err.et
@@ -1,46 +1,85 @@
 # imap_err.et -- Error codes for Cyrus IMAP server programs
 #
-# Copyright 1998 Carnegie Mellon University
-# 
-# No warranties, either expressed or implied, are made regarding the
-# operation, use, or results of the software.
+# Copyright (c) 1994-2008 Carnegie Mellon University.  All rights reserved.
 #
-# Permission to use, copy, modify and distribute this software and its
-# documentation is hereby granted for non-commercial purposes only
-# provided that this copyright notice appears in all copies and in
-# supporting documentation.
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
 #
-# Permission is also granted to Internet Service Providers and others
-# entities to use the software for internal purposes.
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
 #
-# The distribution, modification or sale of a product which uses or is
-# based on the software, in whole or in part, for commercial purposes or
-# benefits requires specific, additional permission from:
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in
+#    the documentation and/or other materials provided with the
+#    distribution.
 #
-#  Office of Technology Transfer
-#  Carnegie Mellon University
-#  5000 Forbes Avenue
-#  Pittsburgh, PA  15213-3890
-#  (412) 268-4387, fax: (412) 268-7395
-#  tech-transfer@andrew.cmu.edu
-# 
+# 3. The name "Carnegie Mellon University" must not be used to
+#    endorse or promote products derived from this software without
+#    prior written permission. For permission or any legal
+#    details, please contact
+#      Carnegie Mellon University
+#      Center for Technology Transfer and Enterprise Creation
+#      4615 Forbes Avenue
+#      Suite 302
+#      Pittsburgh, PA  15213
+#      (412) 268-7393, fax: (412) 268-7395
+#      innovation@andrew.cmu.edu
+#
+# 4. Redistributions of any form whatsoever must retain the following
+#    acknowledgment:
+#    "This product includes software developed by Computing Services
+#     at Carnegie Mellon University (http://www.cmu.edu/computing/)."
+#
+# CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
+# THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
+# FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
+# AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
+# OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
 error_table imap
 
+ec IMAP_INTERNAL,
+   "Internal Error"
+
 ec IMAP_IOERROR,
    "System I/O error"
 
+ec IMAP_NOTFOUND,
+   "Item does not exist"
+
+ec IMAP_SYS_ERROR,
+   "Operating System Error"
+
+ec IMAP_NOSPACE,
+   "mail system storage has been exceeded"
+
 ec IMAP_PERMISSION_DENIED,
    "Permission denied"
 
 ec IMAP_QUOTA_EXCEEDED,
    "Over quota"
 
+ec IMAP_MESSAGE_TOO_LARGE,
+   "Message size exceeds fixed limit"
+
 ec IMAP_USERFLAG_EXHAUSTED,
    "Too many user flags in mailbox"
 
+ec IMAP_NAMESPACE_BADPREFIX,
+   "Invalid namespace prefix in configuration file"
+
 ec IMAP_MAILBOX_BADFORMAT,
    "Mailbox has an invalid format"
 
+ec IMAP_SYNC_CHECKSUM,
+   "Replication inconsistency detected"
+
+ec IMAP_MAILBOX_CHECKSUM,
+   "Mailbox format corruption detected"
+
 ec IMAP_MAILBOX_NOTSUPPORTED,
    "Operation is not supported on mailbox"
 
@@ -53,8 +92,20 @@
 ec IMAP_MAILBOX_BADNAME,
    "Invalid mailbox name"
 
-ec IMAP_MAILBOX_POPLOCKED,
-   "Mailbox is locked by POP server"
+ec IMAP_MAILBOX_BADTYPE,
+   "Invalid mailbox type"
+
+ec IMAP_MAILBOX_MOVED,
+   "Mailbox has been moved to another server"
+
+ec IMAP_MAILBOX_RESERVED,
+   "Mailbox is currently reserved"
+
+ec IMAP_MAILBOX_LOCKED,
+   "Mailbox is locked"
+
+ec IMAP_MAILBOX_DISABLED,
+   "Delivery to mailbox is disabled"
 
 ec IMAP_PARTITION_UNKNOWN,
    "Unknown/invalid partition"
@@ -80,6 +131,46 @@
 ec IMAP_QUOTAROOT_NONEXISTENT,
    "Quota root does not exist"
 
+ec IMAP_PROTOCOL_ERROR,
+   "Bad protocol"
+
+ec IMAP_PROTOCOL_BAD_PARAMETERS,
+   "Syntax error in parameters"
+
+ec IMAP_ANNOTATION_BADENTRY,
+   "Invalid annotation entry"
+
+ec IMAP_ANNOTATION_BADATTRIB,
+   "Invalid annotation attribute"
+
+ec IMAP_ANNOTATION_BADVALUE,
+   "Invalid annotation value"
+
+ec IMAP_BADURL,
+   "Bad URL"
+
+ec IMAP_ZERO_LENGTH_LITERAL,
+   "Zero-length message literal"
+
+# following used only proxy/db operations
+ec IMAP_BAD_SERVER,
+   "Invalid server requested"
+
+ec IMAP_SERVER_UNAVAILABLE,
+   "Server(s) unavailable to complete operation"
+
+ec IMAP_REMOTE_DENIED,
+   "The remote Server(s) denied the operation"
+
+ec IMAP_AGAIN,
+   "Retry operation"
+
+ec IMAP_NOT_SINGULAR_ROOT,
+   "This mailbox hierarchy does not exist on a single backend server."
+
+ec IMAP_REMOTE_NO_MULTIAPPEND,
+   "The remote server does not support MULTIAPPEND"
+
 # Following only used for internationalization of error messages
 
 ec IMAP_UNRECOGNIZED_CHARSET,
@@ -97,13 +188,24 @@
 ec IMAP_UNSUPPORTED_QUOTA,
    "Unsupported quota resource"
 
+# Following used only for SASL operations
+
+ec IMAP_SASL_FAIL,
+   "Authentication failed"
+
+ec IMAP_SASL_CANCEL,
+   "Client cancelled authentication"
+
+ec IMAP_SASL_PROTERR,
+   "Protocol error during authentication"
+
 # Following used for internationalization of untagged OK/NO responses
 
 ec IMAP_NO_OVERQUOTA,
-   "Mailbox is over quota"
+   "Mailbox is over %s quota"
 
 ec IMAP_NO_CLOSEQUOTA,
-   "Mailbox is at %d%% of quota"
+   "Mailbox is at %d%% of %s quota"
 
 ec IMAP_NO_MSGGONE,
    "Message %d no longer exists"
@@ -114,6 +216,15 @@
 ec IMAP_NO_CHECKPRESERVE,
    "Unable to preserve \\Seen state"
 
+ec IMAP_NO_NOSUCHMSG,
+   "No matching messages"
+
+ec IMAP_NO_NOSUCHANNOTATION,
+   "No matching annotations"
+
+ec IMAP_NO_UNKNOWN_CTE,
+   "[UNKNOWN-CTE] Can not process the binary data"
+
 # Following used for internationalization of untagged BYE response
 
 ec IMAP_BYE_LOGOUT,
diff --git a/lib/et/test_cases/imap_err.h b/lib/et/test_cases/imap_err.h
index 17664c4..bfa8f65 100644
--- a/lib/et/test_cases/imap_err.h
+++ b/lib/et/test_cases/imap_err.h
@@ -5,36 +5,67 @@
 
 #include <et/com_err.h>
 
-#define IMAP_IOERROR                             (-1904809472L)
-#define IMAP_PERMISSION_DENIED                   (-1904809471L)
-#define IMAP_QUOTA_EXCEEDED                      (-1904809470L)
-#define IMAP_USERFLAG_EXHAUSTED                  (-1904809469L)
-#define IMAP_MAILBOX_BADFORMAT                   (-1904809468L)
-#define IMAP_MAILBOX_NOTSUPPORTED                (-1904809467L)
-#define IMAP_MAILBOX_NONEXISTENT                 (-1904809466L)
-#define IMAP_MAILBOX_EXISTS                      (-1904809465L)
-#define IMAP_MAILBOX_BADNAME                     (-1904809464L)
-#define IMAP_MAILBOX_POPLOCKED                   (-1904809463L)
-#define IMAP_PARTITION_UNKNOWN                   (-1904809462L)
-#define IMAP_INVALID_IDENTIFIER                  (-1904809461L)
-#define IMAP_MESSAGE_CONTAINSNULL                (-1904809460L)
-#define IMAP_MESSAGE_CONTAINSNL                  (-1904809459L)
-#define IMAP_MESSAGE_CONTAINS8BIT                (-1904809458L)
-#define IMAP_MESSAGE_BADHEADER                   (-1904809457L)
-#define IMAP_MESSAGE_NOBLANKLINE                 (-1904809456L)
-#define IMAP_QUOTAROOT_NONEXISTENT               (-1904809455L)
-#define IMAP_UNRECOGNIZED_CHARSET                (-1904809454L)
-#define IMAP_INVALID_USER                        (-1904809453L)
-#define IMAP_INVALID_LOGIN                       (-1904809452L)
-#define IMAP_ANONYMOUS_NOT_PERMITTED             (-1904809451L)
-#define IMAP_UNSUPPORTED_QUOTA                   (-1904809450L)
-#define IMAP_NO_OVERQUOTA                        (-1904809449L)
-#define IMAP_NO_CLOSEQUOTA                       (-1904809448L)
-#define IMAP_NO_MSGGONE                          (-1904809447L)
-#define IMAP_NO_CHECKSEEN                        (-1904809446L)
-#define IMAP_NO_CHECKPRESERVE                    (-1904809445L)
-#define IMAP_BYE_LOGOUT                          (-1904809444L)
-#define IMAP_OK_COMPLETED                        (-1904809443L)
+#define IMAP_INTERNAL                            (-1904809472L)
+#define IMAP_IOERROR                             (-1904809471L)
+#define IMAP_NOTFOUND                            (-1904809470L)
+#define IMAP_SYS_ERROR                           (-1904809469L)
+#define IMAP_NOSPACE                             (-1904809468L)
+#define IMAP_PERMISSION_DENIED                   (-1904809467L)
+#define IMAP_QUOTA_EXCEEDED                      (-1904809466L)
+#define IMAP_MESSAGE_TOO_LARGE                   (-1904809465L)
+#define IMAP_USERFLAG_EXHAUSTED                  (-1904809464L)
+#define IMAP_NAMESPACE_BADPREFIX                 (-1904809463L)
+#define IMAP_MAILBOX_BADFORMAT                   (-1904809462L)
+#define IMAP_SYNC_CHECKSUM                       (-1904809461L)
+#define IMAP_MAILBOX_CHECKSUM                    (-1904809460L)
+#define IMAP_MAILBOX_NOTSUPPORTED                (-1904809459L)
+#define IMAP_MAILBOX_NONEXISTENT                 (-1904809458L)
+#define IMAP_MAILBOX_EXISTS                      (-1904809457L)
+#define IMAP_MAILBOX_BADNAME                     (-1904809456L)
+#define IMAP_MAILBOX_BADTYPE                     (-1904809455L)
+#define IMAP_MAILBOX_MOVED                       (-1904809454L)
+#define IMAP_MAILBOX_RESERVED                    (-1904809453L)
+#define IMAP_MAILBOX_LOCKED                      (-1904809452L)
+#define IMAP_MAILBOX_DISABLED                    (-1904809451L)
+#define IMAP_PARTITION_UNKNOWN                   (-1904809450L)
+#define IMAP_INVALID_IDENTIFIER                  (-1904809449L)
+#define IMAP_MESSAGE_CONTAINSNULL                (-1904809448L)
+#define IMAP_MESSAGE_CONTAINSNL                  (-1904809447L)
+#define IMAP_MESSAGE_CONTAINS8BIT                (-1904809446L)
+#define IMAP_MESSAGE_BADHEADER                   (-1904809445L)
+#define IMAP_MESSAGE_NOBLANKLINE                 (-1904809444L)
+#define IMAP_QUOTAROOT_NONEXISTENT               (-1904809443L)
+#define IMAP_PROTOCOL_ERROR                      (-1904809442L)
+#define IMAP_PROTOCOL_BAD_PARAMETERS             (-1904809441L)
+#define IMAP_ANNOTATION_BADENTRY                 (-1904809440L)
+#define IMAP_ANNOTATION_BADATTRIB                (-1904809439L)
+#define IMAP_ANNOTATION_BADVALUE                 (-1904809438L)
+#define IMAP_BADURL                              (-1904809437L)
+#define IMAP_ZERO_LENGTH_LITERAL                 (-1904809436L)
+#define IMAP_BAD_SERVER                          (-1904809435L)
+#define IMAP_SERVER_UNAVAILABLE                  (-1904809434L)
+#define IMAP_REMOTE_DENIED                       (-1904809433L)
+#define IMAP_AGAIN                               (-1904809432L)
+#define IMAP_NOT_SINGULAR_ROOT                   (-1904809431L)
+#define IMAP_REMOTE_NO_MULTIAPPEND               (-1904809430L)
+#define IMAP_UNRECOGNIZED_CHARSET                (-1904809429L)
+#define IMAP_INVALID_USER                        (-1904809428L)
+#define IMAP_INVALID_LOGIN                       (-1904809427L)
+#define IMAP_ANONYMOUS_NOT_PERMITTED             (-1904809426L)
+#define IMAP_UNSUPPORTED_QUOTA                   (-1904809425L)
+#define IMAP_SASL_FAIL                           (-1904809424L)
+#define IMAP_SASL_CANCEL                         (-1904809423L)
+#define IMAP_SASL_PROTERR                        (-1904809422L)
+#define IMAP_NO_OVERQUOTA                        (-1904809421L)
+#define IMAP_NO_CLOSEQUOTA                       (-1904809420L)
+#define IMAP_NO_MSGGONE                          (-1904809419L)
+#define IMAP_NO_CHECKSEEN                        (-1904809418L)
+#define IMAP_NO_CHECKPRESERVE                    (-1904809417L)
+#define IMAP_NO_NOSUCHMSG                        (-1904809416L)
+#define IMAP_NO_NOSUCHANNOTATION                 (-1904809415L)
+#define IMAP_NO_UNKNOWN_CTE                      (-1904809414L)
+#define IMAP_BYE_LOGOUT                          (-1904809413L)
+#define IMAP_OK_COMPLETED                        (-1904809412L)
 extern const struct error_table et_imap_error_table;
 extern void initialize_imap_error_table(void);
 
diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in
index 6a3656d..2081da8 100644
--- a/lib/ext2fs/Makefile.in
+++ b/lib/ext2fs/Makefile.in
@@ -312,10 +312,12 @@
 	$(Q) $(CC) -o tst_bitops tst_bitops.o $(ALL_CFLAGS) $(ALL_LDFLAGS) \
 		$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
 
-tst_getsectsize: tst_getsectsize.o $(STATIC_LIBEXT2FS) $(DEPSTATIC_LIBCOM_ERR)
+tst_getsectsize: tst_getsectsize.o getsectsize.o $(STATIC_LIBEXT2FS) \
+			$(DEPSTATIC_LIBCOM_ERR)
 	$(E) "	LD $@"
-	$(Q) $(CC) -o tst_sectgetsize tst_getsectsize.o $(ALL_LDFLAGS) \
-		$(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) $(SYSLIBS)
+	$(Q) $(CC) -o tst_getsectsize tst_getsectsize.o getsectsize.o \
+		$(ALL_LDFLAGS) $(STATIC_LIBEXT2FS) $(STATIC_LIBCOM_ERR) \
+		$(SYSLIBS)
 
 tst_types.o: $(srcdir)/tst_types.c ext2_types.h 
 
@@ -521,7 +523,7 @@
 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_libext2fs tst_sha256 tst_sha512 \
-    tst_digest_encode
+    tst_digest_encode tst_getsize tst_getsectsize
 	$(TESTENV) ./tst_bitops
 	$(TESTENV) ./tst_badblocks
 	$(TESTENV) ./tst_iscan
@@ -574,7 +576,7 @@
 clean::
 	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* \
 		tst_badblocks tst_iscan ext2_err.et ext2_err.c ext2_err.h \
-		tst_byteswap tst_ismounted tst_getsize tst_sectgetsize \
+		tst_byteswap tst_ismounted tst_getsize tst_getsectsize \
 		tst_bitops tst_types tst_icount tst_super_size tst_csum \
 		tst_bitmaps tst_bitmaps_out tst_extents tst_inline \
 		tst_inline_data tst_inode_size tst_bitmaps_cmd.c \
@@ -787,8 +789,8 @@
 ext_attr.o: $(srcdir)/ext_attr.c $(top_builddir)/lib/config.h \
  $(top_builddir)/lib/dirpaths.h $(srcdir)/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2_ext_attr.h \
- $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h $(srcdir)/ext3_extents.h \
- $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
+ $(srcdir)/ext4_acl.h $(srcdir)/ext2fs.h $(srcdir)/ext2_fs.h \
+ $(srcdir)/ext3_extents.h $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_io.h \
  $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
  $(srcdir)/bitops.h
 extent.o: $(srcdir)/extent.c $(top_builddir)/lib/config.h \
@@ -1317,11 +1319,11 @@
  $(top_srcdir)/lib/support/dqblk_v2.h \
  $(top_srcdir)/lib/support/quotaio_tree.h
 xattrs.o: $(top_srcdir)/debugfs/xattrs.c $(top_builddir)/lib/config.h \
- $(top_builddir)/lib/dirpaths.h $(top_srcdir)/debugfs/debugfs.h \
- $(top_srcdir)/lib/ss/ss.h $(top_builddir)/lib/ss/ss_err.h \
- $(top_srcdir)/lib/et/com_err.h $(srcdir)/ext2_fs.h \
- $(top_builddir)/lib/ext2fs/ext2_types.h $(srcdir)/ext2fs.h \
- $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
+ $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/support/cstring.h \
+ $(top_srcdir)/debugfs/debugfs.h $(top_srcdir)/lib/ss/ss.h \
+ $(top_builddir)/lib/ss/ss_err.h $(top_srcdir)/lib/et/com_err.h \
+ $(srcdir)/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
+ $(srcdir)/ext2fs.h $(srcdir)/ext3_extents.h $(srcdir)/ext2_io.h \
  $(top_builddir)/lib/ext2fs/ext2_err.h $(srcdir)/ext2_ext_attr.h \
  $(srcdir)/bitops.h $(top_srcdir)/debugfs/../misc/create_inode.h \
  $(top_srcdir)/lib/e2p/e2p.h $(top_srcdir)/lib/support/quotaio.h \
diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index b69fa09..b255759 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -429,16 +429,22 @@
 	if (retval)
 		return retval;
 
-	if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+	if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) {
 		retval = io_channel_flush(fs->io);
+		if (retval)
+			goto errout;
+	}
 	retval = write_primary_superblock(fs, super_shadow);
 	if (retval)
 		goto errout;
 
 	fs->flags &= ~EXT2_FLAG_DIRTY;
 
-	if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC))
+	if (!(flags & EXT2_FLAG_FLUSH_NO_SYNC)) {
 		retval = io_channel_flush(fs->io);
+		if (retval)
+			goto errout;
+	}
 errout:
 	fs->super->s_state = fs_state;
 #ifdef WORDS_BIGENDIAN
diff --git a/lib/ext2fs/csum.c b/lib/ext2fs/csum.c
index fcee07c..e67850f 100644
--- a/lib/ext2fs/csum.c
+++ b/lib/ext2fs/csum.c
@@ -1012,6 +1012,7 @@
 		printf("checksums for different data shouldn't match\n");
 		exit(1);
 	}
+	ext2fs_free(fs);
 
 	return 0;
 }
diff --git a/lib/ext2fs/ext2_io.h b/lib/ext2fs/ext2_io.h
index 3a07b5d..6b7e977 100644
--- a/lib/ext2fs/ext2_io.h
+++ b/lib/ext2fs/ext2_io.h
@@ -101,6 +101,7 @@
 #define IO_FLAG_RW		0x0001
 #define IO_FLAG_EXCLUSIVE	0x0002
 #define IO_FLAG_DIRECT_IO	0x0004
+#define IO_FLAG_FORCE_BOUNCE	0x0008
 
 /*
  * Convenience functions....
diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h
index 4cf3c5b..8ff49ca 100644
--- a/lib/ext2fs/ext2fs.h
+++ b/lib/ext2fs/ext2fs.h
@@ -60,6 +60,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
+#include <time.h>
 #include <errno.h>
 
 #if EXT2_FLAT_INCLUDES
@@ -1217,6 +1218,9 @@
 errcode_t ext2fs_xattrs_count(struct ext2_xattr_handle *handle, size_t *count);
 errcode_t ext2fs_xattr_inode_max_size(ext2_filsys fs, ext2_ino_t ino,
 				      size_t *size);
+#define XATTR_HANDLE_FLAG_RAW	0x0001
+errcode_t ext2fs_xattrs_flags(struct ext2_xattr_handle *handle,
+			      unsigned int *new_flags, unsigned int *old_flags);
 
 /* extent.c */
 extern errcode_t ext2fs_extent_header_verify(void *ptr, int size);
diff --git a/lib/ext2fs/ext4_acl.h b/lib/ext2fs/ext4_acl.h
new file mode 100644
index 0000000..69ff79d
--- /dev/null
+++ b/lib/ext2fs/ext4_acl.h
@@ -0,0 +1,55 @@
+/*
+ * Ext4's on-disk acl format.  From linux/fs/ext4/acl.h
+ */
+
+#define EXT4_ACL_VERSION        0x0001
+
+/* 23.2.5 acl_tag_t values */
+
+#define ACL_UNDEFINED_TAG	(0x00)
+#define ACL_USER_OBJ		(0x01)
+#define ACL_USER		(0x02)
+#define ACL_GROUP_OBJ		(0x04)
+#define ACL_GROUP		(0x08)
+#define ACL_MASK		(0x10)
+#define ACL_OTHER		(0x20)
+
+/* 23.3.6 acl_type_t values */
+
+#define ACL_TYPE_ACCESS		(0x8000)
+#define ACL_TYPE_DEFAULT	(0x4000)
+
+/* 23.2.7 ACL qualifier constants */
+
+#define ACL_UNDEFINED_ID	((id_t)-1)
+
+typedef struct {
+        __le16          e_tag;
+        __le16          e_perm;
+        __le32          e_id;
+ } ext4_acl_entry;
+ 
+typedef struct {
+        __le16          e_tag;
+        __le16          e_perm;
+} ext4_acl_entry_short;
+
+typedef struct {
+         __le32          a_version;
+} ext4_acl_header;
+
+
+/* Supported ACL a_version fields */
+ #define POSIX_ACL_XATTR_VERSION 0x0002
+
+typedef struct {
+        __le16                  e_tag;
+        __le16                  e_perm;
+        __le32                  e_id;
+} posix_acl_xattr_entry;
+
+typedef struct {
+        __le32                  a_version;
+        posix_acl_xattr_entry   a_entries[0];
+} posix_acl_xattr_header;
+
diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
index e8fd10c..0314f9f 100644
--- a/lib/ext2fs/ext_attr.c
+++ b/lib/ext2fs/ext_attr.c
@@ -21,6 +21,7 @@
 
 #include "ext2_fs.h"
 #include "ext2_ext_attr.h"
+#include "ext4_acl.h"
 
 #include "ext2fs.h"
 
@@ -215,6 +216,7 @@
 	struct ext2_xattr *attrs;
 	size_t length, count;
 	ext2_ino_t ino;
+	unsigned int flags;
 	int dirty;
 };
 
@@ -308,7 +310,7 @@
 	struct ea_name_index *e;
 
 	for (e = ea_names; e->name; e++) {
-		if (memcmp(fullname, e->name, strlen(e->name)) == 0) {
+		if (strncmp(fullname, e->name, strlen(e->name)) == 0) {
 			*name = (char *)fullname + strlen(e->name);
 			*index = e->index;
 			return 1;
@@ -452,6 +454,136 @@
 }
 
 
+static inline int
+posix_acl_xattr_count(size_t size)
+{
+        if (size < sizeof(posix_acl_xattr_header))
+                return -1;
+        size -= sizeof(posix_acl_xattr_header);
+        if (size % sizeof(posix_acl_xattr_entry))
+                return -1;
+        return size / sizeof(posix_acl_xattr_entry);
+}
+
+/*
+ * The lgetxattr function returns data formatted in the POSIX extended
+ * attribute format.  The on-disk format uses a more compact encoding.
+ * See the ext4_acl_to_disk in fs/ext4/acl.c.
+ */
+static errcode_t convert_posix_acl_to_disk_buffer(const void *value, size_t size,
+						  void *out_buf, size_t *size_out)
+{
+	posix_acl_xattr_header *header = (posix_acl_xattr_header*) value;
+	posix_acl_xattr_entry *entry = (posix_acl_xattr_entry *)(header+1), *end;
+	ext4_acl_header *ext_acl;
+	size_t s;
+	void *e;
+	int err;
+
+	int count;
+
+	if (!value)
+		return EINVAL;
+	if (size < sizeof(posix_acl_xattr_header))
+		return ENOMEM;
+	if (header->a_version != ext2fs_cpu_to_le32(POSIX_ACL_XATTR_VERSION))
+		return EINVAL;
+
+	count = posix_acl_xattr_count(size);
+	ext_acl = out_buf;
+	ext_acl->a_version = ext2fs_cpu_to_le32(EXT4_ACL_VERSION);
+
+	if (count <= 0)
+		return EINVAL;
+
+	e = (char *) out_buf + sizeof(ext4_acl_header);
+	s = sizeof(ext4_acl_header);
+	for (end = entry + count; entry != end;entry++) {
+		ext4_acl_entry *disk_entry = (ext4_acl_entry*) e;
+		disk_entry->e_tag = ext2fs_cpu_to_le16(entry->e_tag);
+		disk_entry->e_perm = ext2fs_cpu_to_le16(entry->e_perm);
+
+		switch(entry->e_tag) {
+			case ACL_USER_OBJ:
+			case ACL_GROUP_OBJ:
+			case ACL_MASK:
+			case ACL_OTHER:
+				e += sizeof(ext4_acl_entry_short);
+				s += sizeof(ext4_acl_entry_short);
+				break;
+			case ACL_USER:
+			case ACL_GROUP:
+				disk_entry->e_id =  ext2fs_cpu_to_le32(entry->e_id);
+				e += sizeof(ext4_acl_entry);
+				s += sizeof(ext4_acl_entry);
+				break;
+		}
+	}
+	*size_out = s;
+	return 0;
+}
+
+static errcode_t convert_disk_buffer_to_posix_acl(const void *value, size_t size,
+						  void **out_buf, size_t *size_out)
+{
+	posix_acl_xattr_header *header;
+	posix_acl_xattr_entry *entry;
+	ext4_acl_header *ext_acl = (ext4_acl_header *) value;
+	errcode_t err;
+	const char *cp;
+	char *out;
+	int count;
+
+	if ((!value) ||
+	    (size < sizeof(ext4_acl_header)) ||
+	    (ext_acl->a_version != ext2fs_cpu_to_le32(EXT4_ACL_VERSION)))
+		return EINVAL;
+
+	err = ext2fs_get_mem(size * 2, &out);
+	if (err)
+		return err;
+
+	header = (posix_acl_xattr_header *) out;
+	header->a_version = ext2fs_cpu_to_le32(POSIX_ACL_XATTR_VERSION);
+	entry = (posix_acl_xattr_entry *) (out + sizeof(posix_acl_xattr_header));
+
+	cp = value + sizeof(ext4_acl_header);
+	size -= sizeof(ext4_acl_header);
+
+	while (size > 0) {
+		const ext4_acl_entry *disk_entry = (const ext4_acl_entry *) cp;
+
+		entry->e_tag = ext2fs_le16_to_cpu(disk_entry->e_tag);
+		entry->e_perm = ext2fs_le16_to_cpu(disk_entry->e_perm);
+
+		switch(entry->e_tag) {
+			case ACL_USER_OBJ:
+			case ACL_GROUP_OBJ:
+			case ACL_MASK:
+			case ACL_OTHER:
+				entry->e_id = 0;
+				cp += sizeof(ext4_acl_entry_short);
+				size -= sizeof(ext4_acl_entry_short);
+				break;
+			case ACL_USER:
+			case ACL_GROUP:
+				entry->e_id = ext2fs_le32_to_cpu(disk_entry->e_id);
+				cp += sizeof(ext4_acl_entry);
+				size -= sizeof(ext4_acl_entry);
+				break;
+		default:
+			ext2fs_free_mem(&out);
+			return EINVAL;
+			break;
+		}
+		entry++;
+	}
+	*out_buf = out;
+	*size_out = ((char *) entry - out);
+	return 0;
+}
+
+
 static errcode_t write_xattrs_to_buffer(struct ext2_xattr_handle *handle,
 					struct ext2_xattr **pos,
 					void *entries_start,
@@ -914,10 +1046,16 @@
 
 	EXT2_CHECK_MAGIC(h, EXT2_ET_MAGIC_EA_HANDLE);
 	for (x = h->attrs; x < h->attrs + h->length; x++) {
-		if (!x->name)
+		if (!x->name || strcmp(x->name, key))
 			continue;
 
-		if (strcmp(x->name, key) == 0) {
+		if (!(h->flags & XATTR_HANDLE_FLAG_RAW) &&
+		    ((strcmp(key, "system.posix_acl_default") == 0) ||
+		     (strcmp(key, "system.posix_acl_access") == 0))) {
+			err = convert_disk_buffer_to_posix_acl(x->value, x->value_len,
+							       value, value_len);
+			return err;
+		} else {
 			err = ext2fs_get_mem(x->value_len, &val);
 			if (err)
 				return err;
@@ -1002,6 +1140,20 @@
 
 	EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
 	last_empty = NULL;
+
+	err = ext2fs_get_mem(value_len, &new_value);
+	if (err)
+		return err;
+	if (!(handle->flags & XATTR_HANDLE_FLAG_RAW) &&
+	    ((strcmp(key, "system.posix_acl_default") == 0) ||
+	     (strcmp(key, "system.posix_acl_access") == 0))) {
+		err = convert_posix_acl_to_disk_buffer(value, value_len,
+						       new_value, &value_len);
+		if (err)
+			goto errout;
+	} else
+		memcpy(new_value, value, value_len);
+
 	for (x = handle->attrs; x < handle->attrs + handle->length; x++) {
 		if (!x->name) {
 			last_empty = x;
@@ -1010,10 +1162,6 @@
 
 		/* Replace xattr */
 		if (strcmp(x->name, key) == 0) {
-			err = ext2fs_get_mem(value_len, &new_value);
-			if (err)
-				return err;
-			memcpy(new_value, value, value_len);
 			ext2fs_free_mem(&x->value);
 			x->value = new_value;
 			x->value_len = value_len;
@@ -1026,13 +1174,9 @@
 	if (last_empty) {
 		err = ext2fs_get_mem(strlen(key) + 1, &last_empty->name);
 		if (err)
-			return err;
+			goto errout;
 		strcpy(last_empty->name, key);
-
-		err = ext2fs_get_mem(value_len, &last_empty->value);
-		if (err)
-			return err;
-		memcpy(last_empty->value, value, value_len);
+		last_empty->value = new_value;
 		last_empty->value_len = value_len;
 		handle->dirty = 1;
 		handle->count++;
@@ -1058,6 +1202,9 @@
 	handle->dirty = 1;
 	handle->count++;
 	return 0;
+errout:
+	ext2fs_free_mem(&new_value);
+	return err;
 }
 
 errcode_t ext2fs_xattr_remove(struct ext2_xattr_handle *handle,
@@ -1137,3 +1284,14 @@
 	*count = handle->count;
 	return 0;
 }
+
+errcode_t ext2fs_xattrs_flags(struct ext2_xattr_handle *handle,
+			      unsigned int *new_flags, unsigned int *old_flags)
+{
+	EXT2_CHECK_MAGIC(handle, EXT2_ET_MAGIC_EA_HANDLE);
+	if (old_flags)
+		*old_flags = handle->flags;
+	if (new_flags)
+		handle->flags = *new_flags;
+	return 0;
+}
diff --git a/lib/ext2fs/getsectsize.c b/lib/ext2fs/getsectsize.c
index b57bf56..d6bc376 100644
--- a/lib/ext2fs/getsectsize.c
+++ b/lib/ext2fs/getsectsize.c
@@ -26,6 +26,9 @@
 #include <errno.h>
 #endif
 #include <fcntl.h>
+#ifdef HAVE_SYS_DISK_H
+#include <sys/disk.h>
+#endif
 #ifdef HAVE_LINUX_FD_H
 #include <sys/ioctl.h>
 #include <linux/fd.h>
@@ -60,6 +63,12 @@
 		return 0;
 	}
 #endif
+#ifdef DIOCGSECTORSIZE
+	if (ioctl(fd, DIOCGSECTORSIZE, sectsize) >= 0) {
+		close(fd);
+		return 0;
+	}
+#endif
 	*sectsize = 0;
 	close(fd);
 	return 0;
@@ -76,6 +85,11 @@
 	if (ioctl(fd, BLKSSZGET, &align) < 0)
 		align = 0;
 #endif
+#ifdef DIOCGSECTORSIZE
+	if (align <= 0 &&
+	    ioctl(fd, DIOCGSECTORSIZE, &align) < 0)
+		align = 0;
+#endif
 
 #ifdef _SC_PAGESIZE
 	if (align <= 0)
@@ -108,6 +122,14 @@
 		return 0;
 	}
 #endif
+#ifdef DIOCGSECTORSIZE
+	/* This isn't really the physical sector size, but FreeBSD
+	 * doesn't seem to have this concept. */
+	if (ioctl(fd, DIOCGSECTORSIZE, sectsize) >= 0) {
+		close(fd);
+		return 0;
+	}
+#endif
 	*sectsize = 0;
 	close(fd);
 	return 0;
diff --git a/lib/ext2fs/inline_data.c b/lib/ext2fs/inline_data.c
index 587b88d..c8613f6 100644
--- a/lib/ext2fs/inline_data.c
+++ b/lib/ext2fs/inline_data.c
@@ -845,6 +845,7 @@
 		return 1;
 	}
 	printf("tst_inline_data(DIR): OK\n");
+	ext2fs_free(fs);
 
 	return 0;
 }
diff --git a/lib/ext2fs/tst_badblocks.c b/lib/ext2fs/tst_badblocks.c
index c685f33..b6e766a 100644
--- a/lib/ext2fs/tst_badblocks.c
+++ b/lib/ext2fs/tst_badblocks.c
@@ -201,6 +201,7 @@
 		printf("Block bitmap NOT matched.\n");
 		test_fail++;
 	}
+	ext2fs_badblocks_list_free(new_bb);
 	return 0;
 }
 
@@ -215,7 +216,7 @@
 	}
 }
 
-int file_test_invalid(badblocks_list bb)
+void file_test_invalid(badblocks_list bb)
 {
 	badblocks_list new_bb = 0;
 	errcode_t	retval;
@@ -234,12 +235,14 @@
 	if (!f) {
 		fprintf(stderr, "Error opening temp file: %s\n",
 			error_message(errno));
-		return 1;
+		test_fail++;
+		goto out;
 	}
 	retval = ext2fs_write_bb_FILE(bb, 0, f);
 	if (retval) {
 		com_err("file_test", retval, "while writing bad blocks");
-		return 1;
+		test_fail++;
+		goto out;
 	}
 	fprintf(f, "34500\n");
 
@@ -248,7 +251,8 @@
 	retval = ext2fs_read_bb_FILE(fs, f, &new_bb, invalid_proc);
 	if (retval) {
 		com_err("file_test", retval, "while reading bad blocks");
-		return 1;
+		test_fail++;
+		goto out;
 	}
 	fclose(f);
 	if (!test_expected_fail) {
@@ -263,7 +267,10 @@
 		printf("Block bitmap NOT matched.\n");
 		test_fail++;
 	}
-	return 0;
+	ext2fs_badblocks_list_free(new_bb);
+out:
+	free(fs->super);
+	free(fs);
 }
 
 int main(int argc, char **argv)
@@ -354,6 +361,8 @@
 		ext2fs_badblocks_list_free(bb3);
 	if (bb4)
 		ext2fs_badblocks_list_free(bb4);
+	if (bb5)
+		ext2fs_badblocks_list_free(bb5);
 
 	return test_fail;
 
diff --git a/lib/ext2fs/tst_bitops.c b/lib/ext2fs/tst_bitops.c
index ed71447..8262d3b 100644
--- a/lib/ext2fs/tst_bitops.c
+++ b/lib/ext2fs/tst_bitops.c
@@ -220,12 +220,6 @@
 	printf("64-bit: ext2fs_clear_bit test succeed.\n");
 
 	/* Do bigarray test */
-	bigarray = malloc(1 << 29);
-	if (!bigarray) {
-		fprintf(stderr, "Failed to allocate scratch memory!\n");
-		exit(1);
-	}
-
         bigarray[BIG_TEST_BIT >> 3] = 0;
 
 	ext2fs_set_bit64(BIG_TEST_BIT, bigarray);
@@ -289,6 +283,6 @@
 		exit(1);
 
 	printf("64-bit: ext2fs_fast_set_bit big_test successful\n");
-
+	free(bigarray);
 	exit(0);
 }
diff --git a/lib/ext2fs/tst_getsectsize.c b/lib/ext2fs/tst_getsectsize.c
index a6b234e..d616965 100644
--- a/lib/ext2fs/tst_getsectsize.c
+++ b/lib/ext2fs/tst_getsectsize.c
@@ -30,6 +30,7 @@
 {
 	int	lsectsize, psectsize;
 	int	retval;
+	int	fd;
 
 	if (argc < 2) {
 		fprintf(stderr, "Usage: %s device\n", argv[0]);
@@ -50,5 +51,13 @@
 	}
 	printf("Device %s has logical/physical sector size of %d/%d.\n",
 	       argv[1], lsectsize, psectsize);
+	fd = open(argv[1], O_RDONLY);
+	if (fd < 0) {
+		perror("open");
+		exit(1);
+	}
+	printf("The device's DIO alignment is %d\n",
+	       ext2fs_get_dio_alignment(fd));
+	close(fd);
 	exit(0);
 }
diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
index 018d2ca..f4e6148 100644
--- a/lib/ext2fs/unix_io.c
+++ b/lib/ext2fs/unix_io.c
@@ -53,6 +53,11 @@
 #ifdef HAVE_SYS_MOUNT_H
 #include <sys/mount.h>
 #endif
+#ifdef HAVE_SYS_PRCTL_H
+#include <sys/prctl.h>
+#else
+#define PR_GET_DUMPABLE 3
+#endif
 #if HAVE_SYS_STAT_H
 #include <sys/stat.h>
 #endif
@@ -122,6 +127,29 @@
 	return retval;
 }
 
+static char *safe_getenv(const char *arg)
+{
+	if ((getuid() != geteuid()) || (getgid() != getegid()))
+		return NULL;
+#ifdef HAVE_PRCTL
+	if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+		return NULL;
+#else
+#if (defined(linux) && defined(SYS_prctl))
+	if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
+		return NULL;
+#endif
+#endif
+
+#if defined(HAVE_SECURE_GETENV)
+	return secure_getenv(arg);
+#elif defined(HAVE___SECURE_GETENV)
+	return __secure_getenv(arg);
+#else
+	return getenv(arg);
+#endif
+}
+
 /*
  * Here are the raw I/O functions
  */
@@ -135,11 +163,20 @@
 	ext2_loff_t	location;
 	int		actual = 0;
 	unsigned char	*buf = bufv;
+	ssize_t		really_read = 0;
 
 	size = (count < 0) ? -count : count * channel->block_size;
 	data->io_stats.bytes_read += size;
 	location = ((ext2_loff_t) block * channel->block_size) + data->offset;
 
+	if (data->flags & IO_FLAG_FORCE_BOUNCE) {
+		if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
+			retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+			goto error_out;
+		}
+		goto bounce_read;
+	}
+
 #ifdef HAVE_PREAD64
 	/* Try an aligned pread */
 	if ((channel->align == 0) ||
@@ -171,9 +208,11 @@
 		actual = read(data->dev, buf, size);
 		if (actual != size) {
 		short_read:
-			if (actual < 0)
+			if (actual < 0) {
+				retval = errno;
 				actual = 0;
-			retval = EXT2_ET_SHORT_READ;
+			} else
+				retval = EXT2_ET_SHORT_READ;
 			goto error_out;
 		}
 		return 0;
@@ -188,14 +227,20 @@
 	 * The buffer or size which we're trying to read isn't aligned
 	 * to the O_DIRECT rules, so we need to do this the hard way...
 	 */
+bounce_read:
 	while (size > 0) {
 		actual = read(data->dev, data->bounce, channel->block_size);
-		if (actual != channel->block_size)
+		if (actual != channel->block_size) {
+			actual = really_read;
+			buf -= really_read;
+			size += really_read;
 			goto short_read;
+		}
 		actual = size;
 		if (size > channel->block_size)
 			actual = channel->block_size;
 		memcpy(buf, data->bounce, actual);
+		really_read += actual;
 		size -= actual;
 		buf += actual;
 	}
@@ -232,6 +277,14 @@
 
 	location = ((ext2_loff_t) block * channel->block_size) + data->offset;
 
+	if (data->flags & IO_FLAG_FORCE_BOUNCE) {
+		if (ext2fs_llseek(data->dev, location, SEEK_SET) != location) {
+			retval = errno ? errno : EXT2_ET_LLSEEK_FAILED;
+			goto error_out;
+		}
+		goto bounce_write;
+	}
+
 #ifdef HAVE_PWRITE64
 	/* Try an aligned pwrite */
 	if ((channel->align == 0) ||
@@ -262,6 +315,10 @@
 	    (IS_ALIGNED(buf, channel->align) &&
 	     IS_ALIGNED(size, channel->align))) {
 		actual = write(data->dev, buf, size);
+		if (actual < 0) {
+			retval = errno;
+			goto error_out;
+		}
 		if (actual != size) {
 		short_write:
 			retval = EXT2_ET_SHORT_WRITE;
@@ -278,13 +335,18 @@
 	 * The buffer or size which we're trying to write isn't aligned
 	 * to the O_DIRECT rules, so we need to do this the hard way...
 	 */
+bounce_write:
 	while (size > 0) {
 		if (size < channel->block_size) {
 			actual = read(data->dev, data->bounce,
 				      channel->block_size);
 			if (actual != channel->block_size) {
-				retval = EXT2_ET_SHORT_READ;
-				goto error_out;
+				if (actual < 0) {
+					retval = errno;
+					goto error_out;
+				}
+				memset(data->bounce + actual, 0,
+				       channel->block_size - actual);
 			}
 		}
 		actual = size;
@@ -296,10 +358,15 @@
 			goto error_out;
 		}
 		actual = write(data->dev, data->bounce, channel->block_size);
+		if (actual < 0) {
+			retval = errno;
+			goto error_out;
+		}
 		if (actual != channel->block_size)
 			goto short_write;
 		size -= actual;
 		buf += actual;
+		location += actual;
 	}
 	return 0;
 
@@ -335,7 +402,7 @@
 		if (retval)
 			return retval;
 	}
-	if (channel->align) {
+	if (channel->align || data->flags & IO_FLAG_FORCE_BOUNCE) {
 		if (data->bounce)
 			ext2fs_free_mem(&data->bounce);
 		retval = io_channel_alloc_buf(channel, 0, &data->bounce);
@@ -495,6 +562,9 @@
 	struct		utsname ut;
 #endif
 
+	if (safe_getenv("UNIX_IO_FORCE_BOUNCE"))
+		flags |= IO_FLAG_FORCE_BOUNCE;
+
 	retval = ext2fs_get_mem(sizeof(struct struct_io_channel), &io);
 	if (retval)
 		goto cleanup;
@@ -553,7 +623,7 @@
 	}
 #endif
 
-#if defined(__CYGWIN__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+#if defined(__CYGWIN__)
 	/*
 	 * Some operating systems require that the buffers be aligned,
 	 * regardless of O_DIRECT
@@ -562,6 +632,14 @@
 		io->align = 512;
 #endif
 
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+	if (io->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
+		int dio_align = ext2fs_get_dio_alignment(fd);
+
+		if (io->align < dio_align)
+			io->align = dio_align;
+	}
+#endif
 
 	if ((retval = alloc_cache(io, data)))
 		goto cleanup;
@@ -929,6 +1007,8 @@
 		return errno;
 
 	actual = write(data->dev, buf, size);
+	if (actual < 0)
+		return errno;
 	if (actual != size)
 		return EXT2_ET_SHORT_WRITE;
 
@@ -950,7 +1030,8 @@
 #ifndef NO_IO_CACHE
 	retval = flush_cached_blocks(channel, data, 0);
 #endif
-	fsync(data->dev);
+	if (!retval && fsync(data->dev) != 0)
+		return errno;
 	return retval;
 }
 
@@ -1042,7 +1123,7 @@
 	data = (struct unix_private_data *) channel->private_data;
 	EXT2_CHECK_MAGIC(data, EXT2_ET_MAGIC_UNIX_IO_CHANNEL);
 
-	if (getenv("UNIX_IO_NOZEROOUT"))
+	if (safe_getenv("UNIX_IO_NOZEROOUT"))
 		goto unimplemented;
 
 	if (channel->flags & CHANNEL_FLAGS_BLOCK_DEVICE) {
diff --git a/lib/support/Android.mk b/lib/support/Android.mk
index 3d2056d..fefd058 100644
--- a/lib/support/Android.mk
+++ b/lib/support/Android.mk
@@ -55,3 +55,41 @@
 LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2_quota_shared_libraries))
 
 include $(BUILD_HOST_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+libext2_profile_src_files :=  \
+       prof_err.c \
+       profile.c
+
+libext2_profile_shared_libraries := \
+       libext2_com_err
+
+libext2_profile_system_shared_libraries := libc
+
+libext2_profile_c_includes := external/e2fsprogs/lib
+
+libext2_profile_cflags := -O2 -g -W -Wall
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_profile_src_files)
+LOCAL_SYSTEM_SHARED_LIBRARIES := $(libext2_profile_system_shared_libraries)
+LOCAL_SHARED_LIBRARIES := $(libext2_profile_shared_libraries)
+LOCAL_C_INCLUDES := $(libext2_profile_c_includes)
+LOCAL_CFLAGS := $(libext2_profile_cflags)
+LOCAL_MODULE := libext2_profile
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := $(libext2_profile_src_files)
+LOCAL_SHARED_LIBRARIES := $(addsuffix -host, $(libext2_profile_shared_libraries))
+LOCAL_C_INCLUDES := $(libext2_profile_c_includes)
+LOCAL_CFLAGS := $(libext2_profile_cflags)
+LOCAL_MODULE := libext2_profile-host
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_HOST_SHARED_LIBRARY)
diff --git a/lib/support/Makefile.in b/lib/support/Makefile.in
index 112ba24..d5a6f26 100644
--- a/lib/support/Makefile.in
+++ b/lib/support/Makefile.in
@@ -12,7 +12,8 @@
 
 all::
 
-OBJS=		mkquota.o \
+OBJS=		cstring.o \
+		mkquota.o \
 		plausible.o \
 		profile.o \
 		parse_qtype.o \
@@ -24,6 +25,7 @@
 		dict.o
 
 SRCS=		$(srcdir)/argv_parse.c \
+		$(srcdir)/cstring.c \
 		$(srcdir)/mkquota.c \
 		$(srcdir)/parse_qtype.c \
 		$(srcdir)/plausible.c \
@@ -67,10 +69,15 @@
 		profile_helpers.o argv_parse.o $(STATIC_LIBCOM_ERR) \
 		$(ALL_CFLAGS)
 
+test_cstring: $(srcdir)/cstring.c
+	$(E) " CC $@"
+	$(Q) $(CC) -o test_cstring -DDEBUG_PROGRAM $(srcdir)/cstring.c \
+		$(ALL_CFLAGS)
+
 clean::
 	$(RM) -f \#* *.s *.o *.a *~ *.bak core profiled/* \
 		../libsupport.a ../libsupport_p.a $(SMANPAGES) \
-		prof_err.c prof_err.h test_profile
+		prof_err.c prof_err.h test_profile test_cstring
 
 #check:: tst_uuid
 #	LD_LIBRARY_PATH=$(LIB) DYLD_LIBRARY_PATH=$(LIB) ./tst_uuid
@@ -96,6 +103,8 @@
 #
 argv_parse.o: $(srcdir)/argv_parse.c $(top_builddir)/lib/config.h \
  $(top_builddir)/lib/dirpaths.h $(srcdir)/argv_parse.h
+cstring.o: $(srcdir)/cstring.c $(top_builddir)/lib/config.h \
+ $(top_builddir)/lib/dirpaths.h $(srcdir)/cstring.h
 mkquota.o: $(srcdir)/mkquota.c $(top_builddir)/lib/config.h \
  $(top_builddir)/lib/dirpaths.h $(top_srcdir)/lib/ext2fs/ext2_fs.h \
  $(top_builddir)/lib/ext2fs/ext2_types.h $(top_srcdir)/lib/ext2fs/ext2fs.h \
diff --git a/lib/support/cstring.c b/lib/support/cstring.c
new file mode 100644
index 0000000..3250477
--- /dev/null
+++ b/lib/support/cstring.c
@@ -0,0 +1,161 @@
+/*
+ * cstring.c -- parse and print strings using the C escape sequences
+ */
+
+#include "config.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <ctype.h>
+#ifdef HAVE_GETOPT_H
+#include <getopt.h>
+#endif
+#include <string.h>
+
+#include "cstring.h"
+
+int parse_c_string(char *str)
+{
+	unsigned char *to, *from, ch;
+	int v;
+
+	to = from = str;
+
+	for (to = from = (unsigned char *) str;
+	     *from && *from != '"'; to++, from++) {
+		if (*from == '\\') {
+			ch = *(++from);
+			switch (ch) {
+			case 'a':
+				*to = '\a';
+				break;
+			case 'b':
+				*to = '\b';
+				break;
+			case 'f':
+				*to = '\f';
+				break;
+			case 'n':
+				*to = '\n';
+				break;
+			case 't':
+				*to = '\t';
+				break;
+			case 'v':
+				*to = '\v';
+				break;
+			case 'x':
+				ch = *(from + 1);
+				if (ch >= 'a' && ch <= 'f')
+					ch = ch - 'a' + 'A';
+				if (ch >= '0' && ch <= '9')
+					v = ch - '0';
+				else if (ch >= 'A' && ch <= 'F')
+					v = ch + 10 - 'A';
+				else {
+					ch = *from;
+					break;
+				}
+				from++;
+				ch = *(from + 1);
+				if (ch >= 'a' && ch <= 'f')
+					ch = ch - 'a' + 'A';
+				if (ch >= '0' && ch <= '9')
+					v = (v * 16) + (ch - '0');
+				else if (ch >= 'A' && ch <= 'F')
+					v = (v * 16) + (ch + 10 - 'A');
+				else {
+					ch = *from;
+					break;
+				}
+				from++;
+				*to = v;
+				break;
+			default:
+				if (ch >= '0' && ch <= '9') {
+					v = ch - '0';
+					ch = *(from + 1);
+					if (ch >= '0' && ch <= '9') {
+						from++;
+						v = (8 * v) + (ch - '0');
+						ch = *(from + 1);
+						if (ch >= '0' && ch <= '9') {
+							from++;
+							v = (8 * v) + (ch - '0');
+						}
+					}
+					ch = v;
+				}
+				*to = ch;
+			}
+			continue;
+		}
+		*to = *from;
+	}
+	*to = '\0';
+	return to - (unsigned char *) str;
+}
+
+void print_c_string(FILE *f, const char *cp, int len)
+{
+	unsigned char	ch;
+
+	if (len < 0)
+		len = strlen(cp);
+
+	while (len--) {
+		ch = *cp++;
+		if (ch == '\a')
+			fputs("\\a", f);
+		else if (ch == '\b')
+			fputs("\\b", f);
+		else if (ch == '\f')
+			fputs("\\f", f);
+		else if (ch == '\n')
+			fputs("\\n", f);
+		else if (ch == '\t')
+			fputs("\\t", f);
+		else if (ch == '\v')
+			fputs("\\v", f);
+		else if (ch == '\\')
+			fputs("\\\\", f);
+		else if (ch == '\'')
+			fputs("\\\'", f);
+		else if (ch == '\"')
+			fputs("\\\"", f);
+		else if ((ch < 32) || (ch > 126))
+			fprintf(f, "\\%03o", ch);
+		else
+			fputc(ch, f);
+	}
+}
+
+#ifdef DEBUG_PROGRAM
+int main(int argc, char **argv)
+{
+	char buf[4096];
+	int c, raw = 0;
+
+	while ((c = getopt(argc, argv, "r")) != EOF) {
+		switch (c) {
+		case 'r':
+			raw++;
+			break;
+		default:
+			fprintf(stderr, "Usage: %s [-r]\n", argv[0]);
+			exit(1);
+		}
+	}
+
+	while (!feof(stdin)) {
+		if (fgets(buf, sizeof(buf), stdin) == NULL)
+			break;
+		c = parse_c_string(buf);
+		if (raw)
+			fputs(buf, stdout);
+		else {
+			print_c_string(stdout, buf, c);
+			printf(" <%d>\n", c);
+		}
+	}
+}	
+#endif
diff --git a/lib/support/cstring.h b/lib/support/cstring.h
new file mode 100644
index 0000000..7f80f41
--- /dev/null
+++ b/lib/support/cstring.h
@@ -0,0 +1,6 @@
+/*
+ * cstring.h -- header file for C string parse/print utilities
+ */
+
+extern int parse_c_string(char *str);
+extern void print_c_string(FILE *f, const char *cp, int len);
diff --git a/lib/support/mkquota.c b/lib/support/mkquota.c
index 8407c76..8629266 100644
--- a/lib/support/mkquota.c
+++ b/lib/support/mkquota.c
@@ -296,8 +296,13 @@
 	memset(ctx, 0, sizeof(struct quota_ctx));
 	for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
 		ctx->quota_file[qtype] = NULL;
-		if (((1 << qtype) & qtype_bits) == 0)
-			continue;
+		if (qtype_bits) {
+			if (((1 << qtype) & qtype_bits) == 0)
+				continue;
+		} else {
+			if (*quota_sb_inump(fs->super, qtype) == 0)
+				continue;
+		}
 		err = ext2fs_get_mem(sizeof(dict_t), &dict);
 		if (err) {
 			log_debug("Failed to allocate dictionary");
diff --git a/lib/support/plausible.c b/lib/support/plausible.c
index 6f0c4bc..0636061 100644
--- a/lib/support/plausible.c
+++ b/lib/support/plausible.c
@@ -43,6 +43,17 @@
 static int (*dl_magic_load)(magic_t, const char *);
 static void (*dl_magic_close)(magic_t);
 
+/*
+ * NO_CHECK functionality was only added in file 4.20.
+ * Older systems like RHEL 5.x still have file 4.17
+ */
+#ifndef MAGIC_NO_CHECK_COMPRESS
+#define MAGIC_NO_CHECK_COMPRESS 0x0001000
+#endif
+#ifndef MAGIC_NO_CHECK_ELF
+#define MAGIC_NO_CHECK_ELF 0x0010000
+#endif
+
 #ifdef HAVE_DLOPEN
 #include <dlfcn.h>
 
diff --git a/lib/support/quotaio.c b/lib/support/quotaio.c
index c250e31..befa832 100644
--- a/lib/support/quotaio.c
+++ b/lib/support/quotaio.c
@@ -243,13 +243,16 @@
 		if (qctx->quota_file[qtype]) {
 			h = qctx->quota_file[qtype];
 			if (((flags & EXT2_FILE_WRITE) == 0) ||
-			    (h->qh_file_flags & EXT2_FILE_WRITE))
+			    (h->qh_file_flags & EXT2_FILE_WRITE)) {
+				ext2fs_file_close(e2_file);
 				return 0;
+			}
 			(void) quota_file_close(qctx, h);
 		}
 		err = ext2fs_get_mem(sizeof(struct quota_handle), &h);
 		if (err) {
 			log_err("Unable to allocate quota handle");
+			ext2fs_file_close(e2_file);
 			return err;
 		}
 		allocated_handle = 1;
diff --git a/misc/Android.mk b/misc/Android.mk
index 55f2767..d960737 100644
--- a/misc/Android.mk
+++ b/misc/Android.mk
@@ -341,6 +341,7 @@
 LOCAL_MODULE := e4crypt_host
 LOCAL_MODULE_STEM := e4crypt
 LOCAL_MODULE_TAGS := optional
+LOCAL_MODULE_HOST_OS := linux
 
 include $(BUILD_HOST_EXECUTABLE)
 
diff --git a/misc/Makefile.in b/misc/Makefile.in
index d6436c2..370fdac 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -157,9 +157,9 @@
 	$(E) "	LD $@"
 	$(Q) $(CC) $(ALL_LDFLAGS) -o findsuper findsuper.o $(LIBS) $(SYSLIBS)
 
-partinfo: partinfo.o
+partinfo: partinfo.o $(DEPLIBCOM_ERR)
 	$(E) "	LD $@"
-	$(Q) $(CC) $(ALL_LDFLAGS) -o partinfo partinfo.o
+	$(Q) $(CC) $(ALL_LDFLAGS) -o partinfo partinfo.o $(LIBCOM_ERR)
 
 e2initrd_helper: e2initrd_helper.o $(DEPLIBS) $(DEPLIBBLKID) $(LIBEXT2FS)
 	$(E) "	LD $@"
diff --git a/misc/base_device.c b/misc/base_device.c
index b2ce138..d1c1cd9 100644
--- a/misc/base_device.c
+++ b/misc/base_device.c
@@ -150,7 +150,7 @@
 #ifdef DEBUG
 int main(int argc, char** argv)
 {
-	const char *base;
+	char *base;
 	char  buf[256], *cp;
 
 	while (1) {
@@ -164,6 +164,7 @@
 			*cp = 0;
 		base = base_device(buf);
 		printf("%s\t%s\n", buf, base ? base : "NONE");
+		free(base);
 	}
 	exit(0);
 }
diff --git a/misc/create_inode.c b/misc/create_inode.c
index 5122e56..ae22ff6 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -510,10 +510,11 @@
 		if (err < 0 && (errno == EOPNOTSUPP || errno == ENOTTY)) {
 			err = EXT2_ET_UNIMPLEMENTED;
 			goto out;
-		} else if (err < 0 || fiemap_buf->fm_mapped_extents == 0) {
+		} else if (err < 0) {
 			err = errno;
 			goto out;
-		}
+		} else if (fiemap_buf->fm_mapped_extents == 0)
+			goto out;
 		for (i = 0, ext = ext_buf; i < fiemap_buf->fm_mapped_extents;
 		     i++, ext++) {
 			err = copy_file_range(fs, fd, e2_file, ext->fe_logical,
diff --git a/misc/mke2fs.c b/misc/mke2fs.c
index d98e71e..49c6e94 100644
--- a/misc/mke2fs.c
+++ b/misc/mke2fs.c
@@ -632,6 +632,7 @@
 	retval = io_channel_write_blk64(fs->io,
 					fs->super->s_first_data_block+1,
 					1, buf);
+	(void) ext2fs_free_mem(&buf);
 	if (retval) {
 		com_err("create_journal_dev", retval, "%s",
 			_("while writing journal superblock"));
@@ -1138,7 +1139,7 @@
 static errcode_t init_list(struct str_list *sl)
 {
 	sl->num = 0;
-	sl->max = 0;
+	sl->max = 1;
 	sl->list = malloc((sl->max+1) * sizeof(char *));
 	if (!sl->list)
 		return ENOMEM;
@@ -2089,10 +2090,28 @@
 			EXT2_BLOCK_SIZE(&fs_param));
 		exit(1);
 	}
+	/*
+	 * Guard against group descriptor count overflowing... Mostly to avoid
+	 * strange results for absurdly large devices.
+	 */
+	if (fs_blocks_count > ((1ULL << (fs_param.s_log_block_size + 3 + 32)) - 1)) {
+		fprintf(stderr, _("%s: Size of device (0x%llx blocks) %s "
+				  "too big to create\n\t"
+				  "a filesystem using a blocksize of %d.\n"),
+			program_name, fs_blocks_count, device_name,
+			EXT2_BLOCK_SIZE(&fs_param));
+		exit(1);
+	}
 
 	ext2fs_blocks_count_set(&fs_param, fs_blocks_count);
 
 	if (ext2fs_has_feature_journal_dev(&fs_param)) {
+		int i;
+
+		for (i=0; fs_types[i]; i++) {
+			free(fs_types[i]);
+			fs_types[i] = 0;
+		}
 		fs_types[0] = strdup("journal");
 		fs_types[1] = 0;
 	}
@@ -2702,7 +2721,7 @@
 	quota_ctx_t qctx;
 	errcode_t retval;
 
-	retval = quota_init_context(&qctx, fs, QUOTA_ALL_BIT);
+	retval = quota_init_context(&qctx, fs, quotatype_bits);
 	if (retval) {
 		com_err(program_name, retval,
 			_("while initializing quota context"));
@@ -3208,7 +3227,7 @@
 	retval = ext2fs_close_free(&fs);
 	if (retval) {
 		fprintf(stderr, "%s",
-			_("\nWarning, had trouble writing out superblocks."));
+			_("\nWarning, had trouble writing out superblocks.\n"));
 	} else if (!quiet) {
 		printf("%s", _("done\n\n"));
 		if (!getenv("MKE2FS_SKIP_CHECK_MSG"))
diff --git a/misc/partinfo.c b/misc/partinfo.c
index 2b69c89..b79d183 100644
--- a/misc/partinfo.c
+++ b/misc/partinfo.c
@@ -18,7 +18,9 @@
 #include <unistd.h>
 #include <stdlib.h>
 #include <errno.h>
+#include <string.h>
 #include "support/nls-enable.h"
+#include "et/com_err.h"
 
 #if defined(__linux__) && defined(_IO) && !defined(BLKGETSIZE)
 #define BLKGETSIZE _IO(0x12,96)	/* return device size */
diff --git a/misc/tune2fs.c b/misc/tune2fs.c
index 09e65ba..6239577 100644
--- a/misc/tune2fs.c
+++ b/misc/tune2fs.c
@@ -1492,7 +1492,7 @@
 		/* Nothing to do. */
 		return;
 
-	retval = quota_init_context(&qctx, fs, QUOTA_ALL_BIT);
+	retval = quota_init_context(&qctx, fs, 0);
 	if (retval) {
 		com_err(program_name, retval,
 			_("while initializing quota context in support library"));
diff --git a/po/e2fsprogs.pot b/po/e2fsprogs.pot
index c7123fd..aa73457 100644
--- a/po/e2fsprogs.pot
+++ b/po/e2fsprogs.pot
@@ -69,9 +69,9 @@
 #, fuzzy
 msgid ""
 msgstr ""
-"Project-Id-Version: e2fsprogs 1.43.3\n"
+"Project-Id-Version: e2fsprogs 1.43.4-WIP\n"
 "Report-Msgid-Bugs-To: tytso@alum.mit.edu\n"
-"POT-Creation-Date: 2016-09-04 21:27-0400\n"
+"POT-Creation-Date: 2017-01-31 00:56-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -94,8 +94,8 @@
 msgid "while reading the bad blocks inode"
 msgstr ""
 
-#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1508
-#: e2fsck/unix.c:1601 misc/badblocks.c:1242 misc/badblocks.c:1250
+#: e2fsck/badblocks.c:72 e2fsck/scantest.c:107 e2fsck/unix.c:1507
+#: e2fsck/unix.c:1600 misc/badblocks.c:1242 misc/badblocks.c:1250
 #: misc/badblocks.c:1264 misc/badblocks.c:1276 misc/dumpe2fs.c:689
 #: misc/e2image.c:1400 misc/e2image.c:1584 misc/e2image.c:1605
 #: misc/mke2fs.c:230 misc/tune2fs.c:2693 misc/tune2fs.c:2787 resize/main.c:413
@@ -493,81 +493,81 @@
 msgid "internal error: couldn't lookup EA inode record for %u"
 msgstr ""
 
-#: e2fsck/pass1.c:666 e2fsck/pass2.c:970
+#: e2fsck/pass1.c:666 e2fsck/pass2.c:972
 msgid "reading directory block"
 msgstr ""
 
-#: e2fsck/pass1.c:1111
+#: e2fsck/pass1.c:1112
 msgid "in-use inode map"
 msgstr ""
 
-#: e2fsck/pass1.c:1122
+#: e2fsck/pass1.c:1123
 msgid "directory inode map"
 msgstr ""
 
-#: e2fsck/pass1.c:1132
+#: e2fsck/pass1.c:1133
 msgid "regular file inode map"
 msgstr ""
 
-#: e2fsck/pass1.c:1141 misc/e2image.c:1268
+#: e2fsck/pass1.c:1142 misc/e2image.c:1268
 msgid "in-use block map"
 msgstr ""
 
-#: e2fsck/pass1.c:1150
+#: e2fsck/pass1.c:1151
 msgid "metadata block map"
 msgstr ""
 
-#: e2fsck/pass1.c:1209
+#: e2fsck/pass1.c:1213
 msgid "opening inode scan"
 msgstr ""
 
-#: e2fsck/pass1.c:1247
+#: e2fsck/pass1.c:1251
 msgid "getting next inode from scan"
 msgstr ""
 
-#: e2fsck/pass1.c:1933
+#: e2fsck/pass1.c:1937
 msgid "Pass 1"
 msgstr ""
 
-#: e2fsck/pass1.c:1994
+#: e2fsck/pass1.c:1998
 #, c-format
 msgid "reading indirect blocks of inode %u"
 msgstr ""
 
-#: e2fsck/pass1.c:2044
+#: e2fsck/pass1.c:2048
 msgid "bad inode map"
 msgstr ""
 
-#: e2fsck/pass1.c:2084
+#: e2fsck/pass1.c:2088
 msgid "inode in bad block map"
 msgstr ""
 
-#: e2fsck/pass1.c:2104
+#: e2fsck/pass1.c:2108
 msgid "imagic inode map"
 msgstr ""
 
-#: e2fsck/pass1.c:2131
+#: e2fsck/pass1.c:2135
 msgid "multiply claimed block map"
 msgstr ""
 
-#: e2fsck/pass1.c:2245
+#: e2fsck/pass1.c:2249
 msgid "ext attr block map"
 msgstr ""
 
-#: e2fsck/pass1.c:3412
+#: e2fsck/pass1.c:3416
 #, c-format
 msgid "%6lu(%c): expecting %6lu got phys %6lu (blkcnt %lld)\n"
 msgstr ""
 
-#: e2fsck/pass1.c:3827
+#: e2fsck/pass1.c:3831
 msgid "block bitmap"
 msgstr ""
 
-#: e2fsck/pass1.c:3833
+#: e2fsck/pass1.c:3837
 msgid "inode bitmap"
 msgstr ""
 
-#: e2fsck/pass1.c:3839
+#: e2fsck/pass1.c:3843
 msgid "inode table"
 msgstr ""
 
@@ -575,7 +575,7 @@
 msgid "Pass 2"
 msgstr ""
 
-#: e2fsck/pass2.c:1042 e2fsck/pass2.c:1207
+#: e2fsck/pass2.c:1044 e2fsck/pass2.c:1209
 msgid "Can not continue."
 msgstr ""
 
@@ -3194,7 +3194,7 @@
 msgstr ""
 
 #: e2fsck/unix.c:1252 e2fsck/unix.c:1304 misc/e2undo.c:230 misc/e2undo.c:275
-#: misc/mke2fs.c:2541 misc/mke2fs.c:2592 misc/tune2fs.c:2610
+#: misc/mke2fs.c:2560 misc/mke2fs.c:2611 misc/tune2fs.c:2610
 #: misc/tune2fs.c:2655 resize/main.c:187 resize/main.c:232
 #, c-format
 msgid ""
@@ -3203,188 +3203,188 @@
 "\n"
 msgstr ""
 
-#: e2fsck/unix.c:1293 misc/e2undo.c:264 misc/mke2fs.c:2581 misc/tune2fs.c:2644
+#: e2fsck/unix.c:1293 misc/e2undo.c:264 misc/mke2fs.c:2600 misc/tune2fs.c:2644
 #: resize/main.c:221
 #, c-format
 msgid "while trying to delete %s"
 msgstr ""
 
-#: e2fsck/unix.c:1319 misc/mke2fs.c:2607 resize/main.c:242
+#: e2fsck/unix.c:1319 misc/mke2fs.c:2626 resize/main.c:242
 msgid "while trying to setup undo file\n"
 msgstr ""
 
-#: e2fsck/unix.c:1363
+#: e2fsck/unix.c:1362
 msgid "Error: ext2fs library version out of date!\n"
 msgstr ""
 
-#: e2fsck/unix.c:1370
+#: e2fsck/unix.c:1369
 msgid "while trying to initialize program"
 msgstr ""
 
-#: e2fsck/unix.c:1393
+#: e2fsck/unix.c:1392
 #, c-format
 msgid "\tUsing %s, %s\n"
 msgstr ""
 
-#: e2fsck/unix.c:1405
+#: e2fsck/unix.c:1404
 msgid "need terminal for interactive repairs"
 msgstr ""
 
-#: e2fsck/unix.c:1466
+#: e2fsck/unix.c:1465
 #, c-format
 msgid "%s: %s trying backup blocks...\n"
 msgstr ""
 
-#: e2fsck/unix.c:1468
+#: e2fsck/unix.c:1467
 msgid "Superblock invalid,"
 msgstr ""
 
-#: e2fsck/unix.c:1469
+#: e2fsck/unix.c:1468
 msgid "Group descriptors look bad..."
 msgstr ""
 
-#: e2fsck/unix.c:1479
+#: e2fsck/unix.c:1478
 #, c-format
 msgid "%s: %s while using the backup blocks"
 msgstr ""
 
-#: e2fsck/unix.c:1483
+#: e2fsck/unix.c:1482
 #, c-format
 msgid "%s: going back to original superblock\n"
 msgstr ""
 
-#: e2fsck/unix.c:1512
+#: e2fsck/unix.c:1511
 msgid ""
 "The filesystem revision is apparently too high for this version of e2fsck.\n"
 "(Or the filesystem superblock is corrupt)\n"
 "\n"
 msgstr ""
 
-#: e2fsck/unix.c:1519
+#: e2fsck/unix.c:1518
 msgid "Could this be a zero-length partition?\n"
 msgstr ""
 
-#: e2fsck/unix.c:1521
+#: e2fsck/unix.c:1520
 #, c-format
 msgid "You must have %s access to the filesystem or be root\n"
 msgstr ""
 
-#: e2fsck/unix.c:1527
+#: e2fsck/unix.c:1526
 msgid "Possibly non-existent or swap device?\n"
 msgstr ""
 
-#: e2fsck/unix.c:1529
+#: e2fsck/unix.c:1528
 msgid "Filesystem mounted or opened exclusively by another program?\n"
 msgstr ""
 
-#: e2fsck/unix.c:1533
+#: e2fsck/unix.c:1532
 msgid "Possibly non-existent device?\n"
 msgstr ""
 
-#: e2fsck/unix.c:1536
+#: e2fsck/unix.c:1535
 msgid ""
 "Disk write-protected; use the -n option to do a read-only\n"
 "check of the device.\n"
 msgstr ""
 
-#: e2fsck/unix.c:1604
+#: e2fsck/unix.c:1603
 msgid "Get a newer version of e2fsck!"
 msgstr ""
 
-#: e2fsck/unix.c:1648
+#: e2fsck/unix.c:1647
 #, c-format
 msgid "while checking journal for %s"
 msgstr ""
 
-#: e2fsck/unix.c:1651
+#: e2fsck/unix.c:1650
 msgid "Cannot proceed with file system check"
 msgstr ""
 
-#: e2fsck/unix.c:1662
+#: e2fsck/unix.c:1661
 msgid ""
 "Warning: skipping journal recovery because doing a read-only filesystem "
 "check.\n"
 msgstr ""
 
-#: e2fsck/unix.c:1674
+#: e2fsck/unix.c:1673
 #, c-format
 msgid "unable to set superblock flags on %s\n"
 msgstr ""
 
-#: e2fsck/unix.c:1680
+#: e2fsck/unix.c:1679
 #, c-format
 msgid "Journal checksum error found in %s\n"
 msgstr ""
 
-#: e2fsck/unix.c:1684
+#: e2fsck/unix.c:1683
 #, c-format
 msgid "Journal corrupted in %s\n"
 msgstr ""
 
-#: e2fsck/unix.c:1688
+#: e2fsck/unix.c:1687
 #, c-format
 msgid "while recovering journal of %s"
 msgstr ""
 
-#: e2fsck/unix.c:1710
+#: e2fsck/unix.c:1709
 #, c-format
 msgid "%s has unsupported feature(s):"
 msgstr ""
 
-#: e2fsck/unix.c:1769
+#: e2fsck/unix.c:1768
 #, c-format
 msgid "%s: %s while reading bad blocks inode\n"
 msgstr ""
 
-#: e2fsck/unix.c:1772
+#: e2fsck/unix.c:1771
 msgid "This doesn't bode well, but we'll try to go on...\n"
 msgstr ""
 
-#: e2fsck/unix.c:1818
+#: e2fsck/unix.c:1811
 #, c-format
 msgid "Creating journal (%d blocks): "
 msgstr ""
 
-#: e2fsck/unix.c:1828
+#: e2fsck/unix.c:1821
 msgid " Done.\n"
 msgstr ""
 
-#: e2fsck/unix.c:1830
+#: e2fsck/unix.c:1823
 msgid ""
 "\n"
 "*** journal has been regenerated ***\n"
 msgstr ""
 
-#: e2fsck/unix.c:1836
+#: e2fsck/unix.c:1829
 msgid "aborted"
 msgstr ""
 
-#: e2fsck/unix.c:1838
+#: e2fsck/unix.c:1831
 #, c-format
 msgid "%s: e2fsck canceled.\n"
 msgstr ""
 
-#: e2fsck/unix.c:1865
+#: e2fsck/unix.c:1858
 msgid "Restarting e2fsck from the beginning...\n"
 msgstr ""
 
-#: e2fsck/unix.c:1869
+#: e2fsck/unix.c:1862
 msgid "while resetting context"
 msgstr ""
 
-#: e2fsck/unix.c:1913 e2fsck/util.c:71
+#: e2fsck/unix.c:1906 e2fsck/util.c:71
 #, c-format
 msgid ""
 "\n"
 "%s: ***** FILE SYSTEM WAS MODIFIED *****\n"
 msgstr ""
 
-#: e2fsck/unix.c:1917
+#: e2fsck/unix.c:1910
 #, c-format
 msgid "%s: ***** REBOOT SYSTEM *****\n"
 msgstr ""
 
-#: e2fsck/unix.c:1925 e2fsck/util.c:77
+#: e2fsck/unix.c:1918 e2fsck/util.c:77
 #, c-format
 msgid ""
 "\n"
@@ -3818,7 +3818,7 @@
 msgid "while opening inode %u"
 msgstr ""
 
-#: misc/create_inode.c:156 misc/create_inode.c:183 misc/create_inode.c:904
+#: misc/create_inode.c:156 misc/create_inode.c:183 misc/create_inode.c:905
 #: misc/e2undo.c:176 misc/e2undo.c:473 misc/e2undo.c:479 misc/e2undo.c:485
 #: misc/mke2fs.c:353
 msgid "while allocating memory"
@@ -3854,7 +3854,7 @@
 msgid "while creating symlink \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:361 misc/create_inode.c:837
+#: misc/create_inode.c:361 misc/create_inode.c:838
 #, c-format
 msgid "while looking up \"%s\""
 msgstr ""
@@ -3864,79 +3864,79 @@
 msgid "while creating directory \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:608
+#: misc/create_inode.c:609
 #, c-format
 msgid "while opening \"%s\" to copy"
 msgstr ""
 
-#: misc/create_inode.c:700
+#: misc/create_inode.c:701
 #, c-format
 msgid "while changing working directory to \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:708
+#: misc/create_inode.c:709
 #, c-format
 msgid "while opening directory \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:718
+#: misc/create_inode.c:719
 #, c-format
 msgid "while lstat \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:751
+#: misc/create_inode.c:752
 #, c-format
 msgid "while creating special file \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:760
+#: misc/create_inode.c:761
 msgid "malloc failed"
 msgstr ""
 
-#: misc/create_inode.c:768
+#: misc/create_inode.c:769
 #, c-format
 msgid "while trying to read link \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:775
+#: misc/create_inode.c:776
 msgid "symlink increased in size between lstat() and readlink()"
 msgstr ""
 
-#: misc/create_inode.c:786
+#: misc/create_inode.c:787
 #, c-format
 msgid "while writing symlink\"%s\""
 msgstr ""
 
-#: misc/create_inode.c:796
+#: misc/create_inode.c:797
 #, c-format
 msgid "while writing file \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:809
+#: misc/create_inode.c:810
 #, c-format
 msgid "while making dir \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:826
+#: misc/create_inode.c:827
 msgid "while changing directory"
 msgstr ""
 
-#: misc/create_inode.c:832
+#: misc/create_inode.c:833
 #, c-format
 msgid "ignoring entry \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:845
+#: misc/create_inode.c:846
 #, c-format
 msgid "while setting inode for \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:852
+#: misc/create_inode.c:853
 #, c-format
 msgid "while setting xattrs for \"%s\""
 msgstr ""
 
-#: misc/create_inode.c:870
+#: misc/create_inode.c:871
 msgid "while saving inode data"
 msgstr ""
 
@@ -4127,7 +4127,7 @@
 msgid "Journal users:            %s\n"
 msgstr ""
 
-#: misc/dumpe2fs.c:530 misc/mke2fs.c:785 misc/tune2fs.c:1930
+#: misc/dumpe2fs.c:530 misc/mke2fs.c:786 misc/tune2fs.c:1930
 msgid "Couldn't allocate memory to parse options!\n"
 msgstr ""
 
@@ -4155,7 +4155,7 @@
 "\tblocksize=<blocksize>\n"
 msgstr ""
 
-#: misc/dumpe2fs.c:646 misc/mke2fs.c:1815
+#: misc/dumpe2fs.c:646 misc/mke2fs.c:1816
 #, c-format
 msgid "\tUsing %s\n"
 msgstr ""
@@ -4901,7 +4901,7 @@
 "Could not write %d blocks in inode table starting at %llu: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:444 misc/mke2fs.c:2654 misc/mke2fs.c:3030
+#: misc/mke2fs.c:444 misc/mke2fs.c:2673 misc/mke2fs.c:3049
 msgid "done                            \n"
 msgstr ""
 
@@ -4961,170 +4961,170 @@
 msgid "while zeroing journal device (block %llu, count %d)"
 msgstr ""
 
-#: misc/mke2fs.c:637
+#: misc/mke2fs.c:638
 msgid "while writing journal superblock"
 msgstr ""
 
-#: misc/mke2fs.c:652
+#: misc/mke2fs.c:653
 #, c-format
 msgid "Creating filesystem with %llu %dk blocks and %u inodes\n"
 msgstr ""
 
-#: misc/mke2fs.c:660
+#: misc/mke2fs.c:661
 #, c-format
 msgid ""
 "warning: %llu blocks unused.\n"
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:665
+#: misc/mke2fs.c:666
 #, c-format
 msgid "Filesystem label=%s\n"
 msgstr ""
 
-#: misc/mke2fs.c:668
+#: misc/mke2fs.c:669
 #, c-format
 msgid "OS type: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:670
+#: misc/mke2fs.c:671
 #, c-format
 msgid "Block size=%u (log=%u)\n"
 msgstr ""
 
-#: misc/mke2fs.c:673
+#: misc/mke2fs.c:674
 #, c-format
 msgid "Cluster size=%u (log=%u)\n"
 msgstr ""
 
-#: misc/mke2fs.c:677
+#: misc/mke2fs.c:678
 #, c-format
 msgid "Fragment size=%u (log=%u)\n"
 msgstr ""
 
-#: misc/mke2fs.c:679
+#: misc/mke2fs.c:680
 #, c-format
 msgid "Stride=%u blocks, Stripe width=%u blocks\n"
 msgstr ""
 
-#: misc/mke2fs.c:681
+#: misc/mke2fs.c:682
 #, c-format
 msgid "%u inodes, %llu blocks\n"
 msgstr ""
 
-#: misc/mke2fs.c:683
+#: misc/mke2fs.c:684
 #, c-format
 msgid "%llu blocks (%2.2f%%) reserved for the super user\n"
 msgstr ""
 
-#: misc/mke2fs.c:686
+#: misc/mke2fs.c:687
 #, c-format
 msgid "First data block=%u\n"
 msgstr ""
 
-#: misc/mke2fs.c:688
+#: misc/mke2fs.c:689
 #, c-format
 msgid "Root directory owner=%u:%u\n"
 msgstr ""
 
-#: misc/mke2fs.c:690
+#: misc/mke2fs.c:691
 #, c-format
 msgid "Maximum filesystem blocks=%lu\n"
 msgstr ""
 
-#: misc/mke2fs.c:694
+#: misc/mke2fs.c:695
 #, c-format
 msgid "%u block groups\n"
 msgstr ""
 
-#: misc/mke2fs.c:696
+#: misc/mke2fs.c:697
 #, c-format
 msgid "%u block group\n"
 msgstr ""
 
-#: misc/mke2fs.c:698
+#: misc/mke2fs.c:699
 #, c-format
 msgid "%u blocks per group, %u clusters per group\n"
 msgstr ""
 
-#: misc/mke2fs.c:701
+#: misc/mke2fs.c:702
 #, c-format
 msgid "%u blocks per group, %u fragments per group\n"
 msgstr ""
 
-#: misc/mke2fs.c:703
+#: misc/mke2fs.c:704
 #, c-format
 msgid "%u inodes per group\n"
 msgstr ""
 
-#: misc/mke2fs.c:712
+#: misc/mke2fs.c:713
 #, c-format
 msgid "Filesystem UUID: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:713
+#: misc/mke2fs.c:714
 msgid "Superblock backups stored on blocks: "
 msgstr ""
 
-#: misc/mke2fs.c:807
+#: misc/mke2fs.c:808
 #, c-format
 msgid "%s requires '-O 64bit'\n"
 msgstr ""
 
-#: misc/mke2fs.c:813
+#: misc/mke2fs.c:814
 #, c-format
 msgid "'%s' must be before 'resize=%u'\n"
 msgstr ""
 
-#: misc/mke2fs.c:826
+#: misc/mke2fs.c:827
 #, c-format
 msgid "Invalid desc_size: '%s'\n"
 msgstr ""
 
-#: misc/mke2fs.c:839
+#: misc/mke2fs.c:840
 #, c-format
 msgid "Invalid offset: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:853 misc/tune2fs.c:1958
+#: misc/mke2fs.c:854 misc/tune2fs.c:1958
 #, c-format
 msgid "Invalid mmp_update_interval: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:867
+#: misc/mke2fs.c:868
 #, c-format
 msgid "Invalid # of backup superblocks: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:889
+#: misc/mke2fs.c:890
 #, c-format
 msgid "Invalid stride parameter: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:904
+#: misc/mke2fs.c:905
 #, c-format
 msgid "Invalid stripe-width parameter: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:927
+#: misc/mke2fs.c:928
 #, c-format
 msgid "Invalid resize parameter: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:934
+#: misc/mke2fs.c:935
 msgid "The resize maximum must be greater than the filesystem size.\n"
 msgstr ""
 
-#: misc/mke2fs.c:958
+#: misc/mke2fs.c:959
 msgid "On-line resizing not supported with revision 0 filesystems\n"
 msgstr ""
 
-#: misc/mke2fs.c:984 misc/mke2fs.c:993
+#: misc/mke2fs.c:985 misc/mke2fs.c:994
 #, c-format
 msgid "Invalid root_owner: '%s'\n"
 msgstr ""
 
-#: misc/mke2fs.c:1034
+#: misc/mke2fs.c:1035
 #, c-format
 msgid ""
 "\n"
@@ -5151,7 +5151,7 @@
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:1059
+#: misc/mke2fs.c:1060
 #, c-format
 msgid ""
 "\n"
@@ -5159,41 +5159,41 @@
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:1101
+#: misc/mke2fs.c:1102
 #, c-format
 msgid ""
 "Syntax error in mke2fs config file (%s, line #%d)\n"
 "\t%s\n"
 msgstr ""
 
-#: misc/mke2fs.c:1114 misc/tune2fs.c:1007
+#: misc/mke2fs.c:1115 misc/tune2fs.c:1007
 #, c-format
 msgid "Invalid filesystem option set: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:1126 misc/tune2fs.c:406
+#: misc/mke2fs.c:1127 misc/tune2fs.c:406
 #, c-format
 msgid "Invalid mount option set: %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:1262
+#: misc/mke2fs.c:1263
 #, c-format
 msgid ""
 "\n"
 "Your mke2fs.conf file does not define the %s filesystem type.\n"
 msgstr ""
 
-#: misc/mke2fs.c:1266
+#: misc/mke2fs.c:1267
 msgid ""
 "You probably need to install an updated mke2fs.conf file.\n"
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:1270
+#: misc/mke2fs.c:1271
 msgid "Aborting...\n"
 msgstr ""
 
-#: misc/mke2fs.c:1311
+#: misc/mke2fs.c:1312
 #, c-format
 msgid ""
 "\n"
@@ -5201,154 +5201,154 @@
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:1493
+#: misc/mke2fs.c:1494
 msgid "Couldn't allocate memory for new PATH.\n"
 msgstr ""
 
-#: misc/mke2fs.c:1534
+#: misc/mke2fs.c:1535
 #, c-format
 msgid "Couldn't init profile successfully (error: %ld).\n"
 msgstr ""
 
-#: misc/mke2fs.c:1567
+#: misc/mke2fs.c:1568
 #, c-format
 msgid "invalid block size - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1571
+#: misc/mke2fs.c:1572
 #, c-format
 msgid "Warning: blocksize %d not usable on most systems.\n"
 msgstr ""
 
-#: misc/mke2fs.c:1587
+#: misc/mke2fs.c:1588
 #, c-format
 msgid "invalid cluster size - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1600
+#: misc/mke2fs.c:1601
 msgid "'-R' is deprecated, use '-E' instead"
 msgstr ""
 
-#: misc/mke2fs.c:1614 misc/tune2fs.c:1687
+#: misc/mke2fs.c:1615 misc/tune2fs.c:1687
 #, c-format
 msgid "bad error behavior - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1626
+#: misc/mke2fs.c:1627
 msgid "Illegal number for blocks per group"
 msgstr ""
 
-#: misc/mke2fs.c:1631
+#: misc/mke2fs.c:1632
 msgid "blocks per group must be multiple of 8"
 msgstr ""
 
-#: misc/mke2fs.c:1639
+#: misc/mke2fs.c:1640
 msgid "Illegal number for flex_bg size"
 msgstr ""
 
-#: misc/mke2fs.c:1645
+#: misc/mke2fs.c:1646
 msgid "flex_bg size must be a power of 2"
 msgstr ""
 
-#: misc/mke2fs.c:1650
+#: misc/mke2fs.c:1651
 #, c-format
 msgid "flex_bg size (%lu) must be less than or equal to 2^31"
 msgstr ""
 
-#: misc/mke2fs.c:1660
+#: misc/mke2fs.c:1661
 #, c-format
 msgid "invalid inode ratio %s (min %d/max %d)"
 msgstr ""
 
-#: misc/mke2fs.c:1670
+#: misc/mke2fs.c:1671
 #, c-format
 msgid "invalid inode size - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1683
+#: misc/mke2fs.c:1684
 msgid ""
 "Warning: -K option is deprecated and should not be used anymore. Use '-E "
 "nodiscard' extended option instead!\n"
 msgstr ""
 
-#: misc/mke2fs.c:1694
+#: misc/mke2fs.c:1695
 msgid "in malloc for bad_blocks_filename"
 msgstr ""
 
-#: misc/mke2fs.c:1703
+#: misc/mke2fs.c:1704
 #, c-format
 msgid ""
 "Warning: label too long; will be truncated to '%s'\n"
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:1712
+#: misc/mke2fs.c:1713
 #, c-format
 msgid "invalid reserved blocks percent - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1727
+#: misc/mke2fs.c:1728
 #, c-format
 msgid "bad num inodes - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1740
+#: misc/mke2fs.c:1741
 msgid "while allocating fs_feature string"
 msgstr ""
 
-#: misc/mke2fs.c:1757
+#: misc/mke2fs.c:1758
 #, c-format
 msgid "bad revision level - %s"
 msgstr ""
 
-#: misc/mke2fs.c:1762
+#: misc/mke2fs.c:1763
 #, c-format
 msgid "while trying to create revision %d"
 msgstr ""
 
-#: misc/mke2fs.c:1776
+#: misc/mke2fs.c:1777
 msgid "The -t option may only be used once"
 msgstr ""
 
-#: misc/mke2fs.c:1784
+#: misc/mke2fs.c:1785
 msgid "The -T option may only be used once"
 msgstr ""
 
-#: misc/mke2fs.c:1840 misc/mke2fs.c:3114
+#: misc/mke2fs.c:1841 misc/mke2fs.c:3133
 #, c-format
 msgid "while trying to open journal device %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:1846
+#: misc/mke2fs.c:1847
 #, c-format
 msgid "Journal dev blocksize (%d) smaller than minimum blocksize %d\n"
 msgstr ""
 
-#: misc/mke2fs.c:1852
+#: misc/mke2fs.c:1853
 #, c-format
 msgid "Using journal device's blocksize: %d\n"
 msgstr ""
 
-#: misc/mke2fs.c:1863
+#: misc/mke2fs.c:1864
 #, c-format
 msgid "invalid blocks '%s' on device '%s'"
 msgstr ""
 
-#: misc/mke2fs.c:1887
+#: misc/mke2fs.c:1888
 msgid "filesystem"
 msgstr ""
 
-#: misc/mke2fs.c:1900 resize/main.c:491
+#: misc/mke2fs.c:1901 resize/main.c:491
 msgid "while trying to determine filesystem size"
 msgstr ""
 
-#: misc/mke2fs.c:1906
+#: misc/mke2fs.c:1907
 msgid ""
 "Couldn't determine device size; you must specify\n"
 "the size of the filesystem\n"
 msgstr ""
 
-#: misc/mke2fs.c:1913
+#: misc/mke2fs.c:1914
 msgid ""
 "Device size reported to be zero.  Invalid partition specified, or\n"
 "\tpartition table wasn't reread after running fdisk, due to\n"
@@ -5356,121 +5356,128 @@
 "\tto re-read your partition table.\n"
 msgstr ""
 
-#: misc/mke2fs.c:1930
+#: misc/mke2fs.c:1931
 msgid "Filesystem larger than apparent device size."
 msgstr ""
 
-#: misc/mke2fs.c:1950
+#: misc/mke2fs.c:1951
 msgid "Failed to parse fs types list\n"
 msgstr ""
 
-#: misc/mke2fs.c:1998
+#: misc/mke2fs.c:1999
 msgid "The HURD does not support the filetype feature.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2003
+#: misc/mke2fs.c:2004
 msgid "The HURD does not support the huge_file feature.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2008
+#: misc/mke2fs.c:2009
 msgid "The HURD does not support the metadata_csum feature.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2018
+#: misc/mke2fs.c:2019
 msgid "while trying to determine hardware sector size"
 msgstr ""
 
-#: misc/mke2fs.c:2024
+#: misc/mke2fs.c:2025
 msgid "while trying to determine physical sector size"
 msgstr ""
 
-#: misc/mke2fs.c:2056
+#: misc/mke2fs.c:2057
 msgid "while setting blocksize; too small for device\n"
 msgstr ""
 
-#: misc/mke2fs.c:2061
+#: misc/mke2fs.c:2062
 #, c-format
 msgid ""
 "Warning: specified blocksize %d is less than device physical sectorsize %d\n"
 msgstr ""
 
-#: misc/mke2fs.c:2085
+#: misc/mke2fs.c:2086
 #, c-format
 msgid ""
 "%s: Size of device (0x%llx blocks) %s too big to be expressed\n"
 "\tin 32 bits using a blocksize of %d.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2101
+#: misc/mke2fs.c:2098
+#, c-format
+msgid ""
+"%s: Size of device (0x%llx blocks) %s too big to create\n"
+"\ta filesystem using a blocksize of %d.\n"
+msgstr ""
+
+#: misc/mke2fs.c:2120
 msgid "fs_types for mke2fs.conf resolution: "
 msgstr ""
 
-#: misc/mke2fs.c:2108
+#: misc/mke2fs.c:2127
 msgid "Filesystem features not supported with revision 0 filesystems\n"
 msgstr ""
 
-#: misc/mke2fs.c:2116
+#: misc/mke2fs.c:2135
 msgid "Sparse superblocks not supported with revision 0 filesystems\n"
 msgstr ""
 
-#: misc/mke2fs.c:2126
+#: misc/mke2fs.c:2145
 msgid "Journals not supported with revision 0 filesystems\n"
 msgstr ""
 
-#: misc/mke2fs.c:2139
+#: misc/mke2fs.c:2158
 #, c-format
 msgid "invalid reserved blocks percent - %lf"
 msgstr ""
 
-#: misc/mke2fs.c:2156
+#: misc/mke2fs.c:2175
 msgid ""
 "Extents MUST be enabled for a 64-bit filesystem.  Pass -O extents to "
 "rectify.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2176
+#: misc/mke2fs.c:2195
 msgid "The cluster size may not be smaller than the block size.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2182
+#: misc/mke2fs.c:2201
 msgid "specifying a cluster size requires the bigalloc feature"
 msgstr ""
 
-#: misc/mke2fs.c:2202
+#: misc/mke2fs.c:2221
 #, c-format
 msgid "warning: Unable to get device geometry for %s\n"
 msgstr ""
 
-#: misc/mke2fs.c:2205
+#: misc/mke2fs.c:2224
 #, c-format
 msgid "%s alignment is offset by %lu bytes.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2207
+#: misc/mke2fs.c:2226
 #, c-format
 msgid ""
 "This may result in very poor performance, (re)-partitioning suggested.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2228
+#: misc/mke2fs.c:2247
 #, c-format
 msgid "%d-byte blocks too big for system (max %d)"
 msgstr ""
 
-#: misc/mke2fs.c:2232
+#: misc/mke2fs.c:2251
 #, c-format
 msgid ""
 "Warning: %d-byte blocks too big for system (max %d), forced to continue\n"
 msgstr ""
 
-#: misc/mke2fs.c:2240
+#: misc/mke2fs.c:2259
 #, c-format
 msgid ""
 "Suggestion: Use Linux kernel >= 3.18 for improved stability of the metadata "
 "and journal checksum features.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2295
+#: misc/mke2fs.c:2314
 #, c-format
 msgid ""
 "\n"
@@ -5480,17 +5487,17 @@
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:2312
+#: misc/mke2fs.c:2331
 msgid "Can't support bigalloc feature without extents feature"
 msgstr ""
 
-#: misc/mke2fs.c:2319
+#: misc/mke2fs.c:2338
 msgid ""
 "The resize_inode and meta_bg features are not compatible.\n"
 "They can not be both enabled simultaneously.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2327
+#: misc/mke2fs.c:2346
 msgid ""
 "\n"
 "Warning: the bigalloc feature is still under development\n"
@@ -5498,44 +5505,44 @@
 "\n"
 msgstr ""
 
-#: misc/mke2fs.c:2339
+#: misc/mke2fs.c:2358
 msgid "reserved online resize blocks not supported on non-sparse filesystem"
 msgstr ""
 
-#: misc/mke2fs.c:2348
+#: misc/mke2fs.c:2367
 msgid "blocks per group count out of range"
 msgstr ""
 
-#: misc/mke2fs.c:2370
+#: misc/mke2fs.c:2389
 msgid "Flex_bg feature not enabled, so flex_bg size may not be specified"
 msgstr ""
 
-#: misc/mke2fs.c:2382
+#: misc/mke2fs.c:2401
 #, c-format
 msgid "invalid inode size %d (min %d/max %d)"
 msgstr ""
 
-#: misc/mke2fs.c:2397
+#: misc/mke2fs.c:2416
 #, c-format
 msgid "%d byte inodes are too small for inline data; specify larger size"
 msgstr ""
 
-#: misc/mke2fs.c:2410
+#: misc/mke2fs.c:2429
 #, c-format
 msgid "%d byte inodes are too small for project quota; specify larger size"
 msgstr ""
 
-#: misc/mke2fs.c:2425
+#: misc/mke2fs.c:2444
 #, c-format
 msgid "too many inodes (%llu), raise inode ratio?"
 msgstr ""
 
-#: misc/mke2fs.c:2432
+#: misc/mke2fs.c:2451
 #, c-format
 msgid "too many inodes (%llu), specify < 2^32 inodes"
 msgstr ""
 
-#: misc/mke2fs.c:2446
+#: misc/mke2fs.c:2465
 #, c-format
 msgid ""
 "inode_size (%u) * inodes_count (%u) too big for a\n"
@@ -5543,151 +5550,151 @@
 "\tor lower inode count (-N).\n"
 msgstr ""
 
-#: misc/mke2fs.c:2633
+#: misc/mke2fs.c:2652
 msgid "Discarding device blocks: "
 msgstr ""
 
-#: misc/mke2fs.c:2649
+#: misc/mke2fs.c:2668
 msgid "failed - "
 msgstr ""
 
-#: misc/mke2fs.c:2708
+#: misc/mke2fs.c:2727
 msgid "while initializing quota context"
 msgstr ""
 
-#: misc/mke2fs.c:2715
+#: misc/mke2fs.c:2734
 msgid "while writing quota inodes"
 msgstr ""
 
-#: misc/mke2fs.c:2740
+#: misc/mke2fs.c:2759
 #, c-format
 msgid "bad error behavior in profile - %s"
 msgstr ""
 
-#: misc/mke2fs.c:2814
+#: misc/mke2fs.c:2833
 msgid "while setting up superblock"
 msgstr ""
 
-#: misc/mke2fs.c:2830
+#: misc/mke2fs.c:2849
 msgid ""
 "Extents are not enabled.  The file extent tree can be checksummed, whereas "
 "block maps cannot.  Not enabling extents reduces the coverage of metadata "
 "checksumming.  Pass -O extents to rectify.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2837
+#: misc/mke2fs.c:2856
 msgid ""
 "64-bit filesystem support is not enabled.  The larger fields afforded by "
 "this feature enable full-strength checksumming.  Pass -O 64bit to rectify.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2845
+#: misc/mke2fs.c:2864
 msgid "The metadata_csum_seed feature requres the metadata_csum feature.\n"
 msgstr ""
 
-#: misc/mke2fs.c:2869
+#: misc/mke2fs.c:2888
 msgid "Discard succeeded and will return 0s - skipping inode table wipe\n"
 msgstr ""
 
-#: misc/mke2fs.c:2955
+#: misc/mke2fs.c:2974
 #, c-format
 msgid "unknown os - %s"
 msgstr ""
 
-#: misc/mke2fs.c:3018
+#: misc/mke2fs.c:3037
 msgid "Allocating group tables: "
 msgstr ""
 
-#: misc/mke2fs.c:3026
+#: misc/mke2fs.c:3045
 msgid "while trying to allocate filesystem tables"
 msgstr ""
 
-#: misc/mke2fs.c:3035
+#: misc/mke2fs.c:3054
 msgid ""
 "\n"
 "\twhile converting subcluster bitmap"
 msgstr ""
 
-#: misc/mke2fs.c:3041
+#: misc/mke2fs.c:3060
 #, c-format
 msgid "%s may be further corrupted by superblock rewrite\n"
 msgstr ""
 
-#: misc/mke2fs.c:3082
+#: misc/mke2fs.c:3101
 #, c-format
 msgid "while zeroing block %llu at end of filesystem"
 msgstr ""
 
-#: misc/mke2fs.c:3095
+#: misc/mke2fs.c:3114
 msgid "while reserving blocks for online resize"
 msgstr ""
 
-#: misc/mke2fs.c:3107 misc/tune2fs.c:1415
+#: misc/mke2fs.c:3126 misc/tune2fs.c:1415
 msgid "journal"
 msgstr ""
 
-#: misc/mke2fs.c:3119
+#: misc/mke2fs.c:3138
 #, c-format
 msgid "Adding journal to device %s: "
 msgstr ""
 
-#: misc/mke2fs.c:3126
+#: misc/mke2fs.c:3145
 #, c-format
 msgid ""
 "\n"
 "\twhile trying to add journal to device %s"
 msgstr ""
 
-#: misc/mke2fs.c:3131 misc/mke2fs.c:3160 misc/mke2fs.c:3200
+#: misc/mke2fs.c:3150 misc/mke2fs.c:3179 misc/mke2fs.c:3219
 #: misc/mk_hugefiles.c:510 misc/tune2fs.c:1444 misc/tune2fs.c:1463
 msgid "done\n"
 msgstr ""
 
-#: misc/mke2fs.c:3137
+#: misc/mke2fs.c:3156
 msgid "Skipping journal creation in super-only mode\n"
 msgstr ""
 
-#: misc/mke2fs.c:3147
+#: misc/mke2fs.c:3166
 #, c-format
 msgid "Creating journal (%u blocks): "
 msgstr ""
 
-#: misc/mke2fs.c:3156
+#: misc/mke2fs.c:3175
 msgid ""
 "\n"
 "\twhile trying to create journal"
 msgstr ""
 
-#: misc/mke2fs.c:3168 misc/tune2fs.c:1072
+#: misc/mke2fs.c:3187 misc/tune2fs.c:1072
 msgid ""
 "\n"
 "Error while enabling multiple mount protection feature."
 msgstr ""
 
-#: misc/mke2fs.c:3173
+#: misc/mke2fs.c:3192
 #, c-format
 msgid "Multiple mount protection is enabled with update interval %d seconds.\n"
 msgstr ""
 
-#: misc/mke2fs.c:3191
+#: misc/mke2fs.c:3210
 msgid "Copying files into the device: "
 msgstr ""
 
-#: misc/mke2fs.c:3197
+#: misc/mke2fs.c:3216
 msgid "while populating file system"
 msgstr ""
 
-#: misc/mke2fs.c:3204
+#: misc/mke2fs.c:3223
 msgid "Writing superblocks and filesystem accounting information: "
 msgstr ""
 
-#: misc/mke2fs.c:3211
+#: misc/mke2fs.c:3230
 msgid ""
 "\n"
-"Warning, had trouble writing out superblocks."
+"Warning, had trouble writing out superblocks.\n"
 msgstr ""
 
-#: misc/mke2fs.c:3213
+#: misc/mke2fs.c:3232
 msgid ""
 "done\n"
 "\n"
@@ -5722,7 +5729,7 @@
 msgid "Usage: mklost+found\n"
 msgstr ""
 
-#: misc/partinfo.c:41
+#: misc/partinfo.c:43
 #, c-format
 msgid ""
 "Usage:  %s device...\n"
@@ -5732,22 +5739,22 @@
 "\n"
 msgstr ""
 
-#: misc/partinfo.c:51
+#: misc/partinfo.c:53
 #, c-format
 msgid "Cannot open %s: %s"
 msgstr ""
 
-#: misc/partinfo.c:57
+#: misc/partinfo.c:59
 #, c-format
 msgid "Cannot get geometry of %s: %s"
 msgstr ""
 
-#: misc/partinfo.c:65
+#: misc/partinfo.c:67
 #, c-format
 msgid "Cannot get size of %s: %s"
 msgstr ""
 
-#: misc/partinfo.c:71
+#: misc/partinfo.c:73
 #, c-format
 msgid "%s: h=%3d s=%3d c=%4d   start=%8d size=%8lu end=%8d\n"
 msgstr ""
@@ -6866,7 +6873,7 @@
 msgstr ""
 
 #: lib/ext2fs/ext2_err.c:11
-msgid "EXT2FS Library version 1.43.2"
+msgid "EXT2FS Library version 1.43.4-WIP"
 msgstr ""
 
 #: lib/ext2fs/ext2_err.c:12
@@ -7701,68 +7708,68 @@
 msgid "Bad magic value in profile_file_data_t"
 msgstr ""
 
-#: lib/support/plausible.c:107
+#: lib/support/plausible.c:118
 #, c-format
 msgid "\tlast mounted on %s on %s"
 msgstr ""
 
-#: lib/support/plausible.c:110
+#: lib/support/plausible.c:121
 #, c-format
 msgid "\tlast mounted on %s"
 msgstr ""
 
-#: lib/support/plausible.c:113
+#: lib/support/plausible.c:124
 #, c-format
 msgid "\tcreated on %s"
 msgstr ""
 
-#: lib/support/plausible.c:116
+#: lib/support/plausible.c:127
 #, c-format
 msgid "\tlast modified on %s"
 msgstr ""
 
-#: lib/support/plausible.c:150
+#: lib/support/plausible.c:161
 #, c-format
 msgid "Found a %s partition table in %s\n"
 msgstr ""
 
-#: lib/support/plausible.c:180
+#: lib/support/plausible.c:191
 #, c-format
 msgid "The file %s does not exist and no size was specified.\n"
 msgstr ""
 
-#: lib/support/plausible.c:188
+#: lib/support/plausible.c:199
 #, c-format
 msgid "Creating regular file %s\n"
 msgstr ""
 
-#: lib/support/plausible.c:191
+#: lib/support/plausible.c:202
 #, c-format
 msgid "Could not open %s: %s\n"
 msgstr ""
 
-#: lib/support/plausible.c:194
+#: lib/support/plausible.c:205
 msgid ""
 "\n"
 "The device apparently does not exist; did you specify it correctly?\n"
 msgstr ""
 
-#: lib/support/plausible.c:216
+#: lib/support/plausible.c:227
 #, c-format
 msgid "%s is not a block special device.\n"
 msgstr ""
 
-#: lib/support/plausible.c:238
+#: lib/support/plausible.c:249
 #, c-format
 msgid "%s contains a %s file system labelled '%s'\n"
 msgstr ""
 
-#: lib/support/plausible.c:241
+#: lib/support/plausible.c:252
 #, c-format
 msgid "%s contains a %s file system\n"
 msgstr ""
 
-#: lib/support/plausible.c:265
+#: lib/support/plausible.c:276
 #, c-format
 msgid "%s contains `%s' data\n"
 msgstr ""
diff --git a/resize/main.c b/resize/main.c
index 5a99483..396391b 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -505,7 +505,7 @@
 		new_size = max_size;
 		/* Round down to an even multiple of a pagesize */
 		if (sys_page_size > blocksize)
-			new_size &= ~((sys_page_size / blocksize)-1);
+			new_size &= ~((blk64_t)((sys_page_size / blocksize)-1));
 	}
 	/* If changing 64bit, don't change the filesystem size. */
 	if (flags & (RESIZE_DISABLE_64BIT | RESIZE_ENABLE_64BIT)) {
diff --git a/tests/d_inline_dump/expect b/tests/d_inline_dump/expect
index c84f64d..b685135 100644
--- a/tests/d_inline_dump/expect
+++ b/tests/d_inline_dump/expect
@@ -12,7 +12,7 @@
 Size of extra inode fields: 28
 Extended attributes:
   system.data (20)
-  user.a = "b" (1)
+  user.a (1) = "b"
 Size of inline data: 80
 *** short file
 Inode: 18   Type: regular    Mode:  0644   Flags: 0x10000000
@@ -28,7 +28,7 @@
 Size of extra inode fields: 28
 Extended attributes:
   system.data (0)
-  user.a = "b" (1)
+  user.a (1) = "b"
 Size of inline data: 60
 
 *** long dir
@@ -45,7 +45,7 @@
 Size of extra inode fields: 28
 Extended attributes:
   system.data (72)
-  user.a = "b" (1)
+  user.a (1) = "b"
 Size of inline data: 132
 *** short dir
 Inode: 20   Type: directory    Mode:  0755   Flags: 0x10000000
@@ -61,7 +61,7 @@
 Size of extra inode fields: 28
 Extended attributes:
   system.data (0)
-  user.a = "b" (1)
+  user.a (1) = "b"
 Size of inline data: 60
 
 *** long link
diff --git a/tests/d_xattr_edits/expect b/tests/d_xattr_edits/expect
index 4db5414..38f3030 100644
--- a/tests/d_xattr_edits/expect
+++ b/tests/d_xattr_edits/expect
@@ -7,11 +7,12 @@
 Exit status is 0
 ea_list /
 Extended attributes:
-  user.joe = "smith" (5)
-  user.moo = "FEE_FIE_FOE_FUMMMMMM" (20)
+  user.joe (5) = "smith"
+  user.moo (20) = "FEE_FIE_FOE_FUMMMMMM"
 Exit status is 0
 ea_get / user.moo
-FEE_FIE_FOE_FUMMMMMM
+user.moo (20) = "FEE_FIE_FOE_FUMMMMMM"
+
 Exit status is 0
 ea_get / nosuchea
 ea_get: Extended attribute key not found while getting extended attribute
@@ -22,7 +23,7 @@
 Exit status is 0
 ea_list /
 Extended attributes:
-  user.joe = "smith" (5)
+  user.joe (5) = "smith"
 Exit status is 0
 ea_get / user.moo
 ea_get: Extended attribute key not found while getting extended attribute
@@ -35,7 +36,11 @@
 Exit status is 0
 ea_list /
 Extended attributes:
-  user.file_based_xattr = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567\012" (108)
+  user.file_based_xattr (108)
+Exit status is 0
+ea_get / user.file_based_xattr
+user.file_based_xattr (108) = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567\n"
+
 Exit status is 0
 ea_get -f d_xattr_edits.ver.tmp / user.file_based_xattr
 Exit status is 0
diff --git a/tests/d_xattr_edits/script b/tests/d_xattr_edits/script
index 2e356e8..df2a530 100644
--- a/tests/d_xattr_edits/script
+++ b/tests/d_xattr_edits/script
@@ -96,6 +96,12 @@
 echo Exit status is $status >> $OUT.new
 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
 
+echo "ea_get / user.file_based_xattr" > $OUT.new
+$DEBUGFS -w -R "ea_get / user.file_based_xattr" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
 echo "ea_get -f $VERIFY_DATA / user.file_based_xattr" > $OUT.new
 $DEBUGFS -w -R "ea_get -f $VERIFY_DATA / user.file_based_xattr" $TMPFILE >> $OUT.new 2>&1
 status=$?
diff --git a/tests/d_xattr_sorting/expect b/tests/d_xattr_sorting/expect
index 30a6eab..3fd06fa 100644
--- a/tests/d_xattr_sorting/expect
+++ b/tests/d_xattr_sorting/expect
@@ -9,12 +9,17 @@
 Exit status is 0
 ea_list /
 Extended attributes:
-  user.moo = "cow" (3)
-  security.imb = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
-  security.SMEG64 = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" (256)
+  user.moo (3) = "cow"
+  security.imb (256)
+  security.SMEG64 (256)
 Exit status is 0
 ea_get / security.imb
-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+security.imb (256) = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
+Exit status is 0
+ea_get / security.SMEG64
+security.SMEG64 (256) = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
+
 Exit status is 0
 ea_get / nosuchea
 ea_get: Extended attribute key not found while getting extended attribute
diff --git a/tests/d_xattr_sorting/script b/tests/d_xattr_sorting/script
index 8d5602e..459a66a 100644
--- a/tests/d_xattr_sorting/script
+++ b/tests/d_xattr_sorting/script
@@ -54,6 +54,12 @@
 echo Exit status is $status >> $OUT.new
 sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
 
+echo "ea_get / security.SMEG64" > $OUT.new
+$DEBUGFS -w -R "ea_get / security.SMEG64" $TMPFILE >> $OUT.new 2>&1
+status=$?
+echo Exit status is $status >> $OUT.new
+sed -f $cmd_dir/filter.sed $OUT.new >> $OUT
+
 echo "ea_get / nosuchea" > $OUT.new
 $DEBUGFS -w -R "ea_get / nosuchea" $TMPFILE >> $OUT.new 2>&1
 status=$?
diff --git a/tests/f_mke2fs_baddisk/script b/tests/f_mke2fs_baddisk/script
new file mode 100644
index 0000000..0e6d3cd
--- /dev/null
+++ b/tests/f_mke2fs_baddisk/script
@@ -0,0 +1,26 @@
+test_description="mke2fs /dev/mapper/bad_disk should fail"
+
+OUT=$test_name.log
+
+dmsetup create -v bad_disk --table '0 1148681097 error' > $OUT 2>&1
+status=$?
+if [ "$status" != 0 ]; then
+    echo "$test_name: $test_description: skip"
+    touch $test_name.ok
+    exit 0
+fi   
+
+echo mke2fs /dev/mapper/bad_disk  >> $OUT
+$MKE2FS  /dev/mapper/bad_disk  >> $OUT 2>&1
+status=$?
+sleep 1
+dmsetup remove --retry bad_disk >> $OUT 2>&1
+
+if [ "$status" = 0 ] ; then
+    ln -f $test_name.log $test_name.failed
+    echo "$test_name: $test_description: failed"
+else
+    echo "$test_name: $test_description: ok"
+    touch $test_name.ok
+
+fi
diff --git a/tests/f_quota/expect.0 b/tests/f_quota/expect.0
index c0ad63d..eb5294e 100644
--- a/tests/f_quota/expect.0
+++ b/tests/f_quota/expect.0
@@ -1,21 +1,21 @@
 debugfs: list_quota user
- user id     blocks    quota    limit      inodes    quota    limit
-       0      13312        0        0           2        0        0
-      34       1024        0        0           1        0        0
-     100       2048       32       50           2       20       30
+   user id     blocks    quota    limit      inodes    quota    limit
+         0      13312        0        0           2        0        0
+        34       1024        0        0           1        0        0
+       100       2048       32       50           2       20       30
 debugfs: list_quota group
-group id     blocks    quota    limit      inodes    quota    limit
-       0      16384        0        0           5        0        0
+  group id     blocks    quota    limit      inodes    quota    limit
+         0      16384        0        0           5        0        0
 debugfs: get_quota user 0
- user id     blocks    quota    limit      inodes    quota    limit
-       0      13312        0        0           2        0        0
+   user id     blocks    quota    limit      inodes    quota    limit
+         0      13312        0        0           2        0        0
 debugfs: get_quota user 100
- user id     blocks    quota    limit      inodes    quota    limit
-     100       2048       32       50           2       20       30
+   user id     blocks    quota    limit      inodes    quota    limit
+       100       2048       32       50           2       20       30
 debugfs: get_quota user 34
- user id     blocks    quota    limit      inodes    quota    limit
-      34       1024        0        0           1        0        0
+   user id     blocks    quota    limit      inodes    quota    limit
+        34       1024        0        0           1        0        0
 debugfs: get_quota group 0
-group id     blocks    quota    limit      inodes    quota    limit
-       0      16384        0        0           5        0        0
+  group id     blocks    quota    limit      inodes    quota    limit
+         0      16384        0        0           5        0        0
 debugfs: 
diff --git a/tests/r_inline_xattr/expect b/tests/r_inline_xattr/expect
index 3feba08..885de59 100644
--- a/tests/r_inline_xattr/expect
+++ b/tests/r_inline_xattr/expect
@@ -1,14 +1,14 @@
 resize2fs test
-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
+debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''
 Inode: 1550   Type: regular    Mode:  0644   Flags: 0x0
-  user.name = "propervalue" (11)
+  user.name (11) = "propervalue"
 Exit status is 0
 resize2fs test.img 5M
 Resizing the filesystem on test.img to 5120 (1k) blocks.
 The filesystem on test.img is now 5120 (1k) blocks long.
 
 Exit status is 0
-debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''
+debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''
 Inode: 12   Type: regular    Mode:  0644   Flags: 0x0
-  user.name = "propervalue" (11)
+  user.name (11) = "propervalue"
 Exit status is 0
diff --git a/tests/r_inline_xattr/script b/tests/r_inline_xattr/script
index d882587..eb2085d 100644
--- a/tests/r_inline_xattr/script
+++ b/tests/r_inline_xattr/script
@@ -10,8 +10,8 @@
 echo "resize2fs test" > $OUT
 
 # Look at existing inline extended attribute
-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT
 status=$?
 echo Exit status is $status >> $OUT
 
@@ -23,8 +23,8 @@
 sed -f $cmd_dir/filter.sed -e "s;$TMPFILE;test.img;" $OUT.new >> $OUT
 
 # Look at inline extended attribute in resized fs
-echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|name = ''" >> $OUT
-$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|name = " >> $OUT
+echo "debugfs -R ''stat file'' test.img 2>&1 | grep ''^Inode\|in inode body\|user.name (''" >> $OUT
+$DEBUGFS -R "stat file" $TMPFILE 2>&1 | grep "^Inode\|in inode body\|user.name (" >> $OUT
 status=$?
 echo Exit status is $status >> $OUT
 
diff --git a/util/gen-sample-fs b/util/gen-sample-fs
new file mode 100644
index 0000000..a6d7b31
--- /dev/null
+++ b/util/gen-sample-fs
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+MNT=/mnt
+FS=/tmp/foo.img
+
+cp /dev/null $FS
+mke2fs -t ext4 -O inline_data -I 256 -b 4096 $FS 256
+mount -t ext4 $FS $MNT
+ln -s symlink_data $MNT/symlink
+for i in 30 70 500 1023 1024 1500; do
+	ln -s /$(perl -e "print 'x' x $i;") $MNT/l_$i
+done
+touch $MNT/acl
+setfacl -m u:daemon:r $MNT/acl
+setfacl -m u:bin:rx $MNT/acl
+setfacl -m g:mail:rw $MNT/acl
+setfacl -m g:daemon:r $MNT/acl
+touch $MNT/simple_acl
+setfacl -m u:daemon:r $MNT/simple_acl
+touch $MNT/xattr
+attr -s foo -V bar $MNT/xattr
+echo -e "one\n\ttwo" | attr -s quux $MNT/xattr
+echo -e "abc\001\002\003" | attr -s def $MNT/xattr
+echo file_data > $MNT/small_inline
+a="I am a very model of a modern major general;"
+a="$a I've information vegetable, animal and mineral"
+echo $a > $MNT/big_inline
+umount $MNT
+
+
diff --git a/version.h b/version.h
index c367bf8..b9e21d9 100644
--- a/version.h
+++ b/version.h
@@ -7,5 +7,5 @@
  * file may be redistributed under the GNU Public License v2.
  */
 
-#define E2FSPROGS_VERSION "1.43.3"
-#define E2FSPROGS_DATE "04-Sep-2016"
+#define E2FSPROGS_VERSION "1.43.4-WIP"
+#define E2FSPROGS_DATE "30-Jan-2017"