[Bug 200043] lseek returns negative and inconsistent positions for directories on ext4 fs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=200043

Andreas Dilger (adilger.kernelbugzilla@xxxxxxxxx) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adilger.kernelbugzilla@dilg
                   |                            |er.ca

--- Comment #1 from Andreas Dilger (adilger.kernelbugzilla@xxxxxxxxx) ---
It should be noted that seek on an ext4 *htree* directory is handled in terms
of the hash of the filename (which is the value returned by telldir()), not in
terms of the byte offset.  The valid hash values for htree directories are in
the range [0,EXT4_HTREE_EOF_64BIT] ([0,2^63 - 1]) on 64-bit systems.

Seeking on a non-htree directory (any directory 4KB in size) is handled via
ext4_llseek()->generic_file_llseek_size().  Seeking to a negative offset on a
directory doesn't particularly make sense, so should probably have some more
strict limits imposed than regular files.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux