[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bug-205957-13602-H8nsmeKGIj@https.bugzilla.kernel.org/>
Date: Tue, 24 Dec 2019 18:16:37 +0000
From: bugzilla-daemon@...zilla.kernel.org
To: linux-ext4@...r.kernel.org
Subject: [Bug 205957] Ext4 64 bit hash breaks 32 bit glibc 2.28+
https://bugzilla.kernel.org/show_bug.cgi?id=205957
Andreas Dilger (adilger.kernelbugzilla@...ger.ca) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |adilger.kernelbugzilla@...g
| |er.ca
--- Comment #2 from Andreas Dilger (adilger.kernelbugzilla@...ger.ca) ---
IMHO, it is broken to be calling a 64-bit interface like getdents64() and then
be unhappy when it is returning 64-bit values. As previously stated, it would
be possible to add a "32bitapi" mount option to force ext4 to always return
32-bit offset values, as is done with NFS.
The alternative is for QEMU's telldir() to see that d_off is a 64-bit value,
but is exporting a 32-bit interface and downshift the offset to fit into a
32-bit field. It would store a '64BITOFFSET' flag in the file descriptor in
this case, and if seekdir() is called on that fd it will upshift the offset to
a 64-bit value again. That will lose the low bits of the offset, but that is
unlikely to be noticeable until there are more than 65000 entries in a
directory. Since the hash values are uniformly distributed, they will almost
immediately exceed 32 bits, and telldir() is uncommon for use after the first
entry is read, so this detection will work reliably.
--
You are receiving this mail because:
You are watching the assignee of the bug.
Powered by blists - more mailing lists