All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] 32/64 bit llseek hashes
@ 2011-07-27 11:02 Bernd Schubert
       [not found] ` <20110727110148.204979.49551.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
  2011-07-27 11:02 ` [PATCH 3/3] nfsd: vfs_llseek() with O_32BITHASH or O_64BITHASH Bernd Schubert
  0 siblings, 2 replies; 13+ messages in thread
From: Bernd Schubert @ 2011-07-27 11:02 UTC (permalink / raw)
  To: linux-nfs, linux-ext4; +Cc: linux-fsdevel, yong.fan, adilger, tytso

With the ext3/ext4 directory index implementation hashes are used to specify
offsets for llseek(). For compatibility with NFSv2 and 32-bit user space
on 64-bit systems (kernel space) ext3/ext4 currently only return 32-bit 
hashes and therefore the probability of hash collisions for larger directories
is rather high. As recently reported on the NFS mailing list that theoretical
problem also happens on real systems:
http://comments.gmane.org/gmane.linux.nfs/40863

The following series adds two new open flags to tell ext4
to to 32-bit or 64-bit hash values for llseek() calls.
These flags are then used by NFS to use 32-bit (NFSv2) or 64-bit
offsets (hashes in case of ext3/ext4) for readdir and seekdir.
User space does not need to specify these flags, but usually the check
for is_32bit_api() should be sufficient.

---

Bernd Schubert (2):
      Remove check for a 32-bit cookie in nfsd4_readdir()
      nfsd: vfs_llseek() with O_32BITHASH or O_64BITHASH

Fan Yong (1):
      Return 32/64-bit dir name hash according to usage type


 fs/ext4/dir.c               |  160 ++++++++++++++++++++++++++++++++++---------
 fs/fcntl.c                  |    5 +
 fs/nfsd/nfs4proc.c          |    2 -
 fs/nfsd/vfs.c               |    6 ++
 include/asm-generic/fcntl.h |    9 ++
 5 files changed, 145 insertions(+), 37 deletions(-)

-- 
Bernd Schubert

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-07-28 20:04 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-27 11:02 [PATCH 0/3] 32/64 bit llseek hashes Bernd Schubert
     [not found] ` <20110727110148.204979.49551.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2011-07-27 11:02   ` [PATCH 1/3] Return 32/64-bit dir name hash according to usage type Bernd Schubert
2011-07-27 11:02     ` Bernd Schubert
     [not found]     ` <20110727110249.204979.58769.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2011-07-27 21:02       ` Christoph Hellwig
2011-07-27 21:02         ` Christoph Hellwig
2011-07-28 20:04     ` Bernd Schubert
2011-07-27 11:02   ` [PATCH 2/3] Remove check for a 32-bit cookie in nfsd4_readdir() Bernd Schubert
2011-07-27 11:02     ` Bernd Schubert
2011-07-27 11:02 ` [PATCH 3/3] nfsd: vfs_llseek() with O_32BITHASH or O_64BITHASH Bernd Schubert
     [not found]   ` <20110727110259.204979.56782.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2011-07-27 21:03     ` Christoph Hellwig
2011-07-27 21:03       ` Christoph Hellwig
2011-07-28  9:19       ` Bernd Schubert
2011-07-28 11:46         ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.