diff options
author | Bernd Schubert <bernd.schubert@itwm.fraunhofer.de> | 2012-03-19 03:44:50 +0100 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-03-19 03:44:50 +0100 |
commit | 06effdbb49af5f6c7d20affaec74603914acc768 (patch) | |
tree | 6cb59cbb05565e6c23c8ecf5eb79618083f330f7 /fs/nfsd/vfs.h | |
parent | nfsd: rename 'int access' to 'int may_flags' in nfsd_open() (diff) | |
download | linux-06effdbb49af5f6c7d20affaec74603914acc768.tar.xz linux-06effdbb49af5f6c7d20affaec74603914acc768.zip |
nfsd: vfs_llseek() with 32 or 64 bit offsets (hashes)
Use 32-bit or 64-bit llseek() hashes for directory offsets depending on
the NFS version. NFSv2 gets 32-bit hashes only.
NOTE: This patch got rather complex as Christoph asked to set the
filp->f_mode flag in the open call or immediatly after dentry_open()
in nfsd_open() to avoid races.
Personally I still do not see a reason for that and in my opinion
FMODE_32BITHASH/FMODE_64BITHASH flags could be set nfsd_readdir(), as it
follows directly after nfsd_open() without a chance of races.
Signed-off-by: Bernd Schubert <bernd.schubert@itwm.fraunhofer.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Acked-by: J. Bruce Fields<bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r-- | fs/nfsd/vfs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h index 1dcd238e11a0..ec0611b2b738 100644 --- a/fs/nfsd/vfs.h +++ b/fs/nfsd/vfs.h @@ -27,6 +27,8 @@ #define NFSD_MAY_BYPASS_GSS 0x400 #define NFSD_MAY_READ_IF_EXEC 0x800 +#define NFSD_MAY_64BIT_COOKIE 0x1000 /* 64 bit readdir cookies for >= NFSv3 */ + #define NFSD_MAY_CREATE (NFSD_MAY_EXEC|NFSD_MAY_WRITE) #define NFSD_MAY_REMOVE (NFSD_MAY_EXEC|NFSD_MAY_WRITE|NFSD_MAY_TRUNC) |