Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1099892 - mke2fs on i686 now fails with "Value too large for defined data type"
Summary: mke2fs on i686 now fails with "Value too large for defined data type"
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: rawhide
Hardware: i686
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: TRACKER-bugs-affecting-libguestfs
TreeView+ depends on / blocked
 
Reported: 2014-05-21 12:22 UTC by Richard W.M. Jones
Modified: 2014-07-13 12:19 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-21 17:50:26 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-05-21 12:22:06 UTC
Description of problem:

mke2fs on Rawhide (but not Fedora 20) has started to fail on i686
with:

/usr/sbin/mke2fs -t ext2 -Fq '/tmp/tmp.8XawRF2EgH/d2.0ryxonke/root
Could not open /tmp/tmp.8XawRF2EgH/d2.0ryxonke/root: Value too large for defined data type

The size of the file is 4GB exactly.

This FAQ suggests that this error is because the utility has
been compiled incorrectly:
https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#Value-too-large-for-defined-data-type

Note that this does not fail on x86-64, nor on Fedora 20, nor
on earlier versions of Rawhide.  The failure has started in the
last few days.

Version-Release number of selected component (if applicable):

e2fsprogs-1.42.10-1.fc21.i686

How reproducible:

Unknown.

Steps to Reproduce:
1. Create 4GB file.
2. mke2fs -t ext2 -Fq file

Additional info:

The full log is here:
http://kojipkgs.fedoraproject.org//work/tasks/614/6870614/build.log

Comment 1 Eric Sandeen 2014-05-21 16:04:14 UTC
Cripes, did e2fsprogs lose -D_FILE_OFFSET_BITS=64 / O_LARGEFILE stuff?  Bleah, I'll look into it.

Comment 2 Eric Sandeen 2014-05-21 17:22:20 UTC
It's a regression, this should fix it.

diff --git a/misc/util.c b/misc/util.c
index f85942e..da98d00 100644
--- a/misc/util.c
+++ b/misc/util.c
@@ -89,7 +89,7 @@ int check_plausibility(const char *device, int flags, int *ret_is_dev)
 {
 	int fd, is_dev = 0;
 	ext2fs_struct_stat s;
-	int fl = O_RDONLY;
+	int fl = O_RDONLY|O_LARGEFILE;
 
 	if (flags & CREATE_FILE)
 		fl |= O_CREAT;

Comment 3 Eric Sandeen 2014-05-21 17:50:26 UTC
actually, using ext2fs_open_file() is probably better.

Anyway, fix building for rawhide.

Thanks for the report!

-Eric

Comment 4 Richard W.M. Jones 2014-05-21 18:46:39 UTC
I have verified this fixes the problem for me, thanks.

Comment 5 Richard W.M. Jones 2014-07-13 12:19:17 UTC
Same thing recently affected Debian:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=754614

For reference the commit that fixes this is:

https://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=a7b0f770b0f3f058ff1682beba5a78def91e91a7


Note You need to log in before you can comment on or make changes to this bug.