* Mon Jul 13 2010 Eric Sandeen <sandeen@redhat.com> 1.41.12-5

- Relax fsck requirements for resize2fs -P
This commit is contained in:
Eric Sandeen 2010-07-13 21:31:56 +00:00
parent 41314dec32
commit bcad33d4cf
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,33 @@
(sent upstream, not yet merged/committed)
[PATCH] resize2fs: relax requirements for -P output a bit
Requiring an immediate pre-fsck before printing a minimum
resize size seems a bit draconian; if the fs isn't clean or marked
with error, then certainly, but for an informational minimum
size, I don't think we need to require a fsck since last mount.
I had simply copied the checks from the actual resize path,
previously.
Installers use this option (-P) to gather minimum resize info,
and requiring an actual fsck before use just seems to go too far.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/resize/main.c b/resize/main.c
index 7c4f4dd..7d8b287 100644
--- a/resize/main.c
+++ b/resize/main.c
@@ -345,8 +345,7 @@ int main (int argc, char ** argv)
min_size = calculate_minimum_resize_size(fs);
if (print_min_size) {
- if (!force && ((fs->super->s_lastcheck < fs->super->s_mtime) ||
- (fs->super->s_state & EXT2_ERROR_FS) ||
+ 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"),

View File

@ -4,7 +4,7 @@
Summary: Utilities for managing ext2, ext3, and ext4 filesystems
Name: e2fsprogs
Version: 1.41.12
Release: 3%{?dist}
Release: 5%{?dist}
# License tags based on COPYING file distinctions for various components
License: GPLv2
@ -14,6 +14,7 @@ Source1: ext2_types-wrapper.h
Patch1: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
Patch2: e2fpsrogs-1.41.12-EOFBLOCKS-test.patch
Patch3: e2fsprogs-1.41.12-relax-resize2fs-P.patch
Url: http://e2fsprogs.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -151,6 +152,8 @@ It was originally inspired by the Multics SubSystem library.
# Test for EOFBLOCKS was backwards
%patch2 -p1 -b .EOFBLOCKS
# relax resize2fs -P requirements a bit
%patch3 -p1 -b .resize2fs
%build
%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
@ -271,6 +274,7 @@ exit 0
%files static
%defattr(-,root,root)
%doc COPYING
%{_libdir}/*.a
%files devel
@ -314,6 +318,12 @@ exit 0
%{_libdir}/pkgconfig/ss.pc
%changelog
* Mon Jul 13 2010 Eric Sandeen <sandeen@redhat.com> 1.41.12-5
- Relax fsck requirements for resize2fs -P
* Mon Jul 12 2010 Eric Sandeen <sandeen@redhat.com> 1.41.12-4
- Add COPYING file to the static subpackage
* Wed Jun 02 2010 Eric Sandeen <sandeen@redhat.com> 1.41.12-3
- Reinstate static libs in dedicated package (#596377)