Fix large file handling on 32-bit machines
This commit is contained in:
parent
65636baf3d
commit
f4a48ca25d
42
e2fsprogs-1.42.10-largefile.patch
Normal file
42
e2fsprogs-1.42.10-largefile.patch
Normal file
@ -0,0 +1,42 @@
|
||||
[PATCH] mke2fs: use ext2fs_open_file() in check_plausibility()
|
||||
|
||||
The commit:
|
||||
|
||||
802146c mke2fs: create a regular file if necessary
|
||||
|
||||
caused a regression on 32-bit machines; the open() fails if
|
||||
the file size is > 4G.
|
||||
|
||||
Using ext2fs_open_file() fixes it.
|
||||
|
||||
Resolves: Red Hat Bugzilla #1099892
|
||||
|
||||
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||
---
|
||||
|
||||
V2: against master! Sorry, first patch was against the
|
||||
bisection point.
|
||||
|
||||
TBH I don't know if this should be using ext2fs_open_file(),
|
||||
or some other magic like O_LARGEFILE, but this works for me,
|
||||
and we use the stat/fstat wrapper here too, so ...
|
||||
|
||||
diff --git a/misc/util.c b/misc/util.c
|
||||
index 1c0818f..9475fc6 100644
|
||||
--- a/misc/util.c
|
||||
+++ b/misc/util.c
|
||||
@@ -194,10 +194,10 @@ int check_plausibility(const char *device, int flags, int *ret_is_dev)
|
||||
char *fs_type = NULL;
|
||||
char *fs_label = NULL;
|
||||
|
||||
- fd = open(device, fl, 0666);
|
||||
+ fd = ext2fs_open_file(device, fl, 0666);
|
||||
if ((fd < 0) && (errno == ENOENT) && (flags & CREATE_FILE)) {
|
||||
fl |= O_CREAT;
|
||||
- fd = open(device, fl, 0666);
|
||||
+ fd = ext2fs_open_file(device, fl, 0666);
|
||||
if (fd >= 0 && (flags & VERBOSE_CREATE))
|
||||
printf(_("Creating regular file %s\n"), device);
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Utilities for managing ext2, ext3, and ext4 filesystems
|
||||
Name: e2fsprogs
|
||||
Version: 1.42.10
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
# License tags based on COPYING file distinctions for various components
|
||||
License: GPLv2
|
||||
@ -11,6 +11,7 @@ Source1: ext2_types-wrapper.h
|
||||
Source2: e2fsck.conf
|
||||
|
||||
Patch1: e2fsprogs-1.40.4-sb_feature_check_ignore.patch
|
||||
Patch2: e2fsprogs-1.42.10-largefile.patch
|
||||
|
||||
Url: http://e2fsprogs.sourceforge.net/
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
@ -150,6 +151,7 @@ It was originally inspired by the Multics SubSystem library.
|
||||
# mildly unsafe but 'til I get something better, avoid full fsck
|
||||
# after an selinux install...
|
||||
%patch1 -p1 -b .featurecheck
|
||||
%patch2 -p1
|
||||
|
||||
%build
|
||||
%configure --enable-elf-shlibs --enable-nls --disable-uuidd --disable-fsck \
|
||||
@ -325,6 +327,9 @@ exit 0
|
||||
%{_libdir}/pkgconfig/ss.pc
|
||||
|
||||
%changelog
|
||||
* Wed May 21 2014 Eric Sandeen <sandeen@redhat.com> 1.42.10-2
|
||||
- Fix large file handling on 32-bit builds
|
||||
|
||||
* Mon May 19 2014 Eric Sandeen <sandeen@redhat.com> 1.42.10-1
|
||||
- New upstream release
|
||||
- Enable userspace quota
|
||||
|
Loading…
Reference in New Issue
Block a user