linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] [RESEND] 32/64 bit llseek hashes (v4)
@ 2012-01-09 10:16 Bernd Schubert
  2012-01-09 10:16 ` [PATCH 4 1/4] Add new FMODE flags: FMODE_32bithash and FMODE_64bithash Bernd Schubert
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Bernd Schubert @ 2012-01-09 10:16 UTC (permalink / raw)
  To: linux-nfs, linux-ext4; +Cc: linux-fsdevel, yong.fan, bfields, sandeen, adilger

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 f_mode flags to tell ext4
to use 32-bit or 64-bit hash values for llseek() calls.
These flags can then used by network file systems, such as NFS, to
request 32-bit or 64-bit offsets (hashes).

Version 4
- Andreas noticed there was HAVE_IS_COMPAT_TASK instead of 
  CONFIG_COMPAT in the 
  "Return 32/64-bit dir name hash according to usage type"
  patch

Version 3:
- remove patch "RFC: Remove check for a 32-bit cookie in nfsd4_readdir()", 
  as it was included upstream separately
- split "nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes)" into two
  two separate patches as suggested by Bruce, one patch to rename 
  'access' to 'may_flags'. And the remainder of the original patch to set 
  FMODE_32BITHASH/FMODE_64BITHASH flags and to introduce the new 
  NFSD_MAY_64BIT_COOKIE flag

Version 2:
- use f_mode instead of O_* flags and also in a separate patch
- introduce EXT4_HTREE_EOF_32BIT and EXT4_HTREE_EOF_64BIT
- fix SEEK_END in ext4_dir_llseek()
- set f_mode flags in NFS code as early as possible and introduce a new
  NFSD_MAY_64BIT_COOKIE flag for that

--
Bernd Schubert
Fraunhofer ITWM


^ permalink raw reply	[flat|nested] 7+ messages in thread
* [PATCH 0/4] 32/64 bit llseek hashes (v4)
@ 2011-08-17  9:57 Bernd Schubert
  2011-08-17  9:57 ` [PATCH 4 2/4] Return 32/64-bit dir name hash according to usage type Bernd Schubert
  0 siblings, 1 reply; 7+ messages in thread
From: Bernd Schubert @ 2011-08-17  9:57 UTC (permalink / raw)
  To: linux-nfs-u79uwXL29TY76Z2rM5mHXA,
	linux-ext4-u79uwXL29TY76Z2rM5mHXA
  Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	yong.fan-KloliPT79xf2eFz/2MeuCQ, adilger-KloliPT79xf2eFz/2MeuCQ

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 f_mode flags to tell ext4
to use 32-bit or 64-bit hash values for llseek() calls.
These flags can then used by network file systems, such as NFS, to
request 32-bit or 64-bit offsets (hashes).

Version 4
- Andreas noticed there was HAVE_IS_COMPAT_TASK instead of 
  CONFIG_COMPAT in the 
  "Return 32/64-bit dir name hash according to usage type"
  patch

Version 3:
- remove patch "RFC: Remove check for a 32-bit cookie in nfsd4_readdir()",
  I think Bruce wanted to take it seperately as bug fix. It should be applied
  before applying the remaining NFS patches, as without it NFSv4 will always
  fail with the new 64-bit ext4 seek hashes.
- split "nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes)" into two
  two separate patches as suggested by Bruce, one patch to rename 
  'access' to 'may_flags'. And the remainder of the original patch to set 
  FMODE_32BITHASH/FMODE_64BITHASH flags and to introduce the new 
  NFSD_MAY_64BIT_COOKIE flag

Version 2:
- use f_mode instead of O_* flags and also in a separate patch
- introduce EXT4_HTREE_EOF_32BIT and EXT4_HTREE_EOF_64BIT
- fix SEEK_END in ext4_dir_llseek()
- set f_mode flags in NFS code as early as possible and introduce a new
  NFSD_MAY_64BIT_COOKIE flag for that

--
Bernd Schubert
Fraunhofer ITWM

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2012-01-09 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-09 10:16 [PATCH 0/4] [RESEND] 32/64 bit llseek hashes (v4) Bernd Schubert
2012-01-09 10:16 ` [PATCH 4 1/4] Add new FMODE flags: FMODE_32bithash and FMODE_64bithash Bernd Schubert
2012-01-09 10:16 ` [PATCH 4 2/4] Return 32/64-bit dir name hash according to usage type Bernd Schubert
2012-01-09 10:16 ` [PATCH 4 3/4] nfsd_open(): rename 'int access' to 'int may_flags' in nfsd_open() Bernd Schubert
2012-01-09 10:16 ` [PATCH 4 4/4] nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes) Bernd Schubert
     [not found]   ` <20120109101649.2218398.23334.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2012-01-09 13:12     ` Bernd Schubert
  -- strict thread matches above, loose matches on Subject: below --
2011-08-17  9:57 [PATCH 0/4] 32/64 bit llseek hashes (v4) Bernd Schubert
2011-08-17  9:57 ` [PATCH 4 2/4] Return 32/64-bit dir name hash according to usage type Bernd Schubert

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).