summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs3-helpers.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-05-31 22:43:52 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-06-01 00:23:46 -0700
commitda08199c57cedb3dc922ed6bec07932cd2aefabd (patch)
treea528dc8a8b4de1a3b9d4b21d038964919e066f50 /xlators/nfs/server/src/nfs3-helpers.h
parent5e03484d1d24ae93f7cad5fe575edd9ce8e0195b (diff)
nfs3: Funge . and .. ino/gen in readdir of root
In the readdir reply for the root of the export, replace the ino and gen number for the . and .. entries with 1 and 0 respectively. On clients which inspect this field, the client will error out due to the change in inode number of the root directory when see for "." .. also needs to be replaced because we do not have a concept of the parent directory of root. The return of 1 and 0 is the same as the behaviour of: stat /.. command. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 942 (NFS crashes as a vmware ESX data store) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=942
Diffstat (limited to 'xlators/nfs/server/src/nfs3-helpers.h')
-rw-r--r--xlators/nfs/server/src/nfs3-helpers.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/nfs/server/src/nfs3-helpers.h b/xlators/nfs/server/src/nfs3-helpers.h
index 26bc11f6c..db76b5cce 100644
--- a/xlators/nfs/server/src/nfs3-helpers.h
+++ b/xlators/nfs/server/src/nfs3-helpers.h
@@ -111,9 +111,9 @@ extern void
nfs3_prep_readdir3args (readdir3args *ra, struct nfs3_fh *fh);
extern void
-nfs3_fill_readdir3res (readdir3res *res, nfsstat3 stat, uint64_t cverf,
- struct iatt *dirstat, gf_dirent_t *entries,count3 count,
- int is_eof, uint16_t xlid);
+nfs3_fill_readdir3res (readdir3res *res, nfsstat3 stat, struct nfs3_fh *dfh,
+ uint64_t cverf, struct iatt *dirstat,
+ gf_dirent_t *entries, count3 count, int is_eof);
extern void
nfs3_prep_readdirp3args (readdirp3args *ra, struct nfs3_fh *fh);
@@ -339,4 +339,7 @@ nfs3_verify_dircookie (struct nfs3_state *nfs3, fd_t *dirfd, cookie3 cookie,
extern int
nfs3_fdcache_remove (struct nfs3_state *nfs3, fd_t *fd);
+
+extern int
+nfs3_is_parentdir_entry (char *entry);
#endif