[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110727110259.204979.56782.stgit@localhost.localdomain>
Date: Wed, 27 Jul 2011 13:02:59 +0200
From: Bernd Schubert <bernd.schubert@...m.fraunhofer.de>
To: linux-nfs@...r.kernel.org, linux-ext4@...r.kernel.org
Cc: linux-fsdevel@...r.kernel.org, yong.fan@...mcloud.com,
adilger@...mcloud.com, tytso@....edu
Subject: [PATCH 3/3] nfsd: vfs_llseek() with O_32BITHASH or O_64BITHASH
Use 32-bit or 64-bit llseek() hashes for directory offsets depending on
the NFS version. NFSv2 gets 32-bit hashes only.
Signed-off-by: Bernd Schubert <bernd.schubert@...m.fraunhofer.de>
---
fs/nfsd/vfs.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
index fd0acca..d79bbcd 100644
--- a/fs/nfsd/vfs.c
+++ b/fs/nfsd/vfs.c
@@ -1994,6 +1994,12 @@ nfsd_readdir(struct svc_rqst *rqstp, struct svc_fh *fhp, loff_t *offsetp,
if (err)
goto out;
+ /* NFSv2 only supports 32 bit cookies */
+ if (rqstp->rq_vers > 2)
+ file->f_flags &= O_64BITHASH;
+ else
+ file->f_flags &= O_32BITHASH;
+
offset = vfs_llseek(file, offset, 0);
if (offset < 0) {
err = nfserrno((int)offset);
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists