summaryrefslogtreecommitdiffstats
path: root/xlators/nfs/server/src/nfs-common.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-09-22 03:32:17 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-22 04:14:27 -0700
commitf47b0c55de9941823fbefe4b3a7e37179d6d4329 (patch)
treeab22e40749a8173a869bfc1567fb2ef816196f56 /xlators/nfs/server/src/nfs-common.h
parent6b2e2fb0903fc56105c267881f202a4865a8b6c7 (diff)
nfs, nfs3: Base volume access on CHILD-UP-DOWN event
Overall, the aim of this patch is to change the result of an nfs op depending on whether the underlying volume is up or down as notified by CHILD_UP and CHILD_DOWN events. This patch contains three intertwined changes: o Only when the lookup on the root of a volume is successful does gnfs now export the subvolume. Till now the result of the lookup was not used to determine whether we should export that volume. Not accounting for root lookup failure resulted in ESTALEs on first access because some children of distribute were down at the time of the root lookup. o Only when lookups on all the subvolumes have succeeded are these exports enabled through NFS. o When a child of say distribute goes down, on CHILD_DOWN event nfs will ignore all incoming requests from the client because ignoring these will prevent ESTALEs for those requests and in the hope that ignoring the requests will make the client retransmit. There are risks in this approach absent the DRC but we're willing to live with that for now. When a child goes down, the mount exports list will continue to show it but mount requests will be denied. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1643 (Initial requests after mount ESTALE if DHT subvolumes connect after nfs startup) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1643
Diffstat (limited to 'xlators/nfs/server/src/nfs-common.h')
-rw-r--r--xlators/nfs/server/src/nfs-common.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/xlators/nfs/server/src/nfs-common.h b/xlators/nfs/server/src/nfs-common.h
index 25fc1cf405b..3e791a90549 100644
--- a/xlators/nfs/server/src/nfs-common.h
+++ b/xlators/nfs/server/src/nfs-common.h
@@ -31,6 +31,7 @@
#include "rpcsvc.h"
#include "iatt.h"
#include "uuid.h"
+#include "nfs.h"
#define NFS_PATH_MAX PATH_MAX
#define NFS_NAME_MAX NAME_MAX
@@ -76,4 +77,7 @@ nfs_entry_loc_fill (inode_table_t *itable, uuid_t pargfid, char *entry,
extern int
nfs_root_loc_fill (inode_table_t *itable, loc_t *loc);
+
+extern int
+is_nfs_subvolume_disabled (struct nfs_state *nfs, xlator_t *xl);
#endif