aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2021-01-19 23:58:57 -0500
committerTheodore Ts'o <tytso@mit.edu>2021-01-19 23:58:57 -0500
commit0d47f5ab05177c1861f16bb3644a47018e6be1d0 (patch)
treef189505ccaddf29f371c37e1512e7f6fe1cb7ed7
parentba526aae3a8b3eff6bf8b895ef7a45bd557e27ac (diff)
parent6fa8edd0fde7a540b41d78e45743208c8edab0b1 (diff)
downloade2fsprogs-0d47f5ab05177c1861f16bb3644a47018e6be1d0.tar.gz
Merge branch 'maint' into next
-rw-r--r--MCONFIG.in1
-rw-r--r--Makefile.in1
-rw-r--r--contrib/android/e2fsdroid.c5
-rw-r--r--contrib/android/perms.h1
-rw-r--r--debugfs/Makefile.in1
-rw-r--r--debugfs/set_fields.c10
-rw-r--r--doc/Makefile.in1
-rw-r--r--doc/RelNotes/v1.41.13145
-rw-r--r--doc/RelNotes/v1.41.1431
-rw-r--r--e2fsck/Makefile.in1
-rw-r--r--ext2ed/Makefile.in1
-rw-r--r--lib/blkid/Makefile.in1
-rw-r--r--lib/e2p/Makefile.in1
-rw-r--r--lib/et/Makefile.in1
-rw-r--r--lib/ext2fs/Makefile.in1
-rw-r--r--lib/ext2fs/ext_attr.c1
-rw-r--r--lib/ss/Makefile.in1
-rw-r--r--lib/support/Makefile.in1
-rw-r--r--lib/uuid/Makefile.in1
-rw-r--r--misc/Makefile.in1
-rw-r--r--misc/create_inode.c8
-rw-r--r--misc/filefrag.c4
-rw-r--r--misc/profile-to-c.awk1
-rw-r--r--resize/Makefile.in1
-rw-r--r--resize/main.c14
-rw-r--r--scrub/Makefile.in1
-rw-r--r--tests/Makefile.in1
-rw-r--r--tests/progs/Makefile.in1
-rw-r--r--util/Makefile.in1
29 files changed, 53 insertions, 186 deletions
diff --git a/MCONFIG.in b/MCONFIG.in
index 0598f21b7..e4e77e8aa 100644
--- a/MCONFIG.in
+++ b/MCONFIG.in
@@ -123,7 +123,6 @@ LDCONFIG = @LDCONFIG@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
-MKDIR_P = @MKDIR_P@
#
# Library definitions
diff --git a/Makefile.in b/Makefile.in
index 591fd1f27..d412dfbce 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -4,6 +4,7 @@ VPATH = @srcdir@
top_builddir = .
my_dir = .
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/contrib/android/e2fsdroid.c b/contrib/android/e2fsdroid.c
index 1beb1e25b..f5d24b885 100644
--- a/contrib/android/e2fsdroid.c
+++ b/contrib/android/e2fsdroid.c
@@ -76,11 +76,12 @@ static int parse_ugid_map_entry(char* line, struct ugid_map_entry* result)
token && num_tokens < 3;
token = strtok_r(NULL, " ", &token_saveptr), ++num_tokens) {
char* endptr = NULL;
- *parsed[num_tokens] = strtoul(token, &endptr, 10);
- if ((*parsed[num_tokens] == ULONG_MAX && errno) || *endptr) {
+ unsigned long t = strtoul(token, &endptr, 10);
+ if ((t == ULONG_MAX && errno) || (t > UINT_MAX) || *endptr) {
fprintf(stderr, "Malformed u/gid mapping line\n");
return 0;
}
+ *parsed[num_tokens] = (unsigned int) t;
}
if (num_tokens < 3 || strtok_r(NULL, " ", &token_saveptr) != NULL) {
fprintf(stderr, "Malformed u/gid mapping line\n");
diff --git a/contrib/android/perms.h b/contrib/android/perms.h
index 6d6a21299..798712720 100644
--- a/contrib/android/perms.h
+++ b/contrib/android/perms.h
@@ -51,6 +51,7 @@ static inline errcode_t android_configure_fs(ext2_filsys fs,
# endif
# include <private/android_filesystem_config.h>
# include <private/canned_fs_config.h>
+# include <private/fs_config.h>
errcode_t android_configure_fs(ext2_filsys fs, char *src_dir,
char *target_out,
diff --git a/debugfs/Makefile.in b/debugfs/Makefile.in
index bb4d1947b..afa5ba955 100644
--- a/debugfs/Makefile.in
+++ b/debugfs/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = debugfs
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/debugfs/set_fields.c b/debugfs/set_fields.c
index f497bd929..b00157940 100644
--- a/debugfs/set_fields.c
+++ b/debugfs/set_fields.c
@@ -487,10 +487,7 @@ static errcode_t parse_uint(struct field_set_info *info, char *field,
n = num & mask;
switch (size) {
case 8:
- /* Should never get here */
- fprintf(stderr, "64-bit field %s has a second 64-bit field\n"
- "defined; BUG?!?\n", info->name);
- *u.ptr64 = 0;
+ *u.ptr64 = n;
break;
case 4:
*u.ptr32 = n;
@@ -510,7 +507,10 @@ static errcode_t parse_uint(struct field_set_info *info, char *field,
size = 2;
switch (size) {
case 8:
- *u.ptr64 = n;
+ /* Should never get here */
+ fprintf(stderr, "64-bit field %s has a second 64-bit field\n"
+ "defined; BUG?!?\n", info->name);
+ *u.ptr64 = 0;
break;
case 4:
*u.ptr32 = n;
diff --git a/doc/Makefile.in b/doc/Makefile.in
index dab60947e..a35945313 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = doc
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/doc/RelNotes/v1.41.13 b/doc/RelNotes/v1.41.13
deleted file mode 100644
index 3d334d443..000000000
--- a/doc/RelNotes/v1.41.13
+++ /dev/null
@@ -1,145 +0,0 @@
-E2fsprogs 1.41.13 (December 13, 2010)
-=====================================
-
-E2fsck now supports the extended option "-E journal_only", which
-causes it to only do a journal replay. This is useful for scripts
-that want to first replay the journal and then check to see if it
-contains errors.
-
-E2fsck will now support UUID= and LABEL= specifiers for the -j option
-(which specifies where to find the external journal). (Addresses
-Debian Bug #559315)
-
-E2fsck now has support for the problems/<problem code>/force_no
-configuration option in e2fsck.conf, which forces a problem to not be
-fixed.
-
-Dumpe2fs will now avoid printing large negative offsets for the bitmap
-blocks and instead print a message which is a bit more helpful for
-flex_bg file systems.
-
-Mke2fs will now check the file system type (specified with the -t
-option) to make sure it is defined in the mke2fs.conf file; if it is
-not, it will print an error and abort. If the usage type (specified
-with the -T option) is not defined in mke2fs.conf, mke2fs will print a
-warning but will continue. (Addresses Debian Bug #594609)
-
-Clarified error message from resize2fs clarifying that on-line
-shrinking is not supported at all. (Addresses Debian Bug #599786)
-
-Fix an e2fsck bug that could cause a PROGRAMMING BUG error to be
-displayed. (Addresses Debian Bug #555456)
-
-E2fsck will open the external journal in exclusive mode, to prevent
-the journal from getting truncated while it is in use due to a user
-accidentally trying to run e2fsck on a snapshotted file system volume.
-(Addresses Debian Bug #587531)
-
-Fix a bug in e2fsck so it has the correct test for the EOFBLOCKS_FL
-flag.
-
-The tune2fs program can now set the uninit_bg feature without
-requiring an fsck.
-
-The tune2fs, dumpe2fs, and debugfs programs now support the new ext4
-default mount options settings which were added in 2.6.35.
-
-The e2fsck and dumpe2fs programs now support the new ext4 superblock
-fields which track where and when the first and most recent file
-system errors occurred. These fields are displayed by dumpe2fs and
-cleared by e2fsck. These new superblock fields were added in 2.6.36.
-
-Debugfs now uses a more concise format for listing extents in its
-stat command. This format also includes the interior extent tree
-blocks, which previously was missing from stat's output for
-extent-based files.
-
-Debugfs has a new option, -D, which will request Direct I/O access of
-the file system.
-
-Mke2fs will skip initializing the inode table if a device supports
-discard and the discard operation will result in zero'ed blocks.
-
-Badblocks will now correctly backspace over UTF-8 characters when
-displaying its progress bar. (Addresses Gentoo Bug #309909; Addresses
-Debian Bugs #583782 and #587834)
-
-E2freefrag will now display the total number of free extents.
-
-Resize2fs -P no longer requires a freshly checked filesystem before
-printing the minimum resize size.
-
-Fixed a floating point precision error in a binary tree search routine
-that can lead to seg fault in e2fsck and resize2fs.
-
-Fixed a bug in e2fsck where if both the original and backup superblock
-are invalid in some way, e2fsck will fail going back to the original
-superblock because it didn't close the backup superblock first, and
-the exclusive open prevented the file system from being reopened.
-
-Fixed a big in e2freefrag which caused getopt parsing to fail on
-architectures with unsigned chars. (Addresses Gentoo Bug: #299386)
-
-Clarified an mke2fs error message so a missed common in an -E option
-(i.e., mke2fs -t ext4 -E stride=128 stripe-width=512 /dev/sda1")
-results in a more understandable explanation to the user.
-
-Mke2fs now displays the correct valid inode ratio range when
-complaining about an invalid inode ratio specified by the user.
-
-Mke2fs now understands the extended option "discard" and "nodiscard",
-and the older option -K is deprecated. The default of whether
-discards are enabled by default can be controlled by the mke2fs.conf
-file.
-
-Mke2fs's handling of logical and physical sector sizes has been
-improved to reflect the fact that there will be some SSD's with 8k and
-16k physical sectors arriving soon. Mke2fs will no longer force block
-size to be the physical sector size, since there will be devices where
-the physical sector size is larger than the system's page size, and
-hence larger than the maximal supported block size. In addition, if
-the minimal and optimal io size are not exported by the device, and
-the physical sector size is larger than the block size, the physical
-sector size will be used to set the Raid I/O optimization hints in the
-superblock.
-
-E2fsck will now display a better, more specific error message when the
-user enters a typo'ed device name, instead of blathering on about
-alternate superblocks.
-
-Fixed various Debian Packaging Issues
-
-Updated/clarified man pages (Addresses Debian Bugs: #580236, #594004,
-#589345, #591083; Addresses Launchpad Bug: #505719)
-
-Update the Chinese, Chzech, Dutch, French, Germany, Indonesian,
-Polish, Swedish, and Vietnamese translations.
-
-
-Programmer's Notes
-------------------
-
-Fix a dependency definition for the static and profiled blkid
-libraries which could cause compile failures in some configurations.
-(Addresses Debian Bug: #604629)
-
-Add support for Direct I/O in the Unix I/O access layer.
-
-Fixed a memory leak in the Unix I/O layer when changing block sizes.
-
-Fixed minor memory leaks in mke2fs.
-
-Added a new function to the ext2fs library, ext2fs_get_memalign().
-
-The tst_super_size test program will check to make sure the superblock
-fields are correctly aligned and will print them out so they can be
-manually checked for correctness.
-
-Fixed some makefile dependencies for test programs in lib/ext2fs.
-
-Reserved the feature flags and superblock fields needed for the Next3
-snapshot feature.
-
-Reserved the feature flags for EXT4_FEATURE_INCOMPAT_DIRDATA and
-EXT4_INCOMPAT_EA_INODE.
-
diff --git a/doc/RelNotes/v1.41.14 b/doc/RelNotes/v1.41.14
deleted file mode 100644
index 84e2e6e58..000000000
--- a/doc/RelNotes/v1.41.14
+++ /dev/null
@@ -1,31 +0,0 @@
-E2fsprogs 1.41.14 (December 22, 2010)
-=====================================
-
-Fix spurious complaint in mke2fs where it would complain if the file
-system type "default" is not defined in mke2fs.conf.
-
-The resize2fs program will no longer clear the resize_inode feature
-when the number reserved group descriptor blocks reaches zero. This
-allows for subsequent shrinks of the file system to work cleanly for
-flex_bg file systems.
-
-The resize2fs program now handles devices which are exactly 16T;
-previously it would give an error saying that the file system was too
-big.
-
-E2fsck (and the libext2fs library) will not use the extended rec_len
-encoding for file systems whose block size is less than 64k, for
-consistency with the kernel.
-
-Programming notes
------------------
-
-E2fsprogs 1.41.13 would not compile on big-endian systems. This has
-been fixed. (Addresses Sourceforge Bug: #3138115)
-
-The ext2fs_block_iterator2() function passed an incorrect ref_offset
-to its callback function in the case of sparse files. (Addresses
-Sourceforge Bug: #3081087)
-
-Fix some type-punning warnings generated by newer versions of gcc.
-
diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
index 6e25d27d8..e1441c1de 100644
--- a/e2fsck/Makefile.in
+++ b/e2fsck/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = e2fsck
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/ext2ed/Makefile.in b/ext2ed/Makefile.in
index 0697431eb..e4724ca51 100644
--- a/ext2ed/Makefile.in
+++ b/ext2ed/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = ext2ed
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/lib/blkid/Makefile.in b/lib/blkid/Makefile.in
index 850d6882a..c5ca9206f 100644
--- a/lib/blkid/Makefile.in
+++ b/lib/blkid/Makefile.in
@@ -11,6 +11,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/blkid
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/lib/e2p/Makefile.in b/lib/e2p/Makefile.in
index 3e4395ec8..861aee340 100644
--- a/lib/e2p/Makefile.in
+++ b/lib/e2p/Makefile.in
@@ -11,6 +11,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/e2p
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/lib/et/Makefile.in b/lib/et/Makefile.in
index 16e29ea45..d411f231c 100644
--- a/lib/et/Makefile.in
+++ b/lib/et/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/et
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
DEP_MAKEFILE = $(DEP_LIB_MAKEFILES)
diff --git a/lib/ext2fs/Makefile.in b/lib/ext2fs/Makefile.in
index f754b952f..2980522fa 100644
--- a/lib/ext2fs/Makefile.in
+++ b/lib/ext2fs/Makefile.in
@@ -4,6 +4,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/ext2fs
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
DEPEND_CFLAGS = -I$(top_srcdir)/debugfs -I$(srcdir)/../../e2fsck -DDEBUGFS
# This nastiness is needed because of jfs_user.h hackery; when we finally
# clean up this mess, we should be able to drop it
diff --git a/lib/ext2fs/ext_attr.c b/lib/ext2fs/ext_attr.c
index 871319a5a..4580d2e17 100644
--- a/lib/ext2fs/ext_attr.c
+++ b/lib/ext2fs/ext_attr.c
@@ -336,6 +336,7 @@ struct ea_name_index {
/* Keep these names sorted in order of decreasing specificity. */
static struct ea_name_index ea_names[] = {
+ {10, "gnu."},
{3, "system.posix_acl_default"},
{2, "system.posix_acl_access"},
{8, "system.richacl"},
diff --git a/lib/ss/Makefile.in b/lib/ss/Makefile.in
index bf2989b1e..40294db0b 100644
--- a/lib/ss/Makefile.in
+++ b/lib/ss/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/ss
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
DLOPEN_LIB = @DLOPEN_LIB@
@MCONFIG@
diff --git a/lib/support/Makefile.in b/lib/support/Makefile.in
index 1d278642c..f3c7981e4 100644
--- a/lib/support/Makefile.in
+++ b/lib/support/Makefile.in
@@ -7,6 +7,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/support
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/lib/uuid/Makefile.in b/lib/uuid/Makefile.in
index 972459f8a..5f6977925 100644
--- a/lib/uuid/Makefile.in
+++ b/lib/uuid/Makefile.in
@@ -7,6 +7,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = lib/uuid
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/misc/Makefile.in b/misc/Makefile.in
index fde01775c..26b4fd90d 100644
--- a/misc/Makefile.in
+++ b/misc/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = misc
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/misc/create_inode.c b/misc/create_inode.c
index 837f38755..6f8487b92 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -1050,9 +1050,17 @@ errcode_t populate_fs2(ext2_filsys fs, ext2_ino_t parent_ino,
file_info.path_max_len = 255;
file_info.path = calloc(file_info.path_max_len, 1);
+ retval = set_inode_xattr(fs, root, source_dir);
+ if (retval) {
+ com_err(__func__, retval,
+ _("while copying xattrs on root directory"));
+ goto out;
+ }
+
retval = __populate_fs(fs, parent_ino, source_dir, root, &hdlinks,
&file_info, fs_callbacks);
+out:
free(file_info.path);
free(hdlinks.hdl);
return retval;
diff --git a/misc/filefrag.c b/misc/filefrag.c
index 6308bc6d1..62d583b2e 100644
--- a/misc/filefrag.c
+++ b/misc/filefrag.c
@@ -438,13 +438,13 @@ static int frag_report(const char *filename)
goto out_close;
}
- if (last_device != st.st_dev) {
+ if ((last_device != st.st_dev) || !st.st_dev) {
if (fstatfs(fd, &fsinfo) < 0) {
rc = -errno;
perror("fstatfs");
goto out_close;
}
- if (ioctl(fd, FIGETBSZ, &blksize) < 0)
+ if ((ioctl(fd, FIGETBSZ, &blksize) < 0) || !blksize)
blksize = fsinfo.f_bsize;
if (verbose)
printf("Filesystem type is: %lx\n",
diff --git a/misc/profile-to-c.awk b/misc/profile-to-c.awk
index f964efd62..814f7236a 100644
--- a/misc/profile-to-c.awk
+++ b/misc/profile-to-c.awk
@@ -4,6 +4,7 @@ BEGIN {
}
{
+ gsub("\"","\\\"",$0);
printf(" \"%s\\n\"\n", $0);
}
diff --git a/resize/Makefile.in b/resize/Makefile.in
index 546dff144..74192a704 100644
--- a/resize/Makefile.in
+++ b/resize/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = resize
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/resize/main.c b/resize/main.c
index cb0bf6a0d..ef0336e20 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -269,6 +269,8 @@ int main (int argc, char ** argv)
long sysval;
int len, mount_flags;
char *mtpt, *undo_file = NULL;
+ dgrp_t new_group_desc_count;
+ unsigned long new_desc_blocks;
#ifdef ENABLE_NLS
setlocale(LC_MESSAGES, "");
@@ -528,6 +530,18 @@ int main (int argc, char ** argv)
exit(1);
}
}
+ new_group_desc_count = ext2fs_div64_ceil(new_size -
+ fs->super->s_first_data_block,
+ EXT2_BLOCKS_PER_GROUP(fs->super));
+ new_desc_blocks = ext2fs_div_ceil(new_group_desc_count,
+ EXT2_DESC_PER_BLOCK(fs->super));
+ if ((new_desc_blocks + fs->super->s_first_data_block) >
+ EXT2_BLOCKS_PER_GROUP(fs->super)) {
+ com_err(program_name, 0,
+ _("New size results in too many block group "
+ "descriptors.\n"));
+ exit(1);
+ }
if (!force && new_size < min_size) {
com_err(program_name, 0,
diff --git a/scrub/Makefile.in b/scrub/Makefile.in
index 10c2f43e9..387f6504a 100644
--- a/scrub/Makefile.in
+++ b/scrub/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = scrub
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/tests/Makefile.in b/tests/Makefile.in
index d9f8c731f..ba06b3b6b 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = tests
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/tests/progs/Makefile.in b/tests/progs/Makefile.in
index b0ed853f8..e1325c619 100644
--- a/tests/progs/Makefile.in
+++ b/tests/progs/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ../..
my_dir = tests/progs
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
@MCONFIG@
diff --git a/util/Makefile.in b/util/Makefile.in
index a3df17e45..7ad18c0aa 100644
--- a/util/Makefile.in
+++ b/util/Makefile.in
@@ -8,6 +8,7 @@ VPATH = @srcdir@
top_builddir = ..
my_dir = util
INSTALL = @INSTALL@
+MKDIR_P = @MKDIR_P@
SRCS = $(srcdir)/subst.c $(srcdir)/mkutf8data.c