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/SPECS/e2fsprogs.spec b/SPECS/e2fsprogs.spec index 1b1d08c..8128f85 100644 --- a/SPECS/e2fsprogs.spec +++ b/SPECS/e2fsprogs.spec @@ -1,7 +1,7 @@ Summary: Utilities for managing ext2, ext3, and ext4 filesystems Name: e2fsprogs Version: 1.42.9 -Release: 10%{?dist} +Release: 11%{?dist} # License tags based on COPYING file distinctions for various components License: GPLv2 @@ -34,6 +34,8 @@ 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) @@ -207,6 +209,8 @@ It was originally inspired by the Multics SubSystem library. %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 +%patch26 -p1 %build %configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \ @@ -394,6 +398,10 @@ exit 0 %{_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)