diff --git a/.e2fsprogs.metadata b/.e2fsprogs.metadata new file mode 100644 index 0000000..ab7c432 --- /dev/null +++ b/.e2fsprogs.metadata @@ -0,0 +1 @@ +af55e3b6ca87773fd9f76db0e59519dcfc2fdb13 SOURCES/e2fsprogs-1.42.9.tar.xz diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..547de4d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/e2fsprogs-1.42.9.tar.xz diff --git a/README.md b/README.md deleted file mode 100644 index 0e7897f..0000000 --- a/README.md +++ /dev/null @@ -1,5 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 - -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/e2fsck.conf b/SOURCES/e2fsck.conf new file mode 100644 index 0000000..b774f9e --- /dev/null +++ b/SOURCES/e2fsck.conf @@ -0,0 +1,3 @@ +[options] +# This will prevent e2fsck from stopping boot just because the clock is wrong +broken_system_clock = 1 diff --git a/SOURCES/e2fsprogs-1.40.4-sb_feature_check_ignore.patch b/SOURCES/e2fsprogs-1.40.4-sb_feature_check_ignore.patch new file mode 100644 index 0000000..0630a68 --- /dev/null +++ b/SOURCES/e2fsprogs-1.40.4-sb_feature_check_ignore.patch @@ -0,0 +1,35 @@ +Index: e2fsprogs-1.41.5/e2fsck/super.c +=================================================================== +--- e2fsprogs-1.41.5.orig/e2fsck/super.c ++++ e2fsprogs-1.41.5/e2fsck/super.c +@@ -869,7 +869,11 @@ void check_super_block(e2fsck_t ctx) + * unfortunately, we shouldn't ignore it since if it's not set in the + * backup, the extended attributes in the filesystem will be stripped + * away. ++ * ++ * Well, I'm still going that route for now, 'til I do something ++ * better. Full-fsck after a fresh install is just no good. -ERS + */ ++#define FEATURE_COMPAT_IGNORE (EXT2_FEATURE_COMPAT_EXT_ATTR) + #define FEATURE_RO_COMPAT_IGNORE (EXT2_FEATURE_RO_COMPAT_LARGE_FILE| \ + EXT4_FEATURE_RO_COMPAT_DIR_NLINK) + #define FEATURE_INCOMPAT_IGNORE (EXT3_FEATURE_INCOMPAT_EXTENTS| \ +@@ -921,6 +925,9 @@ int check_backup_super_block(e2fsck_t ct + (EXT2_INODE_SIZE(backup_sb) < EXT2_GOOD_OLD_INODE_SIZE)) + continue; + ++#define SUPER_COMPAT_DIFFERENT(x) \ ++ ((fs->super->x & ~FEATURE_COMPAT_IGNORE) != \ ++ (backup_sb->x & ~FEATURE_COMPAT_IGNORE)) + #define SUPER_INCOMPAT_DIFFERENT(x) \ + ((fs->super->x & ~FEATURE_INCOMPAT_IGNORE) != \ + (backup_sb->x & ~FEATURE_INCOMPAT_IGNORE)) +@@ -930,7 +937,7 @@ int check_backup_super_block(e2fsck_t ct + #define SUPER_DIFFERENT(x) \ + (fs->super->x != backup_sb->x) + +- if (SUPER_DIFFERENT(s_feature_compat) || ++ if (SUPER_COMPAT_DIFFERENT(s_feature_compat) || + SUPER_INCOMPAT_DIFFERENT(s_feature_incompat) || + SUPER_RO_COMPAT_DIFFERENT(s_feature_ro_compat) || + SUPER_DIFFERENT(s_blocks_count) || diff --git a/SOURCES/e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch b/SOURCES/e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch new file mode 100644 index 0000000..7b0a257 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch @@ -0,0 +1,31 @@ +From 6883c622c9971fb8f9fb6d5a8839fc2b0199d918 Mon Sep 17 00:00:00 2001 +From: Theodore Ts'o +Date: Thu, 10 Jul 2014 00:47:40 -0400 +Subject: [PATCH] Fix nroff macro issue in chattr man page + +The single quote character must not be in the first character in a +line, or else it can get mistaken as a macro call. + +Signed-off-by: Theodore Ts'o +--- + misc/chattr.1.in | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/misc/chattr.1.in b/misc/chattr.1.in +index 23b6938..75b3ed8 100644 +--- a/misc/chattr.1.in ++++ b/misc/chattr.1.in +@@ -22,8 +22,8 @@ changes the file attributes on a Linux file system. + The format of a symbolic mode is +-=[aAcCdDeijsStTu]. + .PP + The operator '+' causes the selected attributes to be added to the +-existing attributes of the files; '-' causes them to be removed; and +-'=' causes them to be the only attributes that the files have. ++existing attributes of the files; '-' causes them to be removed; and '=' ++causes them to be the only attributes that the files have. + .PP + The letters 'aAcCdDeijsStTu' select the new attributes for the files: + append only (a), +-- +2.7.4 + diff --git a/SOURCES/e2fsprogs-1.42.9-add-revision-to-the-is_before_linux_ver.patch b/SOURCES/e2fsprogs-1.42.9-add-revision-to-the-is_before_linux_ver.patch new file mode 100644 index 0000000..b6ec7c4 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-add-revision-to-the-is_before_linux_ver.patch @@ -0,0 +1,59 @@ +From b78d235914708decce36519e1a65705ba4f04cdb Mon Sep 17 00:00:00 2001 +From: Lukas Czerner +Date: Mon, 24 Feb 2014 18:41:05 +0100 +Subject: [PATCH 2/8] mke2fs: Add revision to the is_before_linux_ver() + +Signed-off-by: Lukas Czerner +--- + misc/mke2fs.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/misc/mke2fs.c b/misc/mke2fs.c +index 2afcb05..e970bbe 100644 +--- a/misc/mke2fs.c ++++ b/misc/mke2fs.c +@@ -172,7 +172,8 @@ static int parse_version_number(const char *s) + return KERNEL_VERSION(major, minor, rev); + } + +-static int is_before_linux_ver(unsigned int major, unsigned int minor) ++static int is_before_linux_ver(unsigned int major, unsigned int minor, ++ unsigned int rev) + { + struct utsname ut; + static int linux_version_code = -1; +@@ -186,10 +187,11 @@ static int is_before_linux_ver(unsigned int major, unsigned int minor) + if (linux_version_code == 0) + return 0; + +- return linux_version_code < KERNEL_VERSION(major, minor, 0); ++ return linux_version_code < KERNEL_VERSION(major, minor, rev); + } + #else +-static int is_before_linux_ver(unsigned int major, unsigned int minor) ++static int is_before_linux_ver(unsigned int major, unsigned int minor, ++ unsigned int rev) + { + return 0; + } +@@ -1394,7 +1396,7 @@ profile_error: + memset(&fs_param, 0, sizeof(struct ext2_super_block)); + fs_param.s_rev_level = 1; /* Create revision 1 filesystems now */ + +- if (is_before_linux_ver(2, 2)) ++ if (is_before_linux_ver(2, 2, 0)) + fs_param.s_rev_level = 0; + + if (argc && *argv) { +@@ -1803,7 +1805,7 @@ profile_error: + + if (use_bsize == -1) { + use_bsize = sys_page_size; +- if (is_before_linux_ver(2, 6) && use_bsize > 4096) ++ if (is_before_linux_ver(2, 6, 0) && use_bsize > 4096) + use_bsize = 4096; + } + if (lsector_size && use_bsize < lsector_size) +-- +1.8.3.1 + diff --git a/SOURCES/e2fsprogs-1.42.9-chattr-manpage-j-update.patch b/SOURCES/e2fsprogs-1.42.9-chattr-manpage-j-update.patch new file mode 100644 index 0000000..2895641 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-chattr-manpage-j-update.patch @@ -0,0 +1,38 @@ +commit c7c3775443ecd01ade5500e09191c5c4e94c2b56 +Author: Zheng Liu +Date: Wed Feb 12 12:28:29 2014 -0500 + + chattr: improve the description for 'j' option in manpage + + Ext4 file system also supports to set/clear 'j' attribute, but it just + say that this option is only useful for ext3 in manpage. This commit + fixes it. + + Signed-off-by: Zheng Liu + Signed-off-by: "Theodore Ts'o" + Reviewed-by: Carlos Maiolino + +diff --git a/misc/chattr.1.in b/misc/chattr.1.in +index 932ef4b..2a3640c 100644 +--- a/misc/chattr.1.in ++++ b/misc/chattr.1.in +@@ -112,8 +112,8 @@ to the file. Only the superuser or a process possessing the + CAP_LINUX_IMMUTABLE capability can set or clear this attribute. + .PP + A file with the `j' attribute has all of its data written to the ext3 +-journal before being written to the file itself, if the filesystem is +-mounted with the "data=ordered" or "data=writeback" options. When the ++or ext4 journal before being written to the file itself, if the filesystem ++is mounted with the "data=ordered" or "data=writeback" options. When the + filesystem is mounted with the "data=journal" option all file data + is already journalled and this attribute has no effect. Only + the superuser or a process possessing the CAP_SYS_RESOURCE +@@ -171,7 +171,7 @@ The `c', 's', and `u' attributes are not honored + by the ext2, ext3, and ext4 filesystems as implemented in the current + mainline Linux kernels. + .PP +-The `j' option is only useful if the filesystem is mounted as ext3. ++The `j' option is only useful if the filesystem is mounted as ext3 or ext4. + .PP + The `D' option is only useful on Linux kernel 2.5.19 and later. + .SH AVAILABILITY diff --git a/SOURCES/e2fsprogs-1.42.9-chattr-manpage-reorder.patch b/SOURCES/e2fsprogs-1.42.9-chattr-manpage-reorder.patch new file mode 100644 index 0000000..90ff8f5 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-chattr-manpage-reorder.patch @@ -0,0 +1,179 @@ +commit 5b9aaae742a79ef6001e58e5031b5f6ec03fe1ad +Author: Eric Sandeen +Date: Fri Jul 4 23:02:59 2014 -0400 + + e2fsprogs: reorder flags in chattr(1) + + The flags described in chattr usage() and the chattr(1) manpage + were in semi-random order, which makes it hard to ascertain + which flags might be missing or undocumented, and to locate + flags within the manpage. + + Re-order the list of flags in alphanumeric order, and do + the same for the flag descriptions in the body of the manpage. + + There should be no content changes here, just reordering + for consistency. + + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + Reviewed-by: Andreas Dilger + +diff --git a/misc/chattr.1.in b/misc/chattr.1.in +index 2a3640c..ce426e8 100644 +--- a/misc/chattr.1.in ++++ b/misc/chattr.1.in +@@ -19,24 +19,36 @@ chattr \- change file attributes on a Linux file system + .B chattr + changes the file attributes on a Linux file system. + .PP +-The format of a symbolic mode is +-=[acdeijstuACDST]. ++The format of a symbolic mode is +-=[aAcCdDeijsStTu]. + .PP + The operator `+' causes the selected attributes to be added to the + existing attributes of the files; `-' causes them to be removed; and + `=' causes them to be the only attributes that the files have. + .PP +-The letters `acdeijstuACDST' select the new attributes for the files: +-append only (a), compressed (c), no dump (d), extent format (e), immutable (i), +-data journalling (j), secure deletion (s), no tail-merging (t), +-undeletable (u), no atime updates (A), no copy on write (C), +-synchronous directory updates (D), synchronous updates (S), +-and top of directory hierarchy (T). ++The letters `aAcCdDeijsStTu' select the new attributes for the files: ++append only (a), ++no atime updates (A), ++compressed (c), ++no copy on write (C), ++no dump (d), ++synchronous directory updates (D), ++extent format (e), ++immutable (i), ++data journalling (j), ++secure deletion (s), ++synchronous updates (S), ++no tail-merging (t), ++top of directory hierarchy (T), ++and undeletable (u). + .PP + The following attributes are read-only, and may be listed by + .BR lsattr (1) +-but not modified by chattr: huge file (h), compression error (E), +-indexed directory (I), compression raw access (X), and compressed dirty +-file (Z). ++but not modified by chattr: ++compression error (E), ++huge file (h), ++indexed directory (I), ++compression raw access (X), ++and compressed dirty file (Z). + .SH OPTIONS + .TP + .B \-R +@@ -51,14 +63,14 @@ Suppress most error messages. + .BI \-v " version" + Set the file's version/generation number. + .SH ATTRIBUTES +-When a file with the 'A' attribute set is accessed, its atime record is +-not modified. This avoids a certain amount of disk I/O for laptop +-systems. +-.PP + A file with the `a' attribute set can only be open in append mode for writing. + Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE + capability can set or clear this attribute. + .PP ++When a file with the 'A' attribute set is accessed, its atime record is ++not modified. This avoids a certain amount of disk I/O for laptop ++systems. ++.PP + A file with the `c' attribute set is automatically compressed on the disk + by the kernel. A read from this file returns uncompressed data. A write to + this file compresses data before storing them on the disk. Note: please +@@ -74,27 +86,21 @@ be fully stable. If the 'C' flag is set on a directory, it will have no + effect on the directory, but new files created in that directory will + the No_COW attribute.) + .PP +-When a directory with the `D' attribute set is modified, +-the changes are written synchronously on the disk; this is equivalent to +-the `dirsync' mount option applied to a subset of the files. +-.PP + A file with the `d' attribute set is not candidate for backup when the + .BR dump (8) + program is run. + .PP +-The 'E' attribute is used by the experimental compression patches to +-indicate that a compressed file has a compression error. It may not be +-set or reset using +-.BR chattr (1), +-although it can be displayed by +-.BR lsattr (1). ++When a directory with the `D' attribute set is modified, ++the changes are written synchronously on the disk; this is equivalent to ++the `dirsync' mount option applied to a subset of the files. + .PP + The 'e' attribute indicates that the file is using extents for mapping + the blocks on disk. It may not be removed using + .BR chattr (1). + .PP +-The 'I' attribute is used by the htree code to indicate that a directory +-is being indexed using hashed trees. It may not be set or reset using ++The 'E' attribute is used by the experimental compression patches to ++indicate that a compressed file has a compression error. It may not be ++set or reset using + .BR chattr (1), + although it can be displayed by + .BR lsattr (1). +@@ -111,6 +117,12 @@ renamed, no link can be created to this file and no data can be written + to the file. Only the superuser or a process possessing the + CAP_LINUX_IMMUTABLE capability can set or clear this attribute. + .PP ++The 'I' attribute is used by the htree code to indicate that a directory ++is being indexed using hashed trees. It may not be set or reset using ++.BR chattr (1), ++although it can be displayed by ++.BR lsattr (1). ++.PP + A file with the `j' attribute has all of its data written to the ext3 + or ext4 journal before being written to the file itself, if the filesystem + is mounted with the "data=ordered" or "data=writeback" options. When the +@@ -127,6 +139,13 @@ When a file with the `S' attribute set is modified, + the changes are written synchronously on the disk; this is equivalent to + the `sync' mount option applied to a subset of the files. + .PP ++A file with the 't' attribute will not have a partial block fragment at ++the end of the file merged with other files (for those filesystems which ++support tail-merging). This is necessary for applications such as LILO ++which read the filesystem directly, and which don't understand tail-merged ++files. Note: As of this writing, the ext2 or ext3 filesystems do not ++(yet, except in very experimental patches) support tail-merging. ++.PP + A directory with the 'T' attribute will be deemed to be the top of + directory hierarchies for the purposes of the Orlov block allocator. + This is a hint to the block allocator used by ext3 and ext4 that the +@@ -137,13 +156,6 @@ and /home/mary are placed into separate block groups. For directories + where this attribute is not set, the Orlov block allocator will try to + group subdirectories closer together where possible. + .PP +-A file with the 't' attribute will not have a partial block fragment at +-the end of the file merged with other files (for those filesystems which +-support tail-merging). This is necessary for applications such as LILO +-which read the filesystem directly, and which don't understand tail-merged +-files. Note: As of this writing, the ext2 or ext3 filesystems do not +-(yet, except in very experimental patches) support tail-merging. +-.PP + When a file with the `u' attribute set is deleted, its contents are + saved. This allows the user to ask for its undeletion. Note: please + make sure to read the bugs and limitations section at the end of this +diff --git a/misc/chattr.c b/misc/chattr.c +index 39a6016..d5a6a61 100644 +--- a/misc/chattr.c ++++ b/misc/chattr.c +@@ -83,7 +83,7 @@ static unsigned long sf; + static void usage(void) + { + fprintf(stderr, +- _("Usage: %s [-RVf] [-+=AaCcDdeijsSu] [-v version] files...\n"), ++ _("Usage: %s [-RVf] [-+=aAcCdDeijsSu] [-v version] files...\n"), + program_name); + exit(1); + } diff --git a/SOURCES/e2fsprogs-1.42.9-chattr-manpage-update.patch b/SOURCES/e2fsprogs-1.42.9-chattr-manpage-update.patch new file mode 100644 index 0000000..14de408 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-chattr-manpage-update.patch @@ -0,0 +1,191 @@ +commit 272258e1dffe8afb6c9d0b0ba5edc119dbf9f52a +Author: Eric Sandeen +Date: Fri Jul 4 23:03:14 2014 -0400 + + e2fsprogs: revise and extend chattr(1) and chattr usage() + + The chattr(1) manpage and chattr usage() output were missing some flags. + + Add those, and make some other minor cosmetic fixes. + + (I've left out the 'B' (EXT2_COMPRBLK_FL) flag, because + it's not actually used anywhere, and I can't figure out + how it differs from 'c' (EXT2_COMPR_FL)) + + Also, because the matrix of filesystems & flags is quite large, + refer to filesystem-specific manpages for detailed discussion + of flags supported by those filesystems, rather than trying to + cover it all in this manpage. I'll send those manpage + updates to the appropriate lists a bit later. + + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + Reviewed-by: Andreas Dilger + +diff --git a/misc/chattr.1.in b/misc/chattr.1.in +index ce426e8..23b6938 100644 +--- a/misc/chattr.1.in ++++ b/misc/chattr.1.in +@@ -21,11 +21,11 @@ changes the file attributes on a Linux file system. + .PP + The format of a symbolic mode is +-=[aAcCdDeijsStTu]. + .PP +-The operator `+' causes the selected attributes to be added to the +-existing attributes of the files; `-' causes them to be removed; and +-`=' causes them to be the only attributes that the files have. ++The operator '+' causes the selected attributes to be added to the ++existing attributes of the files; '-' causes them to be removed; and ++'=' causes them to be the only attributes that the files have. + .PP +-The letters `aAcCdDeijsStTu' select the new attributes for the files: ++The letters 'aAcCdDeijsStTu' select the new attributes for the files: + append only (a), + no atime updates (A), + compressed (c), +@@ -47,8 +47,17 @@ but not modified by chattr: + compression error (E), + huge file (h), + indexed directory (I), ++inline data (N), + compression raw access (X), + and compressed dirty file (Z). ++.PP ++Not all flags are supported or utilized by all filesystems; refer to ++filesystem-specific man pages such as ++.BR btrfs (5), ++.BR ext4 (5), ++and ++.BR xfs (5) ++for more filesystem-specific details. + .SH OPTIONS + .TP + .B \-R +@@ -63,7 +72,7 @@ Suppress most error messages. + .BI \-v " version" + Set the file's version/generation number. + .SH ATTRIBUTES +-A file with the `a' attribute set can only be open in append mode for writing. ++A file with the 'a' attribute set can only be open in append mode for writing. + Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE + capability can set or clear this attribute. + .PP +@@ -71,7 +80,7 @@ When a file with the 'A' attribute set is accessed, its atime record is + not modified. This avoids a certain amount of disk I/O for laptop + systems. + .PP +-A file with the `c' attribute set is automatically compressed on the disk ++A file with the 'c' attribute set is automatically compressed on the disk + by the kernel. A read from this file returns uncompressed data. A write to + this file compresses data before storing them on the disk. Note: please + make sure to read the bugs and limitations section at the end of this +@@ -86,13 +95,13 @@ be fully stable. If the 'C' flag is set on a directory, it will have no + effect on the directory, but new files created in that directory will + the No_COW attribute.) + .PP +-A file with the `d' attribute set is not candidate for backup when the ++A file with the 'd' attribute set is not candidate for backup when the + .BR dump (8) + program is run. + .PP +-When a directory with the `D' attribute set is modified, ++When a directory with the 'D' attribute set is modified, + the changes are written synchronously on the disk; this is equivalent to +-the `dirsync' mount option applied to a subset of the files. ++the 'dirsync' mount option applied to a subset of the files. + .PP + The 'e' attribute indicates that the file is using extents for mapping + the blocks on disk. It may not be removed using +@@ -112,7 +121,7 @@ is (or at one time was) larger than 2TB. It may not be set or reset using + although it can be displayed by + .BR lsattr (1). + .PP +-A file with the `i' attribute cannot be modified: it cannot be deleted or ++A file with the 'i' attribute cannot be modified: it cannot be deleted or + renamed, no link can be created to this file and no data can be written + to the file. Only the superuser or a process possessing the + CAP_LINUX_IMMUTABLE capability can set or clear this attribute. +@@ -123,7 +132,7 @@ is being indexed using hashed trees. It may not be set or reset using + although it can be displayed by + .BR lsattr (1). + .PP +-A file with the `j' attribute has all of its data written to the ext3 ++A file with the 'j' attribute has all of its data written to the ext3 + or ext4 journal before being written to the file itself, if the filesystem + is mounted with the "data=ordered" or "data=writeback" options. When the + filesystem is mounted with the "data=journal" option all file data +@@ -131,13 +140,19 @@ is already journalled and this attribute has no effect. Only + the superuser or a process possessing the CAP_SYS_RESOURCE + capability can set or clear this attribute. + .PP +-When a file with the `s' attribute set is deleted, its blocks are zeroed ++A file with the 'N' attribute set indicates that the file has data ++stored inline, within the inode itself. It may not be set or reset using ++.BR chattr (1), ++although it can be displayed by ++.BR lsattr (1). ++.PP ++When a file with the 's' attribute set is deleted, its blocks are zeroed + and written back to the disk. Note: please make sure to read the bugs + and limitations section at the end of this document. + .PP +-When a file with the `S' attribute set is modified, ++When a file with the 'S' attribute set is modified, + the changes are written synchronously on the disk; this is equivalent to +-the `sync' mount option applied to a subset of the files. ++the 'sync' mount option applied to a subset of the files. + .PP + A file with the 't' attribute will not have a partial block fragment at + the end of the file merged with other files (for those filesystems which +@@ -156,13 +171,13 @@ and /home/mary are placed into separate block groups. For directories + where this attribute is not set, the Orlov block allocator will try to + group subdirectories closer together where possible. + .PP +-When a file with the `u' attribute set is deleted, its contents are ++When a file with the 'u' attribute set is deleted, its contents are + saved. This allows the user to ask for its undeletion. Note: please + make sure to read the bugs and limitations section at the end of this + document. + .PP + The 'X' attribute is used by the experimental compression patches to +-indicate that a raw contents of a compressed file can be accessed ++indicate that the raw contents of a compressed file can be accessed + directly. It currently may not be set or reset using + .BR chattr (1), + although it can be displayed by +@@ -179,16 +194,19 @@ although it can be displayed by + was written by Remy Card . It is currently being + maintained by Theodore Ts'o . + .SH BUGS AND LIMITATIONS +-The `c', 's', and `u' attributes are not honored ++The 'c', 's', and 'u' attributes are not honored + by the ext2, ext3, and ext4 filesystems as implemented in the current + mainline Linux kernels. + .PP +-The `j' option is only useful if the filesystem is mounted as ext3 or ext4. ++The 'j' option is only useful if the filesystem is mounted as ext3 or ext4. + .PP +-The `D' option is only useful on Linux kernel 2.5.19 and later. ++The 'D' option is only useful on Linux kernel 2.5.19 and later. + .SH AVAILABILITY + .B chattr + is part of the e2fsprogs package and is available from + http://e2fsprogs.sourceforge.net. + .SH SEE ALSO +-.BR lsattr (1) ++.BR lsattr (1), ++.BR btrfs (5), ++.BR ext4 (5), ++.BR xfs (5). +diff --git a/misc/chattr.c b/misc/chattr.c +index d5a6a61..f130108 100644 +--- a/misc/chattr.c ++++ b/misc/chattr.c +@@ -83,7 +83,7 @@ static unsigned long sf; + static void usage(void) + { + fprintf(stderr, +- _("Usage: %s [-RVf] [-+=aAcCdDeijsSu] [-v version] files...\n"), ++ _("Usage: %s [-RVf] [-+=aAcCdDeijsStTu] [-v version] files...\n"), + program_name); + exit(1); + } diff --git a/SOURCES/e2fsprogs-1.42.9-defrag-backwards-files.patch b/SOURCES/e2fsprogs-1.42.9-defrag-backwards-files.patch new file mode 100644 index 0000000..9d71f5d --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-defrag-backwards-files.patch @@ -0,0 +1,39 @@ +commit c7c539e8fd86de691475eea00409c6c030f312cd +Author: Darrick J. Wong +Date: Tue Jul 22 12:40:56 2014 -0400 + + e4defrag: backwards-allocated files should be defragmented too + + Currently, e4defrag avoids increasing file fragmentation by comparing + the number of runs of physical extents of both the original and the + donor files. Unfortunately, there is a bug in the routine that counts + physical extents, since it doesn't look at the logical block offsets + of the extents. Therefore, a file whose blocks were allocated in + reverse order will be seen as only having one big physical extent, and + therefore will not be defragmented. + + Fix the counting routine to consider logical extent offset so that we + defragment backwards-allocated files. This could be problematic if we + ever gain the ability to lay out logically sparse extents in a + physically contiguous manner, but presumably one wouldn't call defrag + on such a file. + + Reported-by: Xiaoguang Wang + Signed-off-by: Darrick J. Wong + Signed-off-by: Theodore Ts'o + +Index: e2fsprogs-1.42.9/misc/e4defrag.c +=================================================================== +--- e2fsprogs-1.42.9.orig/misc/e4defrag.c ++++ e2fsprogs-1.42.9/misc/e4defrag.c +@@ -941,7 +941,9 @@ static int get_physical_count(struct fie + + do { + if ((ext_list_tmp->data.physical + ext_list_tmp->data.len) +- != ext_list_tmp->next->data.physical) { ++ != ext_list_tmp->next->data.physical || ++ (ext_list_tmp->data.logical + ext_list_tmp->data.len) ++ != ext_list_tmp->next->data.logical) { + /* This extent and next extent are not continuous. */ + ret++; + } diff --git a/SOURCES/e2fsprogs-1.42.9-disable-resize_inode-feature-if-64bit-feature-is-enabled.patch b/SOURCES/e2fsprogs-1.42.9-disable-resize_inode-feature-if-64bit-feature-is-enabled.patch new file mode 100644 index 0000000..c4c8ea4 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-disable-resize_inode-feature-if-64bit-feature-is-enabled.patch @@ -0,0 +1,53 @@ +From ca35619b7209a50ee0fd1f2799cbe232277f39cc Mon Sep 17 00:00:00 2001 +From: Eryu Guan +Date: Thu, 4 Jul 2013 17:05:10 +0800 +Subject: [PATCH 3/8] mke2fs: disable resize_inode feature if 64bit feature is + enabled + +Since auto_64-bit_support is on by default, resize_inode feature will +be disabled when creating a >16T ext4 according to mke2fs.conf(5). + +This should also be done when making ext4 with "-O 64bit" to enable +64bit feature explicitly. Otherwise online resize to enlarge a +over-16T fs to larger would fail. + +[root@localhost resize]# truncate -s 50t fs.img +[root@localhost resize]# losetup /dev/loop0 fs.img +[root@localhost resize]# mkfs -t ext4 -O 64bit /dev/loop0 30t +[root@localhost resize]# mount /dev/loop0 mnt +[root@localhost resize]# resize2fs /dev/loop0 +resize2fs 1.42.7 (21-Jan-2013) +Filesystem at /dev/loop0 is mounted on /root/resize/mnt; on-line resizing required +old_desc_blocks = 3840, new_desc_blocks = 6400 +resize2fs: Invalid argument While checking for on-line resizing support + +And dmesg shows +[688378.442623] EXT4-fs (loop0): resizing filesystem from 6710886400 to 13421772800 blocks +[688378.443216] EXT4-fs warning (device loop0): verify_reserved_gdb:700: reserved GDT 3201 missing grp 177147 (5804756097) +[688378.443222] EXT4-fs (loop0): resized filesystem to 8858370048 +[688378.528451] EXT4-fs warning (device loop0): ext4_group_extend:1710: can't shrink FS - resize aborted + +With this fix resize2fs could do the online enlarge correctly. + +Signed-off-by: Eryu Guan +--- + misc/mke2fs.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/misc/mke2fs.c b/misc/mke2fs.c +index e970bbe..76ea60b 100644 +--- a/misc/mke2fs.c ++++ b/misc/mke2fs.c +@@ -1836,6 +1836,9 @@ profile_error: + * 32-bit vs 64-bit block number support. + */ + if ((fs_blocks_count > MAX_32_NUM) && ++ (fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT)) ++ fs_param.s_feature_compat &= ~EXT2_FEATURE_COMPAT_RESIZE_INODE; ++ if ((fs_blocks_count > MAX_32_NUM) && + !(fs_param.s_feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) && + get_bool_from_profile(fs_types, "auto_64-bit_support", 0)) { + fs_param.s_feature_incompat |= EXT4_FEATURE_INCOMPAT_64BIT; +-- +1.8.3.1 + diff --git a/SOURCES/e2fsprogs-1.42.9-dont-require-fsck-for-resize-p.patch b/SOURCES/e2fsprogs-1.42.9-dont-require-fsck-for-resize-p.patch new file mode 100644 index 0000000..bd83c4e --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-dont-require-fsck-for-resize-p.patch @@ -0,0 +1,59 @@ +commit 0462fd6db55de28d7e087d8d06ab20339acd8f67 +Author: Eric Sandeen +Date: Sun Dec 14 19:08:59 2014 -0500 + + resize2fs: don't require fsck to print min size + + My previous change ended up requiring that the filesystem + be fsck'd after the last mount, even if we are only querying + the minimum size. This is a bit draconian, and it burned + the Fedora installer, which wants to calculate minimum size + for every filesystem in the box at install time, which in turn + requires a full fsck of every filesystem. + + Try this one more time, and separate out the tests to make things + a bit more clear. If we're only printing the min size, don't + require the fsck, as this is a bit less dangerous/critical. + + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + +Index: e2fsprogs-1.42.9/resize/main.c +=================================================================== +--- e2fsprogs-1.42.9.orig/resize/main.c ++++ e2fsprogs-1.42.9/resize/main.c +@@ -319,10 +319,30 @@ int main (int argc, char ** argv) + exit (1); + } + +- if (!(mount_flags & EXT2_MF_MOUNTED)) { +- if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) || +- (fs->super->s_state & EXT2_ERROR_FS) || +- ((fs->super->s_state & EXT2_VALID_FS) == 0))) { ++ /* ++ * Before acting on an unmounted filesystem, make sure it's ok, ++ * unless the user is forcing it. ++ * ++ * We do ERROR and VALID checks even if we're only printing the ++ * minimimum size, because traversal of a badly damaged filesystem ++ * can cause issues as well. We don't require it to be fscked after ++ * the last mount time in this case, though, as this is a bit less ++ * risky. ++ */ ++ if (!force && !(mount_flags & EXT2_MF_MOUNTED)) { ++ int checkit = 0; ++ ++ if (fs->super->s_state & EXT2_ERROR_FS) ++ checkit = 1; ++ ++ if ((fs->super->s_state & EXT2_VALID_FS) == 0) ++ checkit = 1; ++ ++ if ((fs->super->s_lastcheck < fs->super->s_mtime) && ++ !print_min_size) ++ checkit = 1; ++ ++ if (checkit) { + fprintf(stderr, + _("Please run 'e2fsck -f %s' first.\n\n"), + device_name); diff --git a/SOURCES/e2fsprogs-1.42.9-enable-64bit-feature-by-default.patch b/SOURCES/e2fsprogs-1.42.9-enable-64bit-feature-by-default.patch new file mode 100644 index 0000000..42ee5cc --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-enable-64bit-feature-by-default.patch @@ -0,0 +1,32 @@ +From 9e15f8af7ce0fef4d588ffdceb1adea9e6f4b57c Mon Sep 17 00:00:00 2001 +From: Lukas Czerner +Date: Fri, 21 Jun 2013 16:42:27 +0200 +Subject: [PATCH 5/8] mke2fs.conf: Enable 64bit feature by default + +The 64bit feature has been added to the ext4 a long time ago (2006?) so +it should be ok to enable it by default by now. This would allow us to +resize the file system past 16TB when it was originally smaller than +that and user did not specified 64bit feature manually. + +Signed-off-by: Lukas Czerner +--- + misc/mke2fs.conf.in | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/misc/mke2fs.conf.in b/misc/mke2fs.conf.in +index 0871f77..667800c 100644 +--- a/misc/mke2fs.conf.in ++++ b/misc/mke2fs.conf.in +@@ -11,8 +11,7 @@ + features = has_journal + } + ext4 = { +- features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize +- auto_64-bit_support = 1 ++ features = has_journal,extent,huge_file,flex_bg,uninit_bg,dir_nlink,extra_isize,64bit + inode_size = 256 + } + ext4dev = { +-- +1.8.3.1 + diff --git a/SOURCES/e2fsprogs-1.42.9-enable-lazy_itable_init-on-newer-kernel-by-default.patch b/SOURCES/e2fsprogs-1.42.9-enable-lazy_itable_init-on-newer-kernel-by-default.patch new file mode 100644 index 0000000..aa9ebdb --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-enable-lazy_itable_init-on-newer-kernel-by-default.patch @@ -0,0 +1,45 @@ +From 165af99c57a686444167fcef56f9fae31d815887 Mon Sep 17 00:00:00 2001 +From: Lukas Czerner +Date: Mon, 24 Feb 2014 18:41:06 +0100 +Subject: [PATCH 4/8] mke2fs: Enable lazy_itable_init on newer kernel by + default + +Currently is used did not specified lazy_itable_init option we rely on +information from ext4 module exported via sysfs interface. However if +the ext4 module is not loaded it will not be enabled even though kernel +might support it. + +With this commit we set the default according to the kernel version, +however we still allow it to be set manually via extended option or be +enabled in case that ext4 module advertise that it supports this +feature. + +Signed-off-by: Lukas Czerner +--- + misc/mke2fs.c | 10 +++++++++- + 1 file changed, 9 insertions(+), 1 deletion(-) + +diff --git a/misc/mke2fs.c b/misc/mke2fs.c +index 76ea60b..23a988e 100644 +--- a/misc/mke2fs.c ++++ b/misc/mke2fs.c +@@ -1998,7 +1998,15 @@ profile_error: + blocksize, sys_page_size); + } + +- lazy_itable_init = 0; ++ /* ++ * On newer kernels we do have lazy_itable_init support. So pick the ++ * right default in case ext4 module is not loaded. ++ */ ++ if (is_before_linux_ver(2, 6, 37)) ++ lazy_itable_init = 0; ++ else ++ lazy_itable_init = 1; ++ + if (access("/sys/fs/ext4/features/lazy_itable_init", R_OK) == 0) + lazy_itable_init = 1; + +-- +1.8.3.1 + diff --git a/SOURCES/e2fsprogs-1.42.9-ext4-manpage-add-attrs.patch b/SOURCES/e2fsprogs-1.42.9-ext4-manpage-add-attrs.patch new file mode 100644 index 0000000..268f08f --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-ext4-manpage-add-attrs.patch @@ -0,0 +1,67 @@ +commit e92beaac1017b5cc6a73ddb88aeab7b33f714e8b +Author: Eric Sandeen +Date: Mon Aug 25 21:02:18 2014 -0400 + + e2fsprogs: add supported file attributes to ext4.5 manpage + + The chattr(1) manpage now refers users to filesystem-specific + manpages for details on supported attributes, so add those to + ext4.5. + + I've left out oddities like being able to set the compressed + or no-tail-packing flags, or setting data journaling on ext2. + + That behavior seems like a bug, not a feature. + + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + +diff --git a/misc/ext4.5.in b/misc/ext4.5.in +index 9112b3d..a862a34 100644 +--- a/misc/ext4.5.in ++++ b/misc/ext4.5.in +@@ -608,6 +608,37 @@ seriously cramp the system's style.) + .B i_version + Enable 64-bit inode version support. This option is off by default. + ++.SH FILE ATTRIBUTES ++The ext2, ext3, and ext4 filesystems support setting the following file ++attributes on Linux systems using the ++.BR chattr (1) ++utility: ++.sp ++.BR a " - append only" ++.sp ++.BR A " - no atime updates" ++.sp ++.BR d " - no dump" ++.sp ++.BR D " - synchronous directory updates" ++.sp ++.BR i " - immutable" ++.sp ++.BR S " - synchronous updates" ++.sp ++.BR u " - undeletable" ++.sp ++In addition, the ext3 and ext4 filesystems support the following flag: ++.sp ++.BR j " - data journaling" ++.sp ++Finally, the ext4 filesystem also supports the following flag: ++.sp ++.BR e " - extents format" ++.sp ++For descriptions of these attribute flags, please refer to the ++.BR chattr (1) ++man page. + .SH SEE ALSO + .BR mke2fs (8), + .BR mke2fs.conf (5), +@@ -615,4 +646,5 @@ Enable 64-bit inode version support. This option is off by default. + .BR dumpe2fs (8), + .BR tune2fs (8), + .BR debugfs (8), +-.BR mount (8) ++.BR mount (8), ++.BR chattr (1) diff --git a/SOURCES/e2fsprogs-1.42.9-ext4-manpage-add-mountopts.patch b/SOURCES/e2fsprogs-1.42.9-ext4-manpage-add-mountopts.patch new file mode 100644 index 0000000..156d146 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-ext4-manpage-add-mountopts.patch @@ -0,0 +1,394 @@ +commit 3e500a8f116b0515d1507fe0ab4bf617664a6cdc +Author: Eric Sandeen +Date: Fri Jul 4 23:07:36 2014 -0400 + + e2fsprogs: add mount options to ext4.5 + + This is a straight cut and paste from the util-linux + mount manpage to ext4.5 (with commented-out lines + removed). + + It's pretty much impossible for util-linux to keep up + with every filesystem out there, and Karel has more than + once expressed a wish that mount options move into fs-specific + manpages. + + So, here we go. + + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + +diff --git a/misc/ext4.5.in b/misc/ext4.5.in +index 134c19f..9112b3d 100644 +--- a/misc/ext4.5.in ++++ b/misc/ext4.5.in +@@ -251,10 +251,368 @@ and it also speeds up the time required for + .BR mke2fs (8) + to create the file system. + .RE ++.SH MOUNT OPTIONS ++This section describes mount options which are specific to ext2, ext3, ++and ext4. Other generic mount options may be used as well; see ++.BR mount (8) ++for details. ++.SH "Mount options for ext2" ++The `ext2' filesystem is the standard Linux filesystem. ++Since Linux 2.5.46, for most mount options the default ++is determined by the filesystem superblock. Set them with ++.BR tune2fs (8). ++.TP ++.BR acl | noacl ++Support POSIX Access Control Lists (or not). ++.TP ++.BR bsddf | minixdf ++Set the behavior for the ++.I statfs ++system call. The ++.B minixdf ++behavior is to return in the ++.I f_blocks ++field the total number of blocks of the filesystem, while the ++.B bsddf ++behavior (which is the default) is to subtract the overhead blocks ++used by the ext2 filesystem and not available for file storage. Thus ++.sp 1 ++% mount /k \-o minixdf; df /k; umount /k ++.TS ++tab(#); ++l2 l2 r2 l2 l2 l ++l c r c c l. ++Filesystem#1024-blocks#Used#Available#Capacity#Mounted on ++/dev/sda6#2630655#86954#2412169#3%#/k ++.TE ++.sp 1 ++% mount /k \-o bsddf; df /k; umount /k ++.TS ++tab(#); ++l2 l2 r2 l2 l2 l ++l c r c c l. ++Filesystem#1024-blocks#Used#Available#Capacity#Mounted on ++/dev/sda6#2543714#13#2412169#0%#/k ++.TE ++.sp 1 ++(Note that this example shows that one can add command line options ++to the options given in ++.IR /etc/fstab .) ++.TP ++.BR check=none " or " nocheck ++No checking is done at mount time. This is the default. This is fast. ++It is wise to invoke ++.BR e2fsck (8) ++every now and then, e.g.\& at boot time. The non-default behavior is unsupported ++(check=normal and check=strict options have been removed). Note that these mount options ++don't have to be supported if ext4 kernel driver is used for ext2 and ext3 filesystems. ++.TP ++.B debug ++Print debugging info upon each (re)mount. ++.TP ++.BR errors= { continue | remount-ro | panic } ++Define the behavior when an error is encountered. ++(Either ignore errors and just mark the filesystem erroneous and continue, ++or remount the filesystem read-only, or panic and halt the system.) ++The default is set in the filesystem superblock, and can be ++changed using ++.BR tune2fs (8). ++.TP ++.BR grpid | bsdgroups " and " nogrpid | sysvgroups ++These options define what group id a newly created file gets. ++When ++.B grpid ++is set, it takes the group id of the directory in which it is created; ++otherwise (the default) it takes the fsgid of the current process, unless ++the directory has the setgid bit set, in which case it takes the gid ++from the parent directory, and also gets the setgid bit set ++if it is a directory itself. ++.TP ++.BR grpquota | noquota | quota | usrquota ++The usrquota (same as quota) mount option enables user quota support on the ++filesystem. grpquota enables group quotas support. You need the quota utilities ++to actually enable and manage the quota system. ++.TP ++.B nouid32 ++Disables 32-bit UIDs and GIDs. This is for interoperability with older ++kernels which only store and expect 16-bit values. ++.TP ++.BR oldalloc " or " orlov ++Use old allocator or Orlov allocator for new inodes. Orlov is default. ++.TP ++\fBresgid=\fP\,\fIn\fP and \fBresuid=\fP\,\fIn\fP ++The ext2 filesystem reserves a certain percentage of the available ++space (by default 5%, see ++.BR mke2fs (8) ++and ++.BR tune2fs (8)). ++These options determine who can use the reserved blocks. ++(Roughly: whoever has the specified uid, or belongs to the specified group.) ++.TP ++.BI sb= n ++Instead of block 1, use block ++.I n ++as superblock. This could be useful when the filesystem has been damaged. ++(Earlier, copies of the superblock would be made every 8192 blocks: in ++block 1, 8193, 16385, \&...\& (and one got thousands of copies on ++a big filesystem). Since version 1.08, ++.B mke2fs ++has a \-s (sparse superblock) option to reduce the number of backup ++superblocks, and since version 1.15 this is the default. Note ++that this may mean that ext2 filesystems created by a recent ++.B mke2fs ++cannot be mounted r/w under Linux 2.0.*.) ++The block number here uses 1\ k units. Thus, if you want to use logical ++block 32768 on a filesystem with 4\ k blocks, use "sb=131072". ++.TP ++.BR user_xattr | nouser_xattr ++Support "user." extended attributes (or not). ++ ++ ++.SH "Mount options for ext3" ++The ext3 filesystem is a version of the ext2 filesystem which has been ++enhanced with journaling. It supports the same options as ext2 as ++well as the following additions: ++.TP ++.B journal=update ++Update the ext3 filesystem's journal to the current format. ++.TP ++.B journal=inum ++When a journal already exists, this option is ignored. Otherwise, it ++specifies the number of the inode which will represent the ext3 filesystem's ++journal file; ext3 will create a new journal, overwriting the old contents ++of the file whose inode number is ++.IR inum . ++.TP ++.BR journal_dev=devnum / journal_path=path ++When the external journal device's major/minor numbers ++have changed, these options allow the user to specify ++the new journal location. The journal device is ++identified either through its new major/minor numbers encoded ++in devnum, or via a path to the device. ++.TP ++.BR norecovery / noload ++Don't load the journal on mounting. Note that ++if the filesystem was not unmounted cleanly, ++skipping the journal replay will lead to the ++filesystem containing inconsistencies that can ++lead to any number of problems. ++.TP ++.BR data= { journal | ordered | writeback } ++Specifies the journaling mode for file data. Metadata is always journaled. ++To use modes other than ++.B ordered ++on the root filesystem, pass the mode to the kernel as boot parameter, e.g.\& ++.IR rootflags=data=journal . ++.RS ++.TP ++.B journal ++All data is committed into the journal prior to being written into the ++main filesystem. ++.TP ++.B ordered ++This is the default mode. All data is forced directly out to the main file ++system prior to its metadata being committed to the journal. ++.TP ++.B writeback ++Data ordering is not preserved \(en data may be written into the main ++filesystem after its metadata has been committed to the journal. ++This is rumoured to be the highest-throughput option. It guarantees ++internal filesystem integrity, however it can allow old data to appear ++in files after a crash and journal recovery. ++.RE ++.TP ++.B data_err=ignore ++Just print an error message if an error occurs in a file data buffer in ++ordered mode. ++.TP ++.B data_err=abort ++Abort the journal if an error occurs in a file data buffer in ordered mode. ++.TP ++.BR barrier=0 " / " barrier=1 " ++This disables / enables the use of write barriers in the jbd code. barrier=0 ++disables, barrier=1 enables (default). This also requires an IO stack which can ++support barriers, and if jbd gets an error on a barrier write, it will disable ++barriers again with a warning. Write barriers enforce proper on-disk ordering ++of journal commits, making volatile disk write caches safe to use, at some ++performance penalty. If your disks are battery-backed in one way or another, ++disabling barriers may safely improve performance. ++.TP ++.BI commit= nrsec ++Sync all data and metadata every ++.I nrsec ++seconds. The default value is 5 seconds. Zero means default. ++.TP ++.B user_xattr ++Enable Extended User Attributes. See the ++.BR attr (5) ++manual page. ++.TP ++.B acl ++Enable POSIX Access Control Lists. See the ++.BR acl (5) ++manual page. ++.TP ++.BR usrjquota=aquota.user | grpjquota=aquota.group | jqfmt=vfsv0 ++Apart from the old quota system (as in ext2, jqfmt=vfsold aka version 1 quota) ++ext3 also supports journaled quotas (version 2 quota). jqfmt=vfsv0 ++enables journaled quotas. For journaled quotas the mount options ++usrjquota=aquota.user and grpjquota=aquota.group are required to tell the ++quota system which quota database files to use. Journaled quotas have the ++advantage that even after a crash no quota check is required. ++ ++.SH "Mount options for ext4" ++The ext4 filesystem is an advanced level of the ext3 filesystem which ++incorporates scalability and reliability enhancements for supporting large ++filesystem. ++ ++The options ++.B journal_dev, norecovery, noload, data, commit, orlov, oldalloc, [no]user_xattr ++.B [no]acl, bsddf, minixdf, debug, errors, data_err, grpid, bsdgroups, nogrpid ++.B sysvgroups, resgid, resuid, sb, quota, noquota, grpquota, usrquota ++.B usrjquota, grpjquota and jqfmt ++are backwardly compatible with ext3 or ext2. ++.TP ++.B journal_checksum ++Enable checksumming of the journal transactions. This will allow the recovery ++code in e2fsck and the kernel to detect corruption in the kernel. It is a ++compatible change and will be ignored by older kernels. ++.TP ++.B journal_async_commit ++Commit block can be written to disk without waiting for descriptor blocks. If ++enabled older kernels cannot mount the device. ++This will enable 'journal_checksum' internally. ++.TP ++.BR barrier=0 " / " barrier=1 " / " barrier " / " nobarrier ++These mount options have the same effect as in ext3. The mount options ++"barrier" and "nobarrier" are added for consistency with other ext4 mount ++options. ++ ++The ext4 filesystem enables write barriers by default. ++.TP ++.BI inode_readahead_blks= n ++This tuning parameter controls the maximum number of inode table blocks that ++ext4's inode table readahead algorithm will pre-read into the buffer cache. ++The value must be a power of 2. The default value is 32 blocks. ++.TP ++.BI stripe= n ++Number of filesystem blocks that mballoc will try to use for allocation size ++and alignment. For RAID5/6 systems this should be the number of data disks * ++RAID chunk size in filesystem blocks. ++.TP ++.B delalloc ++Deferring block allocation until write-out time. ++.TP ++.B nodelalloc ++Disable delayed allocation. Blocks are allocated when data is copied from user ++to page cache. ++.TP ++.BI max_batch_time= usec ++Maximum amount of time ext4 should wait for additional filesystem operations to ++be batch together with a synchronous write operation. Since a synchronous ++write operation is going to force a commit and then a wait for the I/O ++complete, it doesn't cost much, and can be a huge throughput win, we wait for a ++small amount of time to see if any other transactions can piggyback on the ++synchronous write. The algorithm used is designed to automatically tune for ++the speed of the disk, by measuring the amount of time (on average) that it ++takes to finish committing a transaction. Call this time the "commit time". ++If the time that the transaction has been running is less than the commit time, ++ext4 will try sleeping for the commit time to see if other operations will join ++the transaction. The commit time is capped by the max_batch_time, which ++defaults to 15000\ \[mc]s (15\ ms). This optimization can be turned off entirely by ++setting max_batch_time to 0. ++.TP ++.BI min_batch_time= usec ++This parameter sets the commit time (as described above) to be at least ++min_batch_time. It defaults to zero microseconds. Increasing this parameter ++may improve the throughput of multi-threaded, synchronous workloads on very ++fast disks, at the cost of increasing latency. ++.TP ++.BI journal_ioprio= prio ++The I/O priority (from 0 to 7, where 0 is the highest priority) which should be ++used for I/O operations submitted by kjournald2 during a commit operation. ++This defaults to 3, which is a slightly higher priority than the default I/O ++priority. ++.TP ++.B abort ++Simulate the effects of calling ext4_abort() for ++debugging purposes. This is normally used while ++remounting a filesystem which is already mounted. ++.TP ++.BR auto_da_alloc | noauto_da_alloc ++Many broken applications don't use fsync() when ++replacing existing files via patterns such as ++ ++fd = open("foo.new")/write(fd,...)/close(fd)/ rename("foo.new", "foo") ++ ++or worse yet ++ ++fd = open("foo", O_TRUNC)/write(fd,...)/close(fd). ++ ++If auto_da_alloc is enabled, ext4 will detect the replace-via-rename and ++replace-via-truncate patterns and force that any delayed allocation blocks are ++allocated such that at the next journal commit, in the default data=ordered ++mode, the data blocks of the new file are forced to disk before the rename() ++operation is committed. This provides roughly the same level of guarantees as ++ext3, and avoids the "zero-length" problem that can happen when a system ++crashes before the delayed allocation blocks are forced to disk. ++.TP ++.B noinit_itable ++Do not initialize any uninitialized inode table blocks in the background. This ++feature may be used by installation CD's so that the install process can ++complete as quickly as possible; the inode table initialization process would ++then be deferred until the next time the filesystem is mounted. ++.TP ++.B init_itable=n ++The lazy itable init code will wait n times the number of milliseconds it took ++to zero out the previous block group's inode table. This minimizes the impact on ++system performance while the filesystem's inode table is being initialized. ++.TP ++.BR discard / nodiscard ++Controls whether ext4 should issue discard/TRIM commands to the underlying ++block device when blocks are freed. This is useful for SSD devices and ++sparse/thinly-provisioned LUNs, but it is off by default until sufficient ++testing has been done. ++.TP ++.B nouid32 ++Disables 32-bit UIDs and GIDs. This is for ++interoperability with older kernels which only ++store and expect 16-bit values. ++.TP ++.BR block_validity / noblock_validity ++This options allows to enables/disables the in-kernel facility for tracking ++filesystem metadata blocks within internal data structures. This allows multi-\c ++block allocator and other routines to quickly locate extents which might ++overlap with filesystem metadata blocks. This option is intended for debugging ++purposes and since it negatively affects the performance, it is off by default. ++.TP ++.BR dioread_lock / dioread_nolock ++Controls whether or not ext4 should use the DIO read locking. If the ++dioread_nolock option is specified ext4 will allocate uninitialized extent ++before buffer write and convert the extent to initialized after IO completes. ++This approach allows ext4 code to avoid using inode mutex, which improves ++scalability on high speed storages. However this does not work with data ++journaling and dioread_nolock option will be ignored with kernel warning. ++Note that dioread_nolock code path is only used for extent-based files. ++Because of the restrictions this options comprises it is off by default ++(e.g.\& dioread_lock). ++.TP ++.B max_dir_size_kb=n ++This limits the size of the directories so that any attempt to expand them ++beyond the specified limit in kilobytes will cause an ENOSPC error. This is ++useful in memory-constrained environments, where a very large directory can ++cause severe performance problems or even provoke the Out Of Memory killer. (For ++example, if there is only 512\ MB memory available, a 176\ MB directory may ++seriously cramp the system's style.) ++.TP ++.B i_version ++Enable 64-bit inode version support. This option is off by default. ++ + .SH SEE ALSO + .BR mke2fs (8), + .BR mke2fs.conf (5), + .BR e2fsck (8), + .BR dumpe2fs (8), + .BR tune2fs (8), +-.BR debugfs (8) ++.BR debugfs (8), ++.BR mount (8) diff --git a/SOURCES/e2fsprogs-1.42.9-fix-endian-handling-of-ext3_extent_header.patch b/SOURCES/e2fsprogs-1.42.9-fix-endian-handling-of-ext3_extent_header.patch new file mode 100644 index 0000000..4aa3dd8 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-fix-endian-handling-of-ext3_extent_header.patch @@ -0,0 +1,45 @@ +[PATCH 2/6] e2fsprogs: fix endian handling of ext3_extent_header + +This turned up when trying to resize a filesystem containing +a file with many extents on PPC64. + +Fix all locations where ext3_extent_header members aren't +handled in an endian-safe manner. + +(Note: inline data portion removed for rhel7 application) + +Signed-off-by: Eric Sandeen +Reviewed-by: Darrick J. Wong +--- + lib/ext2fs/ext3_extents.h | 15 ++++++++++----- + 2 files changed, 11 insertions(+), 6 deletions(-) + +diff --git a/lib/ext2fs/ext3_extents.h b/lib/ext2fs/ext3_extents.h +index 4163436..a18d705 100644 +--- a/lib/ext2fs/ext3_extents.h ++++ b/lib/ext2fs/ext3_extents.h +@@ -106,15 +106,20 @@ struct ext3_ext_path { + ((struct ext3_extent_idx *) (((char *) (__hdr__)) + \ + sizeof(struct ext3_extent_header))) + #define EXT_HAS_FREE_INDEX(__path__) \ +- ((__path__)->p_hdr->eh_entries < (__path__)->p_hdr->eh_max) ++ (ext2fs_le16_to_cpu((__path__)->p_hdr->eh_entries) < \ ++ ext2fs_le16_to_cpu((__path__)->p_hdr->eh_max)) + #define EXT_LAST_EXTENT(__hdr__) \ +- (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_entries - 1) ++ (EXT_FIRST_EXTENT((__hdr__)) + \ ++ ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1) + #define EXT_LAST_INDEX(__hdr__) \ +- (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_entries - 1) ++ (EXT_FIRST_INDEX((__hdr__)) + \ ++ ext2fs_le16_to_cpu((__hdr__)->eh_entries) - 1) + #define EXT_MAX_EXTENT(__hdr__) \ +- (EXT_FIRST_EXTENT((__hdr__)) + (__hdr__)->eh_max - 1) ++ (EXT_FIRST_EXTENT((__hdr__)) + \ ++ ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1) + #define EXT_MAX_INDEX(__hdr__) \ +- (EXT_FIRST_INDEX((__hdr__)) + (__hdr__)->eh_max - 1) ++ (EXT_FIRST_INDEX((__hdr__)) + \ ++ ext2fs_le16_to_cpu((__hdr__)->eh_max) - 1) + + #endif /* _LINUX_EXT3_EXTENTS */ diff --git a/SOURCES/e2fsprogs-1.42.9-force-journal-remove.patch b/SOURCES/e2fsprogs-1.42.9-force-journal-remove.patch new file mode 100644 index 0000000..fa32af2 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-force-journal-remove.patch @@ -0,0 +1,63 @@ +commit 5fe2bd60844cfe5d805e62a4316afaa5cd9d7c83 +Author: Eric Sandeen +Date: Thu Feb 20 20:18:41 2014 -0500 + + tune2fs: allow removal of dirty journal with two "-f" options + + Jim pointed out that "tune2fs -f -O ^has_journal" won't remove the + journal if the needs_recovery flag is set; the manpage seems to indicate + that it should. And if you've lost an external journal and can no longer + replay it, how should one proceed? + + Change tune2fs so that two "-f" options will allow removal of a dirty + journal from a filesystem, even if the filesystem needs recovery. + + e2fsck can then do its best to pick up the pieces. + + Addresses-Debian-Bug: #559301 + + Reported-by: Jim Faulkner + Signed-off-by: Eric Sandeen + Signed-off-by: "Theodore Ts'o" + +Index: e2fsprogs-1.42.9/misc/tune2fs.8.in +=================================================================== +--- e2fsprogs-1.42.9.orig/misc/tune2fs.8.in ++++ e2fsprogs-1.42.9/misc/tune2fs.8.in +@@ -248,7 +248,10 @@ option is useful when removing the + filesystem feature from a filesystem which has + an external journal (or is corrupted + such that it appears to have an external journal), but that +-external journal is not available. ++external journal is not available. If the filesystem appears to require ++journal replay, the ++.B \-f ++flag must be specified twice to proceed. + .sp + .B WARNING: + Removing an external journal from a filesystem which was not cleanly unmounted +Index: e2fsprogs-1.42.9/misc/tune2fs.c +=================================================================== +--- e2fsprogs-1.42.9.orig/misc/tune2fs.c ++++ e2fsprogs-1.42.9/misc/tune2fs.c +@@ -436,8 +436,9 @@ static int update_feature_set(ext2_filsy + "read-only.\n"), stderr); + return 1; + } +- if (sb->s_feature_incompat & +- EXT3_FEATURE_INCOMPAT_RECOVER) { ++ if ((sb->s_feature_incompat & ++ EXT3_FEATURE_INCOMPAT_RECOVER) && ++ f_flag < 2) { + fputs(_("The needs_recovery flag is set. " + "Please run e2fsck before clearing\n" + "the has_journal flag.\n"), stderr); +@@ -929,7 +930,7 @@ static void parse_tune2fs_options(int ar + open_flag |= EXT2_FLAG_RW; + break; + case 'f': /* Force */ +- f_flag = 1; ++ f_flag++; + break; + case 'g': + resgid = strtoul(optarg, &tmp, 0); diff --git a/SOURCES/e2fsprogs-1.42.9-libext2fs-avoid-buffer-overflow.patch b/SOURCES/e2fsprogs-1.42.9-libext2fs-avoid-buffer-overflow.patch new file mode 100644 index 0000000..dd9634d --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-libext2fs-avoid-buffer-overflow.patch @@ -0,0 +1,52 @@ +commit f66e6ce4446738c2c7f43d41988a3eb73347e2f5 +Author: Theodore Ts'o +Date: Sat Aug 9 12:24:54 2014 -0400 + + libext2fs: avoid buffer overflow if s_first_meta_bg is too big + + If s_first_meta_bg is greater than the of number block group + descriptor blocks, then reading or writing the block group descriptors + will end up overruning the memory buffer allocated for the + descriptors. Fix this by limiting first_meta_bg to no more than + fs->desc_blocks. This doesn't correct the bad s_first_meta_bg value, + but it avoids causing the e2fsprogs userspace programs from + potentially crashing. + + Signed-off-by: Theodore Ts'o + +Index: e2fsprogs-1.42.9/lib/ext2fs/closefs.c +=================================================================== +--- e2fsprogs-1.42.9.orig/lib/ext2fs/closefs.c ++++ e2fsprogs-1.42.9/lib/ext2fs/closefs.c +@@ -336,9 +336,11 @@ errcode_t ext2fs_flush2(ext2_filsys fs, + * superblocks and group descriptors. + */ + group_ptr = (char *) group_shadow; +- if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) ++ if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) { + old_desc_blocks = fs->super->s_first_meta_bg; +- else ++ if (old_desc_blocks > fs->super->s_first_meta_bg) ++ old_desc_blocks = fs->desc_blocks; ++ } else + old_desc_blocks = fs->desc_blocks; + + ext2fs_numeric_progress_init(fs, &progress, NULL, +Index: e2fsprogs-1.42.9/lib/ext2fs/openfs.c +=================================================================== +--- e2fsprogs-1.42.9.orig/lib/ext2fs/openfs.c ++++ e2fsprogs-1.42.9/lib/ext2fs/openfs.c +@@ -348,9 +348,11 @@ errcode_t ext2fs_open2(const char *name, + #ifdef WORDS_BIGENDIAN + groups_per_block = EXT2_DESC_PER_BLOCK(fs->super); + #endif +- if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) ++ if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) { + first_meta_bg = fs->super->s_first_meta_bg; +- else ++ if (first_meta_bg > fs->desc_blocks) ++ first_meta_bg = fs->desc_blocks; ++ } else + first_meta_bg = fs->desc_blocks; + if (first_meta_bg) { + retval = io_channel_read_blk(fs->io, group_block+1, diff --git a/SOURCES/e2fsprogs-1.42.9-libext2fs-buffer-overflow-closefs.patch b/SOURCES/e2fsprogs-1.42.9-libext2fs-buffer-overflow-closefs.patch new file mode 100644 index 0000000..abb293f --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-libext2fs-buffer-overflow-closefs.patch @@ -0,0 +1,51 @@ +commit 49d0fe2a14f2a23da2fe299643379b8c1d37df73 +Author: Theodore Ts'o +Date: Fri Feb 6 12:46:39 2015 -0500 + + libext2fs: fix potential buffer overflow in closefs() + + The bug fix in f66e6ce4446: "libext2fs: avoid buffer overflow if + s_first_meta_bg is too big" had a typo in the fix for + ext2fs_closefs(). In practice most of the security exposure was from + the openfs path, since this meant if there was a carefully crafted + file system, buffer overrun would be triggered when the file system was + opened. + + However, if corrupted file system didn't trip over some corruption + check, and then the file system was modified via tune2fs or debugfs, + such that the superblock was marked dirty and then written out via the + closefs() path, it's possible that the buffer overrun could be + triggered when the file system is closed. + + Also clear up a signed vs unsigned warning while we're at it. + + Thanks to Nick Kralevich for asking me to look at + compiler warning in the code in question, which led me to notice the + bug in f66e6ce4446. + + Addresses: CVE-2015-1572 + + Signed-off-by: Theodore Ts'o + +Index: e2fsprogs-1.42.9/lib/ext2fs/closefs.c +=================================================================== +--- e2fsprogs-1.42.9.orig/lib/ext2fs/closefs.c ++++ e2fsprogs-1.42.9/lib/ext2fs/closefs.c +@@ -279,7 +279,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, + dgrp_t j; + #endif + char *group_ptr; +- int old_desc_blocks; ++ blk64_t old_desc_blocks; + struct ext2fs_numeric_progress_struct progress; + + EXT2_CHECK_MAGIC(fs, EXT2_ET_MAGIC_EXT2FS_FILSYS); +@@ -338,7 +338,7 @@ errcode_t ext2fs_flush2(ext2_filsys fs, + group_ptr = (char *) group_shadow; + if (fs->super->s_feature_incompat & EXT2_FEATURE_INCOMPAT_META_BG) { + old_desc_blocks = fs->super->s_first_meta_bg; +- if (old_desc_blocks > fs->super->s_first_meta_bg) ++ if (old_desc_blocks > fs->desc_blocks) + old_desc_blocks = fs->desc_blocks; + } else + old_desc_blocks = fs->desc_blocks; diff --git a/SOURCES/e2fsprogs-1.42.9-mke2fs-clean-up-kernel-version-tests.patch b/SOURCES/e2fsprogs-1.42.9-mke2fs-clean-up-kernel-version-tests.patch new file mode 100644 index 0000000..fdaf4b5 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-mke2fs-clean-up-kernel-version-tests.patch @@ -0,0 +1,98 @@ +From 604a29de2a70e97264e169957a224412868ca64a Mon Sep 17 00:00:00 2001 +From: "Darrick J. Wong" +Date: Thu, 6 Feb 2014 15:24:01 -0500 +Subject: [PATCH 1/8] mke2fs: clean up kernel version tests + +Refactor the running kernel version checks to hide the details of +version code checking, etc. + +Signed-off-by: Darrick J. Wong +Reviewed-by: Zheng Liu +Signed-off-by: Theodore Ts'o +--- + misc/mke2fs.c | 40 ++++++++++++++++++++++++++-------------- + 1 file changed, 26 insertions(+), 14 deletions(-) + +diff --git a/misc/mke2fs.c b/misc/mke2fs.c +index 2e8ba60..2afcb05 100644 +--- a/misc/mke2fs.c ++++ b/misc/mke2fs.c +@@ -27,6 +27,7 @@ + #include + #ifdef __linux__ + #include ++#include + #endif + #ifdef HAVE_GETOPT_H + #include +@@ -168,7 +169,29 @@ static int parse_version_number(const char *s) + rev = strtol(cp, &endptr, 10); + if (cp == endptr) + return 0; +- return ((((major * 256) + minor) * 256) + rev); ++ return KERNEL_VERSION(major, minor, rev); ++} ++ ++static int is_before_linux_ver(unsigned int major, unsigned int minor) ++{ ++ struct utsname ut; ++ static int linux_version_code = -1; ++ ++ if (uname(&ut)) { ++ perror("uname"); ++ exit(1); ++ } ++ if (linux_version_code < 0) ++ linux_version_code = parse_version_number(ut.release); ++ if (linux_version_code == 0) ++ return 0; ++ ++ return linux_version_code < KERNEL_VERSION(major, minor, 0); ++} ++#else ++static int is_before_linux_ver(unsigned int major, unsigned int minor) ++{ ++ return 0; + } + #endif + +@@ -1306,9 +1329,6 @@ static void PRS(int argc, char *argv[]) + * Finally, we complain about fs_blocks_count > 2^32 on a non-64bit fs. + */ + blk64_t fs_blocks_count = 0; +-#ifdef __linux__ +- struct utsname ut; +-#endif + long sysval; + int s_opt = -1, r_opt = -1; + char *fs_features = 0; +@@ -1374,15 +1394,8 @@ profile_error: + memset(&fs_param, 0, sizeof(struct ext2_super_block)); + fs_param.s_rev_level = 1; /* Create revision 1 filesystems now */ + +-#ifdef __linux__ +- if (uname(&ut)) { +- perror("uname"); +- exit(1); +- } +- linux_version_code = parse_version_number(ut.release); +- if (linux_version_code && linux_version_code < (2*65536 + 2*256)) ++ if (is_before_linux_ver(2, 2)) + fs_param.s_rev_level = 0; +-#endif + + if (argc && *argv) { + program_name = get_progname(*argv); +@@ -1790,8 +1803,7 @@ profile_error: + + if (use_bsize == -1) { + use_bsize = sys_page_size; +- if ((linux_version_code < (2*65536 + 6*256)) && +- (use_bsize > 4096)) ++ if (is_before_linux_ver(2, 6) && use_bsize > 4096) + use_bsize = 4096; + } + if (lsector_size && use_bsize < lsector_size) +-- +1.8.3.1 + diff --git a/SOURCES/e2fsprogs-1.42.9-mkfs-revision-too-high.patch b/SOURCES/e2fsprogs-1.42.9-mkfs-revision-too-high.patch new file mode 100644 index 0000000..459c4e0 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-mkfs-revision-too-high.patch @@ -0,0 +1,37 @@ +commit 4b59352edb5ce783ba578d708de1fda981acfec6 +Author: Frank Sorenson +Date: Fri Jul 4 15:31:50 2014 -0400 + + mke2fs: prevent creation of filesystem with unsupported revision + + It's a bit strange to accept revision levels higher than + the code creating the filesystem can understand, so don't + allow it. + + At least the kernel will mount the fs readonly if it's too + high, but no other utility will touch it, so you can't + fix the error. + + Just reject anything > EXT2_MAX_SUPP_REV at mkfs time. + + Signed-off-by: Frank Sorenson + [sandeen@redhat.com: Add more verbose commit log] + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + +Index: e2fsprogs-1.42.9/misc/mke2fs.c +=================================================================== +--- e2fsprogs-1.42.9.orig/misc/mke2fs.c ++++ e2fsprogs-1.42.9/misc/mke2fs.c +@@ -1570,6 +1570,11 @@ profile_error: + _("bad revision level - %s"), optarg); + exit(1); + } ++ if (r_opt > EXT2_MAX_SUPP_REV) { ++ com_err(program_name, EXT2_ET_REV_TOO_HIGH, ++ _("while trying to create revision %d"), r_opt); ++ exit(1); ++ } + fs_param.s_rev_level = r_opt; + break; + case 's': /* deprecated */ diff --git a/SOURCES/e2fsprogs-1.42.9-no-ppc-altivec.patch b/SOURCES/e2fsprogs-1.42.9-no-ppc-altivec.patch new file mode 100644 index 0000000..68d52d6 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-no-ppc-altivec.patch @@ -0,0 +1,15 @@ +Index: e2fsprogs-1.42.9/lib/ext2fs/Makefile.in +=================================================================== +--- e2fsprogs-1.42.9.orig/lib/ext2fs/Makefile.in ++++ e2fsprogs-1.42.9/lib/ext2fs/Makefile.in +@@ -197,6 +197,10 @@ BSDLIB_INSTALL_DIR = $(root_libdir) + + all:: ext2fs.pc + ++ifdef PPC_NO_ALTIVEC ++ALL_CFLAGS += -mno-altivec -mno-vsx ++endif ++ + .c.o: + $(E) " CC $<" + $(Q) $(CC) $(ALL_CFLAGS) -c $< -o $@ diff --git a/SOURCES/e2fsprogs-1.42.9-resize2fs-clear-uninit-BG.patch b/SOURCES/e2fsprogs-1.42.9-resize2fs-clear-uninit-BG.patch new file mode 100644 index 0000000..f0ebf61 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-resize2fs-clear-uninit-BG.patch @@ -0,0 +1,85 @@ +commit f3745728bc254892da4c569ba3fd8801895f3524 +Author: Eric Sandeen +Date: Sun Mar 6 21:51:23 2016 -0500 + + resize2fs: clear uninit BG if allocating from new group + + If resize2fs_get_alloc_block() allocates from a BLOCK_UNINIT group, we + need to make sure that the UNINIT flag is cleared on both file system + structures which are maintained by resize2fs. This causes the + modified bitmaps to not get written out, which leads to post-resize2fs + e2fsck errors; used blocks in UNINIT groups, not marked in the block + bitmap. This was seen on r_ext4_small_bg. + + This patch uses clear_block_uninit() to clear the flag, + and my problem goes away. + + Signed-off-by: Eric Sandeen + Reviewed-by: Darrick J. Wong + Reviewed-by: Andreas Dilger + Signed-off-by: Theodore Ts'o + +Index: e2fsprogs-1.42.9/lib/ext2fs/alloc.c +=================================================================== +--- e2fsprogs-1.42.9.orig/lib/ext2fs/alloc.c ++++ e2fsprogs-1.42.9/lib/ext2fs/alloc.c +@@ -27,6 +27,22 @@ + #include "ext2fs.h" + + /* ++ * Clear the uninit block bitmap flag if necessary ++ */ ++void ext2fs_clear_block_uninit(ext2_filsys fs, dgrp_t group) ++{ ++ if (!(ext2fs_bg_flags_test(fs, group, EXT2_BG_BLOCK_UNINIT))) ++ return; ++ ++ /* uninit block bitmaps are now initialized in read_bitmaps() */ ++ ++ ext2fs_bg_flags_clear(fs, group, EXT2_BG_BLOCK_UNINIT); ++ ext2fs_group_desc_csum_set(fs, group); ++ ext2fs_mark_super_dirty(fs); ++ ext2fs_mark_bb_dirty(fs); ++} ++ ++/* + * Check for uninit block bitmaps and deal with them appropriately + */ + static void check_block_uninit(ext2_filsys fs, ext2fs_block_bitmap map, +Index: e2fsprogs-1.42.9/lib/ext2fs/ext2fs.h +=================================================================== +--- e2fsprogs-1.42.9.orig/lib/ext2fs/ext2fs.h ++++ e2fsprogs-1.42.9/lib/ext2fs/ext2fs.h +@@ -639,6 +639,7 @@ static inline int ext2fs_needs_large_fil + } + + /* alloc.c */ ++extern void ext2fs_clear_block_uninit(ext2_filsys fs, dgrp_t group); + extern errcode_t ext2fs_new_inode(ext2_filsys fs, ext2_ino_t dir, int mode, + ext2fs_inode_bitmap map, ext2_ino_t *ret); + extern errcode_t ext2fs_new_block(ext2_filsys fs, blk_t goal, +Index: e2fsprogs-1.42.9/resize/resize2fs.c +=================================================================== +--- e2fsprogs-1.42.9.orig/resize/resize2fs.c ++++ e2fsprogs-1.42.9/resize/resize2fs.c +@@ -1196,6 +1196,7 @@ static errcode_t resize2fs_get_alloc_blo + { + ext2_resize_t rfs = (ext2_resize_t) fs->priv_data; + blk64_t blk; ++ int group; + + blk = get_new_block(rfs); + if (!blk) +@@ -1208,6 +1209,12 @@ static errcode_t resize2fs_get_alloc_blo + + ext2fs_mark_block_bitmap2(rfs->old_fs->block_map, blk); + ext2fs_mark_block_bitmap2(rfs->new_fs->block_map, blk); ++ ++ group = ext2fs_group_of_blk2(rfs->old_fs, blk); ++ ext2fs_clear_block_uninit(rfs->old_fs, group); ++ group = ext2fs_group_of_blk2(rfs->new_fs, blk); ++ ext2fs_clear_block_uninit(rfs->new_fs, group); ++ + *ret = (blk64_t) blk; + return 0; + } diff --git a/SOURCES/e2fsprogs-1.42.9-resize2fs-fs-with-errors.patch b/SOURCES/e2fsprogs-1.42.9-resize2fs-fs-with-errors.patch new file mode 100644 index 0000000..b7e5fc7 --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-resize2fs-fs-with-errors.patch @@ -0,0 +1,80 @@ +commit 7d7a8fe4ea4d9162977a1a6b32c4737d9ca9dd1f +Author: Eric Sandeen +Date: Mon Jun 9 09:52:19 2014 -0400 + + resize2fs: don't attempt to calculate minimum size on fs with errors + + My old patch: + + resize2fs: don't print minimum size if fs is not clean + + almost did this, but it still calculated the size; it just didn't print + it. Which is a bit silly. + + Jes had a pretty badly corrupted image which made the minimum size + calculation go off into the weeds. It was corrupted, and also marked + as having an error. + + We'll eventually bail out for an unmounted filesystem if it's marked + as being in an error state anyway; just move that test & bail-out + to a much earlier point, and remove the now-duplicate one under the + print_min_size block. + + This will catch & block all resize operations on an offline filesystem + with errors, in one central place. + + Reported-by: Jes Sorensen + Signed-off-by: Eric Sandeen + Signed-off-by: Theodore Ts'o + +diff --git a/resize/main.c b/resize/main.c +index 2b7abff..e65c8e4 100644 +--- a/resize/main.c ++++ b/resize/main.c +@@ -319,6 +319,17 @@ int main (int argc, char ** argv) + exit (1); + } + ++ if (!(mount_flags & EXT2_MF_MOUNTED)) { ++ if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) || ++ (fs->super->s_state & EXT2_ERROR_FS) || ++ ((fs->super->s_state & EXT2_VALID_FS) == 0))) { ++ fprintf(stderr, ++ _("Please run 'e2fsck -f %s' first.\n\n"), ++ device_name); ++ exit(1); ++ } ++ } ++ + /* + * Check for compatibility with the feature sets. We need to + * be more stringent than ext2fs_open(). +@@ -332,13 +343,6 @@ int main (int argc, char ** argv) + min_size = calculate_minimum_resize_size(fs, flags); + + if (print_min_size) { +- if (!force && ((fs->super->s_state & EXT2_ERROR_FS) || +- ((fs->super->s_state & EXT2_VALID_FS) == 0))) { +- fprintf(stderr, +- _("Please run 'e2fsck -f %s' first.\n\n"), +- device_name); +- exit(1); +- } + printf(_("Estimated minimum size of the filesystem: %llu\n"), + min_size); + exit(0); +@@ -444,14 +448,6 @@ int main (int argc, char ** argv) + bigalloc_check(fs, force); + retval = online_resize_fs(fs, mtpt, &new_size, flags); + } else { +- if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) || +- (fs->super->s_state & EXT2_ERROR_FS) || +- ((fs->super->s_state & EXT2_VALID_FS) == 0))) { +- fprintf(stderr, +- _("Please run 'e2fsck -f %s' first.\n\n"), +- device_name); +- exit(1); +- } + bigalloc_check(fs, force); + printf(_("Resizing the filesystem on " + "%s to %llu (%dk) blocks.\n"), diff --git a/SOURCES/e2fsprogs-1.42.9-set-pointer-to-NULL-after-ext2fs_free.patch b/SOURCES/e2fsprogs-1.42.9-set-pointer-to-NULL-after-ext2fs_free.patch new file mode 100644 index 0000000..b1384be --- /dev/null +++ b/SOURCES/e2fsprogs-1.42.9-set-pointer-to-NULL-after-ext2fs_free.patch @@ -0,0 +1,64 @@ +From 68ef8adcff3acc25ddac82b808c3036b4dddaf0b Mon Sep 17 00:00:00 2001 +From: Lukas Czerner +Date: Thu, 20 Feb 2014 14:14:39 +0100 +Subject: [PATCH 8/8] e2fsprogs: Set pointer to NULL after ext2fs_free + +ext2fs_free() does not set the ext2_filsys pointer to null so the caller +is responsible to setting it himself if it is needed. + +This patch fixes some places where caller did not set ext2_filsys +pointer to NULL after ext2fs_free() which might result in use after +free. Fix it. + +Signed-off-by: Lukas Czerner +--- + lib/ext2fs/openfs.c | 7 ++++--- + resize/resize2fs.c | 5 ++++- + 2 files changed, 8 insertions(+), 4 deletions(-) + +diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c +index 4cdbde1..ef67493 100644 +--- a/lib/ext2fs/openfs.c ++++ b/lib/ext2fs/openfs.c +@@ -419,10 +419,11 @@ errcode_t ext2fs_open2(const char *name, const char *io_options, + + return 0; + cleanup: +- if (flags & EXT2_FLAG_NOFREE_ON_ERROR) +- *ret_fs = fs; +- else ++ if (!(flags & EXT2_FLAG_NOFREE_ON_ERROR)) { + ext2fs_free(fs); ++ fs = NULL; ++ } ++ *ret_fs = fs; + return retval; + } + +diff --git a/resize/resize2fs.c b/resize/resize2fs.c +index 6b32bbf..a1fdefa 100644 +--- a/resize/resize2fs.c ++++ b/resize/resize2fs.c +@@ -202,6 +202,7 @@ errcode_t resize_fs(ext2_filsys fs, blk64_t *new_size, int flags, + rfs->flags = flags; + + ext2fs_free(rfs->old_fs); ++ rfs->old_fs = NULL; + if (rfs->itable_buf) + ext2fs_free_mem(&rfs->itable_buf); + if (rfs->reserve_blocks) +@@ -213,8 +214,10 @@ errcode_t resize_fs(ext2_filsys fs, blk64_t *new_size, int flags, + return 0; + + errout: +- if (rfs->new_fs) ++ if (rfs->new_fs) { + ext2fs_free(rfs->new_fs); ++ rfs->new_fs = NULL; ++ } + if (rfs->itable_buf) + ext2fs_free_mem(&rfs->itable_buf); + ext2fs_free_mem(&rfs); +-- +1.8.3.1 + diff --git a/SOURCES/e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch b/SOURCES/e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch new file mode 100644 index 0000000..af1b509 --- /dev/null +++ b/SOURCES/e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch @@ -0,0 +1,87 @@ +From 2ded6409b3a22e68c19236153f0456e1c079d0da Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Tue, 20 Dec 2016 09:23:29 -0600 +Subject: [PATCH] libext2fs: don't ignore fsync errors + +Today, if mke2fs experiences IO errors (say, on a thin device +which filled up during mkfs), mke2fs is silent and returns +success even though the filesystem was not properly created. + +Catch errors from the io_channel_flush() callchain to +fix this up. Fix formatting of the printed error as +well: + +... +Creating journal (262144 blocks): done +Writing superblocks and filesystem accounting information: +Warning, had trouble writing out superblocks. +# echo $? +5 + +Signed-off-by: Eric Sandeen +Signed-off-by: Theodore Ts'o +--- + lib/ext2fs/closefs.c | 10 ++++++++-- + lib/ext2fs/unix_io.c | 3 ++- + misc/mke2fs.c | 2 +- + 3 files changed, 11 insertions(+), 4 deletions(-) + +diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c +index a73c53f..000ebd8 100644 +--- a/lib/ext2fs/closefs.c ++++ b/lib/ext2fs/closefs.c +@@ -410,16 +410,22 @@ write_primary_superblock_only: + ext2fs_swap_super(super_shadow); + #endif + +- 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/unix_io.c b/lib/ext2fs/unix_io.c +index 19be630..a2069f0 100644 +--- a/lib/ext2fs/unix_io.c ++++ b/lib/ext2fs/unix_io.c +@@ -885,7 +885,8 @@ static errcode_t unix_flush(io_channel channel) + #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; + } + +diff --git a/misc/mke2fs.c b/misc/mke2fs.c +index 3e3ef95..8952a5f 100644 +--- a/misc/mke2fs.c ++++ b/misc/mke2fs.c +@@ -2764,7 +2764,7 @@ no_journal: + retval = ext2fs_close(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")) +-- +2.7.4 + diff --git a/SOURCES/e2fsprogs-1.43.4-tune2fs-edit-dire-warning-about-check-intervals.patch b/SOURCES/e2fsprogs-1.43.4-tune2fs-edit-dire-warning-about-check-intervals.patch new file mode 100644 index 0000000..cd6b331 --- /dev/null +++ b/SOURCES/e2fsprogs-1.43.4-tune2fs-edit-dire-warning-about-check-intervals.patch @@ -0,0 +1,56 @@ +From 2f121a201133bf6b8efeda5d898c938d12bd6f65 Mon Sep 17 00:00:00 2001 +From: Eric Sandeen +Date: Sun, 23 Jul 2017 18:34:57 -0400 +Subject: [PATCH] tune2fs: edit dire warning about check intervals + +Time & mount-count based checks have been off by default for quite some +time now, but the dire warning about disabling them remains in the +tune2fs manpage, which is confusing. We did "strongly consider +the consequences" and disabled it by default, no need to scare the +user about it now. Inform the user of the consequences in a more +measured tone. + +Signed-off-by: Eric Sandeen +Reviewed-by: Andreas Dilger +Signed-off-by: Theodore Ts'o +--- + misc/tune2fs.8.in | 15 ++++++--------- + 1 file changed, 6 insertions(+), 9 deletions(-) + +diff --git a/misc/tune2fs.8.in b/misc/tune2fs.8.in +index e07da28..8949f64 100644 +--- a/misc/tune2fs.8.in ++++ b/misc/tune2fs.8.in +@@ -122,7 +122,9 @@ Staggering the mount-counts at which filesystems are forcibly + checked will avoid all filesystems being checked at one time + when using journaled filesystems. + .sp +-You should strongly consider the consequences of disabling ++Mount-count-dependent checking is disabled by default to avoid ++unanticipated long reboots while e2fsck does its work. However, ++you may wish to consider the consequences of disabling + mount-count-dependent checking entirely. Bad disk drives, cables, + memory, and kernel bugs could all corrupt a filesystem without + marking the filesystem dirty or in error. If you are using +@@ -277,15 +279,10 @@ as months, and + .B w + as weeks. A value of zero will disable the time-dependent checking. + .sp +-It is strongly recommended that either ++There are pros and cons to disabling these periodic checks; see the ++discussion under the + .B \-c +-(mount-count-dependent) or +-.B \-i +-(time-dependent) checking be enabled to force periodic full +-.BR e2fsck (8) +-checking of the filesystem. Failure to do so may lead to filesystem +-corruption (due to bad disks, cables, memory, or kernel bugs) going +-unnoticed, ultimately resulting in data loss or corruption. ++(mount-count-dependent check) option for details. + .TP + .B \-j + Add an ext3 journal to the filesystem. If the +-- +2.7.5 + diff --git a/SOURCES/e2fsprogs-1.43.6-libext2fs-skip-start_blk-adjustment-when-stride-and-.patch b/SOURCES/e2fsprogs-1.43.6-libext2fs-skip-start_blk-adjustment-when-stride-and-.patch new file mode 100644 index 0000000..5573d6a --- /dev/null +++ b/SOURCES/e2fsprogs-1.43.6-libext2fs-skip-start_blk-adjustment-when-stride-and-.patch @@ -0,0 +1,49 @@ +From 086d0f865d08ec8f723ef6a7feeb8ec8d9f3e9b5 Mon Sep 17 00:00:00 2001 +From: Lukas Czerner +Date: Sat, 14 Oct 2017 10:42:30 -0400 +Subject: [PATCH] libext2fs: skip start_blk adjustment when stride and flex_bg + is set + +Currently some stride optimization is done in +ext2fs_allocate_group_table() by adjusting start_blk block where we +start allocating block, or inode bitmaps. + +However in flex_bg case this is currently useless since the values are +going to be overridden anyway. Moreover in flex_bg case the group might +already be full and the stride optimization will fail. As a result file +system resize might fail needlessly in some situations. + +It can be shown by this example: + +mke2fs -b 1024 -i 1024 -E stride=8192 -t ext4 /dev/loop0 1024000 +resize2fs /dev/loop0 102400000 +resize2fs 1.43.5 (04-Aug-2017) +Resizing the filesystem on /dev/loop0 to 102400000 (1k) blocks. +./resize/resize2fs: Could not allocate block in ext2 filesystem while trying to resize /dev/loop0 +Please run 'e2fsck -fy /dev/loop0' to fix the filesystem +after the aborted resize operation. + +Fix this by not doing the stride adjustment in case of flex_bg. + +Signed-off-by: Lukas Czerner +Signed-off-by: Theodore Ts'o +--- + lib/ext2fs/alloc_tables.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/ext2fs/alloc_tables.c b/lib/ext2fs/alloc_tables.c +index 9f3d4e0..dd6015e 100644 +--- a/lib/ext2fs/alloc_tables.c ++++ b/lib/ext2fs/alloc_tables.c +@@ -108,7 +108,7 @@ errcode_t ext2fs_allocate_group_table(ext2_filsys fs, dgrp_t group, + /* + * Allocate the block and inode bitmaps, if necessary + */ +- if (fs->stride) { ++ if (fs->stride && !flexbg_size) { + retval = ext2fs_get_free_blocks2(fs, group_blk, last_blk, + 1, bmap, &start_blk); + if (retval) +-- +2.7.5 + diff --git a/SOURCES/ext2_types-wrapper.h b/SOURCES/ext2_types-wrapper.h new file mode 100644 index 0000000..69f4d6f --- /dev/null +++ b/SOURCES/ext2_types-wrapper.h @@ -0,0 +1,29 @@ +/* This file is here to prevent a file conflict on multiarch systems. A + * conflict will occur because ext2_types.h has arch-specific definitions. + * + * DO NOT INCLUDE THE NEW FILE DIRECTLY -- ALWAYS INCLUDE THIS ONE INSTEAD. */ + +#if defined(__i386__) +#include "ext2_types-i386.h" +#elif defined(__powerpc64__) +#include "ext2_types-ppc64.h" +#elif defined(__powerpc__) +#include "ext2_types-ppc.h" +#elif defined(__s390x__) +#include "ext2_types-s390x.h" +#elif defined(__s390__) +#include "ext2_types-s390.h" +#elif defined(__x86_64__) +#include "ext2_types-x86_64.h" +#elif defined(__alpha__) +#include "ext2_types-alpha.h" +#elif defined(__arm__) +#include "ext2_types-arm.h" +#elif defined(__sparc__) && defined(__arch64__) +#include "ext2_types-sparc64.h" +#elif defined(__sparc__) +#include "ext2_types-sparc.h" +#else +#error "This e2fsprogs-devel package does not work your architecture?" +#endif + diff --git a/SPECS/e2fsprogs.spec b/SPECS/e2fsprogs.spec new file mode 100644 index 0000000..8128f85 --- /dev/null +++ b/SPECS/e2fsprogs.spec @@ -0,0 +1,997 @@ +Summary: Utilities for managing ext2, ext3, and ext4 filesystems +Name: e2fsprogs +Version: 1.42.9 +Release: 11%{?dist} + +# License tags based on COPYING file distinctions for various components +License: GPLv2 +Group: System Environment/Base +Source0: https://www.kernel.org/pub/linux/kernel/people/tytso/%{name}/v%{version}/%{name}-%{version}.tar.xz +Source1: ext2_types-wrapper.h +Source2: e2fsck.conf + +Patch1: e2fsprogs-1.40.4-sb_feature_check_ignore.patch +Patch2: e2fsprogs-1.42.9-set-pointer-to-NULL-after-ext2fs_free.patch +Patch3: e2fsprogs-1.42.9-mke2fs-clean-up-kernel-version-tests.patch +Patch4: e2fsprogs-1.42.9-add-revision-to-the-is_before_linux_ver.patch +Patch5: e2fsprogs-1.42.9-enable-lazy_itable_init-on-newer-kernel-by-default.patch +Patch6: e2fsprogs-1.42.9-enable-64bit-feature-by-default.patch +Patch7: e2fsprogs-1.42.9-disable-resize_inode-feature-if-64bit-feature-is-enabled.patch +Patch8: e2fsprogs-1.42.9-no-ppc-altivec.patch +Patch9: e2fsprogs-1.42.9-resize2fs-fs-with-errors.patch +Patch10: e2fsprogs-1.42.9-chattr-manpage-j-update.patch +Patch11: e2fsprogs-1.42.9-chattr-manpage-reorder.patch +Patch12: e2fsprogs-1.42.9-chattr-manpage-update.patch +Patch13: e2fsprogs-1.42.9-ext4-manpage-add-mountopts.patch +Patch14: e2fsprogs-1.42.9-ext4-manpage-add-attrs.patch +Patch15: e2fsprogs-1.42.9-fix-endian-handling-of-ext3_extent_header.patch +Patch16: e2fsprogs-1.42.9-dont-require-fsck-for-resize-p.patch +Patch17: e2fsprogs-1.42.9-defrag-backwards-files.patch +Patch18: e2fsprogs-1.42.9-force-journal-remove.patch +Patch19: e2fsprogs-1.42.9-mkfs-revision-too-high.patch +Patch20: e2fsprogs-1.42.9-libext2fs-avoid-buffer-overflow.patch +Patch21: e2fsprogs-1.42.9-libext2fs-buffer-overflow-closefs.patch +Patch22: e2fsprogs-1.42.9-resize2fs-clear-uninit-BG.patch +Patch23: e2fsprogs-1.43.3-libext2fs-don-t-ignore-fsync-errors.patch +Patch24: e2fsprogs-1.42.10-Fix-nroff-macro-issue-in-chattr-man-page.patch +Patch25: e2fsprogs-1.43.6-libext2fs-skip-start_blk-adjustment-when-stride-and-.patch +Patch26: e2fsprogs-1.43.4-tune2fs-edit-dire-warning-about-check-intervals.patch + +Url: http://e2fsprogs.sourceforge.net/ +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) +Requires: e2fsprogs-libs%{?_isa} = %{version}-%{release} +Requires: libcom_err%{?_isa} = %{version}-%{release} +Requires: libss = %{version}-%{release} + +# e4fsprogs was a parallel ext4-capable package in RHEL5.x +%if 0%{?rhel} > 0 +Obsoletes: e4fsprogs < %{version}-%{release} +Provides: e4fsprogs = %{version}-%{release} +%endif + +BuildRequires: pkgconfig, texinfo, libselinux-devel +BuildRequires: libsepol-devel +BuildRequires: libblkid-devel +BuildRequires: libuuid-devel +BuildRequires: gettext + +%description +The e2fsprogs package contains a number of utilities for creating, +checking, modifying, and correcting any inconsistencies in second, +third and fourth extended (ext2/ext3/ext4) filesystems. E2fsprogs +contains e2fsck (used to repair filesystem inconsistencies after an +unclean shutdown), mke2fs (used to initialize a partition to contain +an empty ext2 filesystem), debugfs (used to examine the internal +structure of a filesystem, to manually repair a corrupted +filesystem, or to create test cases for e2fsck), tune2fs (used to +modify filesystem parameters), and most of the other core ext2fs +filesystem utilities. + +You should install the e2fsprogs package if you need to manage the +performance of an ext2, ext3, or ext4 filesystem. + +%package libs +Summary: Ext2/3/4 filesystem-specific shared libraries +Group: Development/Libraries +License: GPLv2 and LGPLv2 +Requires: libcom_err%{?_isa} = %{version}-%{release} + +%description libs +E2fsprogs-libs contains libe2p and libext2fs, the libraries of the +e2fsprogs package. + +These libraries are used to directly acccess ext2/3/4 filesystems +from userspace. + +%package static +Summary: Ext2/3/4 filesystem-specific static libraries +Group: Development/Libraries +License: GPLv2 and LGPLv2 + +%description static +E2fsprogs-static contains all static libraries built from e2fsprogs, +including libext2fs, libcom_err, libe2p, and libss. + +These libraries are used to directly acccess ext2/3/4 filesystems +from userspace, and perform other useful functions. + +%package devel +Summary: Ext2/3/4 filesystem-specific libraries and headers +Group: Development/Libraries +License: GPLv2 and LGPLv2 +Requires: e2fsprogs-libs%{?_isa} = %{version}-%{release} +Requires: libcom_err-devel%{?_isa} = %{version}-%{release} +Requires: gawk +Requires: pkgconfig +Requires(post): info +Requires(preun): info + +%description devel +E2fsprogs-devel contains the libraries and header files needed to +develop second, third and fourth extended (ext2/ext3/ext4) +filesystem-specific programs. + +You should install e2fsprogs-devel if you want to develop ext2/3/4 +filesystem-specific programs. If you install e2fsprogs-devel, you'll +also want to install e2fsprogs. + +%package -n libcom_err +Summary: Common error description library +Group: Development/Libraries +License: MIT + +%description -n libcom_err +This is the common error description library, part of e2fsprogs. + +libcom_err is an attempt to present a common error-handling mechanism. + +%package -n libcom_err-devel +Summary: Common error description library +Group: Development/Libraries +License: MIT +Requires: libcom_err%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n libcom_err-devel +This is the common error description development library and headers, +part of e2fsprogs. It contains the compile_et commmand, used +to convert a table listing error-code names and associated messages +messages into a C source file suitable for use with the library. + +libcom_err is an attempt to present a common error-handling mechanism. + +%package -n libss +Summary: Command line interface parsing library +Group: Development/Libraries +License: MIT +Requires: libcom_err%{?_isa} = %{version}-%{release} + +%description -n libss +This is libss, a command line interface parsing library, part of e2fsprogs. + +This package includes a tool that parses a command table to generate +a simple command-line interface parser, the include files needed to +compile and use it. + +It was originally inspired by the Multics SubSystem library. + +%package -n libss-devel +Summary: Command line interface parsing library +Group: Development/Libraries +License: MIT +Requires: libss%{?_isa} = %{version}-%{release} +Requires: pkgconfig + +%description -n libss-devel +This is the command line interface parsing (libss) development library +and headers, part of e2fsprogs. It contains the mk_cmds command, which +parses a command table to generate a simple command-line interface parser. + +It was originally inspired by the Multics SubSystem library. + +%prep +%setup -q +# ignore some flag differences on primary/backup sb feature checks +# mildly unsafe but 'til I get something better, avoid full fsck +# after an selinux install... +%patch1 -p1 -b .featurecheck +# fix use after free after calling ext2fs_free() +%patch2 -p1 +# clean up kernel version tests +%patch3 -p1 +# Add revision to the is_before_linux_ver() +%patch4 -p1 +# Enable lazy_itable_ini by defula on newer kernel even if ext4 module +# is not loaded +%patch5 -p1 +# Enable 64bit by default +%patch6 -p1 +# Disable resize_inode when 64bit feature is enabled +%patch7 -p1 +# Disable some instructions on ppc build of libext2fs; see bug #1074604 +# and e2fsprogs-1.42.9-no-ppc-altivec.patch +%patch8 -p1 -b .noaltivec +# Don't calc minimum resize2fs size on fs with errors +%patch9 -p1 +# Various updates to attr-related manpages +%patch10 -p1 +%patch11 -p1 +%patch12 -p1 +%patch13 -p1 +%patch14 -p1 +%patch15 -p1 +%patch16 -p1 +%patch17 -p1 +%patch18 -p1 +%patch19 -p1 +%patch20 -p1 +%patch21 -p1 +%patch22 -p1 +%patch23 -p1 +%patch24 -p1 +%patch25 -p1 +%patch26 -p1 + +%build +%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \ + --disable-e2initrd-helper --disable-libblkid --disable-libuuid \ + --with-root-prefix=/usr +# Disable some instructions on ppc build of libext2fs; see bug #1074604 +# and e2fsprogs-1.42.9-no-ppc-altivec.patch +%ifarch ppc +make V=1 %{?_smp_mflags} PPC_NO_ALTIVEC=1 +%else +make V=1 %{?_smp_mflags} +%endif + +%install +rm -rf %{buildroot} +export PATH=/sbin:$PATH +make install install-libs DESTDIR=%{buildroot} INSTALL="%{__install} -p" \ + root_sbindir=%{_sbindir} root_libdir=%{_libdir} + +# ugly hack to allow parallel install of 32-bit and 64-bit -devel packages: +%define multilib_arches %{ix86} x86_64 ppc ppc64 s390 s390x sparcv9 sparc64 + +%ifarch %{multilib_arches} +mv -f %{buildroot}%{_includedir}/ext2fs/ext2_types.h \ + %{buildroot}%{_includedir}/ext2fs/ext2_types-%{_arch}.h +install -p -m 644 %{SOURCE1} %{buildroot}%{_includedir}/ext2fs/ext2_types.h +%endif + +# Hack for now, otherwise strip fails. +chmod +w %{buildroot}%{_libdir}/*.a + +# Let boot continue even if *gasp* clock is wrong +install -p -m 644 %{SOURCE2} %{buildroot}/etc/e2fsck.conf + +%find_lang %{name} + +%check +# This breaks in a very weird way on ppc; it is a test of a crafted +# filesystem that can't even be used in practice, and usptream +# has ignored the patch to fix it. So remove it for now. +rm -rf tests/r_ext4_small_bg +make check + +%clean +rm -rf %{buildroot} + +%post libs -p /sbin/ldconfig +%postun libs -p /sbin/ldconfig + +%post devel +# Test for file; if installed with --excludedocs it may not be there +if [ -f %{_infodir}/libext2fs.info.gz ]; then + /sbin/install-info %{_infodir}/libext2fs.info.gz %{_infodir}/dir || : +fi + +%preun devel +if [ $1 = 0 -a -f %{_infodir}/libext2fs.info.gz ]; then + /sbin/install-info --delete %{_infodir}/libext2fs.info.gz %{_infodir}/dir || : +fi +exit 0 + +%post -n libcom_err -p /sbin/ldconfig +%postun -n libcom_err -p /sbin/ldconfig + +%post -n libss -p /sbin/ldconfig +%postun -n libss -p /sbin/ldconfig + +%files -f %{name}.lang +%defattr(-,root,root) +%doc COPYING README RELEASE-NOTES + +%config(noreplace) /etc/mke2fs.conf +%config(noreplace) /etc/e2fsck.conf +%{_sbindir}/badblocks +%{_sbindir}/debugfs +%{_sbindir}/dumpe2fs +%{_sbindir}/e2fsck +%{_sbindir}/e2image +%{_sbindir}/e2label +%{_sbindir}/e2undo +%{_sbindir}/fsck.ext2 +%{_sbindir}/fsck.ext3 +%{_sbindir}/fsck.ext4 +%{_sbindir}/logsave +%{_sbindir}/mke2fs +%{_sbindir}/mkfs.ext2 +%{_sbindir}/mkfs.ext3 +%{_sbindir}/mkfs.ext4 +%{_sbindir}/resize2fs +%{_sbindir}/tune2fs +%{_sbindir}/filefrag +%{_sbindir}/e2freefrag +%{_sbindir}/e4defrag +%{_sbindir}/mklost+found +%exclude %{_sbindir}/fsck.ext4dev +%exclude %{_sbindir}/mkfs.ext4dev + +%{_bindir}/chattr +%{_bindir}/lsattr +%{_mandir}/man1/chattr.1* +%{_mandir}/man1/lsattr.1* + +%{_mandir}/man5/ext2.5* +%{_mandir}/man5/ext3.5* +%{_mandir}/man5/ext4.5* +%{_mandir}/man5/e2fsck.conf.5* +%{_mandir}/man5/mke2fs.conf.5* + +%{_mandir}/man8/badblocks.8* +%{_mandir}/man8/debugfs.8* +%{_mandir}/man8/dumpe2fs.8* +%{_mandir}/man8/e2fsck.8* +%{_mandir}/man8/filefrag.8* +%{_mandir}/man8/e2freefrag.8* +%{_mandir}/man8/e4defrag.8* +%{_mandir}/man8/fsck.ext2.8* +%{_mandir}/man8/fsck.ext3.8* +%{_mandir}/man8/fsck.ext4.8* +%{_mandir}/man8/e2image.8* +%{_mandir}/man8/e2label.8* +%{_mandir}/man8/e2undo.8* +%{_mandir}/man8/logsave.8* +%{_mandir}/man8/mke2fs.8* +%{_mandir}/man8/mkfs.ext2.8* +%{_mandir}/man8/mkfs.ext3.8* +%{_mandir}/man8/mkfs.ext4.8* +%{_mandir}/man8/mklost+found.8* +%{_mandir}/man8/resize2fs.8* +%{_mandir}/man8/tune2fs.8* +%exclude %{_mandir}/man8/fsck.ext4dev.8* +%exclude %{_mandir}/man8/mkfs.ext4dev.8* + +%files libs +%defattr(-,root,root) +%doc COPYING +%{_libdir}/libe2p.so.* +%{_libdir}/libext2fs.so.* + +%files static +%defattr(-,root,root) +%doc COPYING +%{_libdir}/*.a + +%files devel +%defattr(-,root,root) +%{_infodir}/libext2fs.info* +%{_libdir}/libe2p.so +%{_libdir}/libext2fs.so +%{_libdir}/pkgconfig/e2p.pc +%{_libdir}/pkgconfig/ext2fs.pc +%{_libdir}/pkgconfig/quota.pc + +%{_includedir}/e2p +%{_includedir}/ext2fs +%{_includedir}/quota + +%files -n libcom_err +%defattr(-,root,root) +%doc COPYING +%{_libdir}/libcom_err.so.* + +%files -n libcom_err-devel +%defattr(-,root,root) +%{_bindir}/compile_et +%{_libdir}/libcom_err.so +%{_datadir}/et +%{_includedir}/et +%{_includedir}/com_err.h +%{_mandir}/man1/compile_et.1* +%{_mandir}/man3/com_err.3* +%{_libdir}/pkgconfig/com_err.pc + +%files -n libss +%defattr(-,root,root) +%doc COPYING +%{_libdir}/libss.so.* + +%files -n libss-devel +%defattr(-,root,root) +%{_bindir}/mk_cmds +%{_libdir}/libss.so +%{_datadir}/ss +%{_includedir}/ss +%{_mandir}/man1/mk_cmds.1* +%{_libdir}/pkgconfig/ss.pc + +%changelog +* Tue Nov 14 2017 Lukas Czerner 1.42.9-11 +- libext2fs: skip start_blk adjustment when stride and flex_bg is set (#1503969) +- tune2fs: edit dire warning about check intervals (#1433233) + +* Thu Mar 16 2017 Lukas Czerner 1.42.9-10 +- libext2fs: don't ignore fsync errors (#1405049) +- Fix nroff macro issue in chattr man page (#1429213) + +* Mon Jun 13 2016 Eric Sandeen 1.42.9-9 +- resize2fs: clear uninit BG if allocating from new group (#1262498) + +* Fri Feb 19 2016 Eric Sandeen 1.42.9-8 +- e4defrag: backwards-allocated files should be defragmented (#1176785) +- tune2fs: allow removal of dirty journal with two "-f" options (#1212376) +- mke2fs: prevent creation of filesystem with unsupported revision (#1212378) +- libext2fs: prevent buffer overflows (#1293677) + +* Wed Jan 21 2015 Eric Sandeen 1.42.9-7 +- Don't require e2fsck for resize2fs -P (#1183492) + +* Fri Oct 24 2014 Eric Sandeen 1.42.9-6 +- Fix endian bug in extent code (#1081836) + +* Fri Sep 19 2014 Eric Sandeen 1.42.9-5 +- Various manpage updates for chattr and mount (#1053885) +- Fix resize2fs -P hang on corrupted filesystems (#1104612) + +* Tue Mar 11 2014 Lukas Czerner - 1.42.9-4 +- Fix posisble use after free in some error paths (#997982) +- Enable lazy_itable_init even if ext4 module is not loaded (#1071909) +- Remove any ocurence of ext4dev and test_fs from e2fsprogs (#1063801) +- Allow to resize ext4 file system past 16TB (#982871) +- Disable altivec instructions for libext2fs on ppc (#1074604) + +* Fri Jan 24 2014 Daniel Mach - 1.42.9-3 +- Mass rebuild 2014-01-24 + +* Mon Jan 20 2014 Eric Sandeen 1.42.9-2 +- Fix Source0 URL + +* Thu Jan 01 2014 Eric Sandeen 1.42.9-1 +- New upstream release (#1051588) +- Re-enable disabled tests for now + +* Fri Dec 27 2013 Daniel Mach - 1.42.8-3 +- Mass rebuild 2013-12-27 + +* Fri Jul 19 2013 Stef walter 1.42.8-2 +- Interpackage dependencies should be for same arch (#986428) + +* Wed Jun 26 2013 Eric Sandeen 1.42.8-1 +- New upstream release + +* Tue Jan 29 2013 Eric Sandeen 1.42.7-2 +- Tighten up inter-package dependencies + +* Tue Jan 22 2013 Eric Sandeen 1.42.7-1 +- New upstream release + +* Tue Oct 02 2012 Eric Sandeen 1.42.6-2 +- Switch back to gzipped tarball to make sf.net source URL correct + +* Tue Oct 02 2012 Eric Sandeen 1.42.6-1 +- New upstream release + +* Thu Aug 16 2012 Eric Sandeen 1.42.5-2 +- Add explicit library deps to e2fsprogs (#848805) + +* Mon Jul 30 2012 Eric Sandeen 1.42.5-1 +- New upstream release + +* Wed Jul 18 2012 Fedora Release Engineering - 1.42.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Tue Jun 12 2012 Eric Sandeen 1.42.4-1 +- New upstream release + +* Thu May 31 2012 Eric Sandeen 1.42.3-2 +- Fixes for > 16T filesystems + +* Mon May 14 2012 Eric Sandeen 1.42.3-1 +- New upstream release + +* Sun Apr 22 2012 Eric Sandeen 1.42.2-6 +- Add missing [options] tag to e2fsck.conf + +* Fri Apr 20 2012 Eric Sandeen 1.42.2-5 +- Add broken system clock config to e2fsck.conf to let boot + continue even if system clock very wrong. + +* Mon Apr 09 2012 Eric Sandeen 1.42.2-4 +- Handle 32-bit bitmaps in new find_first_zero functions + +* Fri Mar 30 2012 Richard W.M. Jones 1.42.2-3 +- Rebuild against new RPM (RHBZ#808250). + +* Wed Mar 28 2012 Eric Sandeen 1.42.2-2 +- Move files out of /sbin and /lib into /usr/... + +* Tue Mar 27 2012 Eric Sandeen 1.42.2-1 +- New upstream release + +* Mon Feb 20 2012 Eric Sandeen 1.42.1-1 +- New upstream release + +* Fri Jan 13 2012 Fedora Release Engineering - 1.42-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Tue Nov 29 2011 Eric Sandeen 1.42-1 +- New upstream point release + +* Mon Nov 21 2011 Eric Sandeen 1.42-0.9.WIP.1120 +- Build the right tarball for 1.42-WIP-1120 + +* Mon Nov 21 2011 Eric Sandeen 1.42-0.8.WIP.1120 +- New upstream snapshot release + +* Thu Nov 10 2011 Eric Sandeen 1.42-0.7.WIP.1016 +- Several mmp-related fixes + +* Tue Nov 08 2011 Eric Sandeen 1.42-0.6.WIP.1016 +- Fix e2fsck / make check on big endian arch + +* Mon Oct 17 2011 Eric Sandeen 1.42-0.5.WIP.1016 +- New upstream snapshot release + +* Mon Oct 10 2011 Eric Sandeen 1.42-0.4.WIP.2011.1009 +- New upstream snapshot release + +* Mon Sep 26 2011 Eric Sandeen 1.42-0.3.WIP.0925 +- New upstream snapshot release + +* Tue Aug 09 2011 Eric Sandeen 1.42-0.2.WIP.0702 +- Fix use of uninitialized memory via ext2fs_copy_generic_bmap() + +* Tue Aug 09 2011 Eric Sandeen 1.42-0.1.WIP.0702 +- Test release for >16T support + +* Tue Feb 08 2011 Fedora Release Engineering - 1.41.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Dec 23 2010 Eric Sandeen 1.41.14-1 +- New upstream release + +* Wed Dec 22 2010 Dan HorĂ¡k 1.41.13-2 +- Add upstream fix for big-endian machines + +* Mon Dec 20 2010 Eric Sandeen 1.41.13-1 +- New upstream release + +* Tue Dec 07 2010 Eric Sandeen 1.41.12-7 +- Fix up UTF-8 formatting in e2fsck output (#655227) + +* Wed Oct 06 2010 Eric Sandeen 1.41.12-6 +- Install e4defrag for testing + +* Mon Jul 13 2010 Eric Sandeen 1.41.12-5 +- Relax fsck requirements for resize2fs -P + +* Mon Jul 12 2010 Eric Sandeen 1.41.12-4 +- Add COPYING file to the static subpackage + +* Wed Jun 02 2010 Eric Sandeen 1.41.12-3 +- Reinstate static libs in dedicated package (#596377) + +* Wed May 19 2010 Eric Sandeen 1.41.12-2 +- Fix fsck thinko in 1.41.12 release + +* Mon May 17 2010 Eric Sandeen 1.41.12-1 +- New upstream version + +* Mon Mar 15 2010 Eric Sandeen 1.41.11-1 +- New upstream version + +* Mon Mar 01 2010 Eric Sandeen 1.41.10-5 +- Don't ask for confirmation of misaligned mkfs with -F (#569021) + +* Tue Feb 23 2010 Eric Sandeen 1.41.10-4 +- Fix for e2fsck -fD corruption + +* Fri Feb 12 2010 Eric Sandeen 1.41.10-3 +- And drop virtual provides for static libs + +* Fri Feb 12 2010 Eric Sandeen 1.41.10-2 +- Drop static libs (#545144) + +* Wed Feb 10 2010 Eric Sandeen 1.41.10-1 +- New upstream version + +* Sun Feb 07 2010 Eric Sandeen 1.41.9-10 +- Upstream version of resize2fs array fix, original was wrong + +* Sat Jan 23 2010 Eric Sandeen 1.41.9-9 +- Fix up stray output & re-enable make check +- Fix dlopen issues for newer libreadline +- Fix access beyond end of array in resize2fs + +* Tue Nov 10 2009 Eric Sandeen 1.41.9-8 +- Fix up topology patch to build w/ new util-linux-ng +- Fix endian swapping of backup journal blocks in sb + +* Tue Nov 10 2009 Eric Sandeen 1.41.9-7 +- Re-enable "make check" during build + +* Wed Oct 28 2009 Eric Sandeen 1.41.9-6 +- Add support for block discard (TRIM) at mkfs time +- Add support for new blkid topology awareness + +* Mon Oct 19 2009 Eric Sandeen 1.41.9-5 +- Allow superblock timestamp differences up to 24h (#522969) + +* Tue Oct 06 2009 Eric Sandeen 1.41.9-4 +- Fix install with --excludedocs (#515987) + +* Thu Sep 14 2009 Eric Sandeen 1.41.9-3 +- Drop defrag bits for now, not ready yet. + +* Thu Sep 10 2009 Josef Bacik 1.41.9-2 +- Fix resize -m bug with flexbg (#519131) + +* Sun Aug 23 2009 Eric Sandeen 1.41.9-1 +- New upstream release + +* Fri Aug 05 2009 Eric Sandeen 1.41.8-6 +- Fix filefrag in fallback case +- Add e2freefrag & e4defrag (experimental) + +* Sun Jul 26 2009 Karel Zak 1.41.8-5 +- disable fsck (replaced by util-linux-ng) + +* Sat Jul 25 2009 Karel Zak 1.41.8-4 +- disable libuuid and uuidd (replaced by util-linux-ng) + +* Fri Jul 24 2009 Fedora Release Engineering - 1.41.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Fri Jul 17 2009 Eric Sandeen 1.41.8-2 +- Address some package review concerns (#225714) + +* Sun Jul 12 2009 Eric Sandeen 1.41.8-1 +- New upstream version, several resize fixes. + +* Tue Jun 30 2009 Eric Sandeen 1.41.7-1 +- New upstream version + +* Fri Jun 26 2009 Eric Sandeen 1.41.6-6 +- Split out sub-libraries (#225406) +- Don't start uuidd by default + +* Thu Jun 18 2009 Eric Sandeen 1.41.6-5 +- Update journal backup blocks in sb after resize (#505339) +- Fix memory leak in extent handling functions +- Fix bug in inode writing in extent code, clobbered i_extra_isize etc + +* Mon Jun 8 2009 Karel Zak 1.41.6-4 +- set BuildRequires: libblkid-devel (from util-linux-ng) + +* Mon Jun 8 2009 Karel Zak 1.41.6-3 +- temporary use BuildRequires: e2fsprogs-devel (we cannot install + new util-linux-ng with libblkid to buildroots without new e2fsprogs + without libblkid). + +* Thu Jun 4 2009 Karel Zak 1.41.6-2 +- disable libblkid (replaced by libblkid from util-linux-ng) + +* Sat May 30 2009 Eric Sandeen 1.41.6-1 +- New upstream version + +* Fri Apr 24 2009 Eric Sandeen 1.41.5-1 +- New upstream version + +* Wed Apr 22 2009 Eric Sandeen 1.41.4-8 +- Fix support for external journals + +* Wed Apr 22 2009 Eric Sandeen 1.41.4-7 +- Fix ext4 resize issues (#496982) + +* Sat Apr 11 2009 Eric Sandeen 1.41.4-6 +- ignore differing NEEDS_RECOVERY flag on fsck post-resize (#471925) + +* Thu Feb 26 2009 Eric Sandeen 1.41.4-5 +- fix a couple missed descriptions; obsolete e4fsprogs + +* Thu Feb 26 2009 Eric Sandeen 1.41.4-4 +- Edit summary & description to include ext4 (#487469) +- Fix blkid null ptr deref in initrd (#486997) + +* Tue Feb 24 2009 Fedora Release Engineering - 1.41.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jan 29 2009 Eric Sandeen 1.41.4-2 +- Fix debugfs "stat" segfault if no open fs (#482894) +- Fix name of libext2fs info page (#481620) + +* Thu Jan 29 2009 Eric Sandeen 1.41.4-1 +- New upstream release +- Dropped btrfs & resize fixes, upstream now + +* Tue Jan 20 2009 Eric Sandeen 1.41.3-4 +- resize2fs fixes, esp. for ext4 + +* Sat Jan 10 2009 Eric Sandeen 1.41.3-3 +- Remove conservative "don't change journal location" patch for F11 +- Add btrfs recognition to blkid + +* Mon Oct 03 2008 Eric Sandeen 1.41.3-2 +- Bump to revision 2, f10 was behind f9, oops. + +* Mon Oct 03 2008 Eric Sandeen 1.41.3-1 +- New upstream version (very minor fixes, ext4-related) + +* Thu Oct 02 2008 Eric Sandeen 1.41.2-2 +- Fix blkid to recognize ext4dev filesystems as ext4-mountable + +* Thu Oct 02 2008 Eric Sandeen 1.41.2-1 +- New upstream version +- Updated default dir hash (half_md4) for better perf & fewer collisions +- Fixed ext4 online resizing with flex_bg +- ext4 journal now in extents format and in middle of filesystem +- fix unreadable e2image files +- fix file descriptor leak in libcom_err (#464689) + +* Sat Aug 23 2008 Eric Sandeen 1.41.0-2 +- Don't check the group checksum when !GDT_CSUM (#459875) + +* Thu Jul 10 2008 Eric Sandeen 1.41.0-1 +- New upstream version +- ext4 capable + +* Mon Jul 07 2008 Eric Sandeen 1.41-0.2.WIP.0707 +- Fix release macro snafu + +* Mon Jul 07 2008 Eric Sandeen 1.41-0.1.WIP.0707 +- New upstream snapshot release + +* Fri Jun 20 2008 Eric Sandeen 1.41-0.WIP.0617.1 +- Fix blkid -g segfault when clearing entries (#452333) + +* Wed Jun 18 2008 Eric Sandeen 1.41-0.WIP.0617 +- New upstream snapshot release for ext4 capability + +* Wed Jun 04 2008 Eric Sandeen 1.40.10-3 +- Tidy up multilib hack for non-multilib arches (#446016) +- Fix up postun script (#449868) + +* Wed Jun 04 2008 Dennis Gilmore 1.40.10-2 +- setup header support for sparc + +* Fri May 23 2008 Eric Sandeen 1.40.10-1 +- New upstream version +- Fixes unprivileged blkid use problem (#448591) + +* Mon May 12 2008 Eric Sandeen 1.40.9-2 +- Fix blkid swap recognition on big-endian boxes (#445786) + +* Sun Apr 27 2008 Eric Sandeen 1.40.9-1 +- New upstream version + +* Fri Mar 14 2008 Eric Sandeen 1.40.8-2 +- Update ext2fs_swap_inode_full() fix to match upstream +- Check more of swapv1 header in blkid detection (#442937) + +* Fri Mar 14 2008 Eric Sandeen 1.40.8-1 +- New upstream version + +* Mon Mar 03 2008 Eric Sandeen 1.40.7-2 +- second try at fixing resize2fs vs. large inodes... (#434893) + +* Fri Feb 29 2008 Eric Sandeen 1.40.7-1 +- New upstream version, special leap-day edition +- Fix resize2fs losing inline xattrs when shrinking (#434893) + and add patch to fix swap_inode_full in this case +- Allow mke2fs & tune2fs to manipulate large_file feature (#258381) +- Handle lvm error conditions in libblkid (#433857) +- Allow tune2fs to clear the resize_inode feature (#167816) +- Teach blkid to detect LVM2 physical volumes (#409321) +- Show "mostly printable" xattrs as text in debugfs (#430621) +- Trimmed pre-1.38 rpm changelog entries + +* Sun Feb 10 2008 Eric Sandeen 1.40.6-1 +- New upstream version + +* Fri Feb 08 2008 Eric Sandeen 1.40.5-2 +- gcc-4.3 rebuild + +* Mon Jan 28 2008 Eric Sandeen 1.40.5-1 +- New upstream version, drop several now-upstream patches. + +* Thu Jan 24 2008 Eric Sandeen 1.40.4-7 +- Fix sb flag comparisons properly this time (#428893) +- Make 256-byte inodes for the [default] mkfs case. + This will facilitate upgrades to ext4 later, and help xattr perf. + +* Wed Jan 23 2008 Eric Sandeen 1.40.4-6 +- Completely clobber e2fsck.static build. + +* Wed Jan 23 2008 Eric Sandeen 1.40.4-5 +- Ignore some primary/backup superblock flag differences (#428893) +- Teach libblkid about ext4dev. + +* Mon Jan 10 2008 Eric Sandeen 1.40.4-4 +- Build e2fsck as a dynamically linked binary. +- Re-fix uidd manpage default paths. + +* Tue Jan 09 2008 Eric Sandeen 1.40.4-3 +- New uuidd subpackage, and properly set up uuidd at install. + +* Tue Jan 01 2008 Eric Sandeen 1.40.4-2 +- Add new uidd files to specfile + +* Tue Jan 01 2008 Eric Sandeen 1.40.4-1 +- New upstream version, drop several now-upstream patches. + +* Tue Jan 01 2008 Eric Sandeen 1.40.2-15 +- Drop resize_inode removal patch from tune2fs; ostensibly was + for old kernels which could not mount, but seems to be fine. +- Drop pottcdate removal patch, and don't rebuild .po files, + causes multilib problems and we generally shouldn't rebuild. +- Drop multilib patch; wrapper header should take care of this now. +- Drop ->open rename, Fedora seems ok with this now. + +* Tue Dec 11 2007 Eric Sandeen 1.40.2-14 +- Fix integer overflows (#414591 / CVE-2007-5497) + +* Tue Dec 4 2007 Stepan Kasal 1.40.2-13 +- The -devel package now requires device-mapper-devel, to match + the dependency in blkid.pc (#410791) + +* Tue Nov 27 2007 Eric Sandeen 1.40.2-12 +- Use upstream patch for blkid fat detection, avoids div-by-zero + when encountering some BSD partitions (#398281) + +* Tue Oct 23 2007 Eric Sandeen 1.40.2-11 +- Add arm to multilib header wrapper + +* Sat Oct 20 2007 Eric Sandeen 1.40.2-10 +- Make (more) file timestamps match those in tarball for multilib tidiness +- Fix e2fsprogs-libs summary (shared libs not static) + +* Tue Oct 15 2007 Eric Sandeen 1.40.2-9 +- Detect big-endian squashfs filesystems in libblkid (#305151) + +* Tue Oct 02 2007 Eric Sandeen 1.40.2-8 +- Detect squashfs filesystems in libblkid (#305151) + +* Tue Sep 18 2007 Eric Sandeen 1.40.2-7 +- Fix blkid fat probe when there is a real MBR (#290951) + +* Tue Sep 18 2007 Oliver Falk 1.40.2-6 +- Add alpha to the header wrappers + +* Fri Sep 07 2007 Eric Sandeen 1.40.2-5 +- wrap a couple headers to fix multilib issues (#270441) + +* Wed Aug 29 2007 Eric Sandeen 1.40.2-4 +- add gawk to e2fsprogs-devel Requires, compile_et needs it (#265961) + +* Thu Aug 23 2007 Eric Sandeen 1.40.2-3 +- Update license tags +- Fix one open-create caller with no mode +- Protect ->open ops from glibc open-create-mode-checker +- Fix source URL +- Add gawk to BuildRequires + +* Wed Jul 18 2007 Eric Sandeen 1.40.2-2 +- Fix bug in ext2fs_swap_inode_full() on big-endian boxes + +* Tue Jul 17 2007 Eric Sandeen 1.40.2-1 +- New version 1.40.2 +- Fix up warning in badblocks + +* Mon Jun 25 2007 Eric Sandeen 1.39-15 +- Fix up .po files to remove timestamps; multilib issues (#245653) + +* Fri Jun 22 2007 Eric Sandeen 1.39-14 +- Many coverity-found potential leaks, segfaults, etc (#239354) +- Fix debugfs segfaults when no fs open (#208416, #209330) +- Avoid recursive loops in logdump due to symlinks in /dev (#210371) +- Don't write changes to the backup superblocks by default (#229561) +- Correct byteswapping for fast symlinks with xattrs (#232663) +- e2fsck: added sanity check for xattr validation (#230193) + +* Wed Jun 20 2007 Eric Sandeen 1.39-13 +- add dist tag to release field + +* Wed Jun 20 2007 Eric Sandeen 1.39-12 +- add LUKS support to libblkid (#242421) + +* Fri Feb 23 2007 Karsten Hopp 1.39-11 +- fix post/preun requirements +- use smp flags + +* Mon Feb 05 2007 Alasdair Kergon - 1.39-10 +- Add build dependency on new device-mapper-devel package. + +* Mon Dec 25 2006 Thomas Woerner - 1.39-9 +- build fixes for new automake 1.10 (#220715) + +* Mon Dec 18 2006 Thomas Woerner - 1.39-8 +- make uuid_generate_time generate unique uuids (#218606) + +* Wed Sep 20 2006 Jarod Wilson - 1.39-7 +- 32-bit 16T fixups from esandeen (#202807) +- Update summaries and descriptions + +* Sun Sep 17 2006 Karel Zak - 1.39-6 +- Fix problem with empty FAT label (#206656) + +* Tue Sep 5 2006 Peter Jones - 1.39-5 +- Fix memory leak in device probing. + +* Mon Jul 24 2006 Thomas Woerner - 1.39-4 +- fixed multilib devel conflicts (#192665) + +* Thu Jul 20 2006 Bill Nottingham - 1.39-3 +- prevent libblkid returning /dev/dm-X + +* Wed Jul 12 2006 Jesse Keating - 1.39-2.1 +- rebuild + +* Mon Jul 10 2006 Karel Zak - 1.39-2 +- add GFS abd GFS2 support to libblkid + +* Thu Jul 6 2006 Thomas Woerner - 1.39-1 +- new version 1.39 +- dropped ext2online, because resize2fs is now able to do online resize +- spec file cleanup +- enabled checks for build + +* Tue Jun 13 2006 Bill Nottingham - 1.38-15 +- prevent libblkid returning /dev/dm-X +- fix build + +* Tue Mar 21 2006 Karel Zak - 1.38-14 +- prevent error messages to stderr caused by libblkid calling libdevmapper + +* Mon Mar 13 2006 Karel Zak - 1.38-13 +- used upstream version of the blkid-epoch patch (by Theodore Tso, #182188) + +* Wed Mar 8 2006 Peter Jones - 1.38-12 +- Move /etc/blkid.tab to /etc/blkid/blkid.tab + +* Tue Mar 7 2006 David Cantrell - 1.38-11 +- BuildRequires pkgconfig + +* Tue Mar 7 2006 David Cantrell - 1.38-10 +- Disable /etc/blkid.tab caching if time is set before epoch (#182188) + +* Fri Feb 24 2006 Peter Jones - 1.38-9 +- _don't_ handle selinux context on blkid.tab, dwalsh says this is a no-no. + +* Wed Feb 22 2006 Peter Jones - 1.38-8 +- handle selinux context on blkid.tab + +* Mon Feb 20 2006 Karsten Hopp 1.38-7 +- BuildRequires: gettext-devel + +* Fri Feb 10 2006 Jesse Keating - 1.38-6.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 7 2006 Jesse Keating - 1.38-6.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Wed Jan 11 2006 Karel Zak 1.38-6 +- cleanup device-mapper patch +- use pkg-config for device-mapper + +* Mon Jan 9 2006 Peter Jones 1.38-5 +- fix some more minor logic errors in dm probing + +* Wed Jan 4 2006 Peter Jones 1.38-4 +- fix a logic error in dm probing +- add priority group for dm devices, so they'll be preferred + +* Tue Jan 3 2006 Peter Jones 1.38-3 +- added support for device-mapper devices + +* Fri Dec 9 2005 Jesse Keating +- rebuilt + +* Thu Nov 10 2005 Thomas Woerner 1.38-2.1 +- fixed file conflicts between 32bit and 64bit packages (#168815) +- fixed mklost+found crashes with buffer overflow (#157773) + Thanks to Arjan van de Ven for the patch + +* Wed Nov 9 2005 Thomas Woerner 1.38-2 +- splitted up libs from main package, into a new e2fsprogs-libs package +- fixed requires and prereqs + +* Thu Sep 8 2005 Thomas Woerner 1.38-1 +- new version 1.38 +- Close File descriptor for unregognized devices (#159878) + Thanks to David Milburn for the patch. + Merged from RHEL-4 +- enable tune2fs to set and clear feature resize_inode (#167816) +- removed outdated information from ext2online man page (#164383) +