summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4filelayout.h
diff options
context:
space:
mode:
authorAndy Adamson <andros@netapp.com>2013-05-09 00:21:18 +0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-05-09 01:19:32 +0400
commitc23266d532b4de796a346f57a66587c5db17d27e (patch)
treeff380244bcc16957bb0849cac47d5383a2b710af /fs/nfs/nfs4filelayout.h
parentd497ab975141666e674e7bd8729e00095ec23c9d (diff)
downloadlinux-c23266d532b4de796a346f57a66587c5db17d27e.tar.xz
NFS4.1 Fix data server connection race
Unlike meta data server mounts which support multiple mount points to the same server via struct nfs_server, data servers support a single connection. Concurrent calls to setup the data server connection can race where the first call allocates the nfs_client struct, and before the cache struct nfs_client pointer can be set, a second call also tries to setup the connection, finds the already allocated nfs_client, bumps the reference count, re-initializes the session,etc. This results in a hanging data server session after umount. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4filelayout.h')
-rw-r--r--fs/nfs/nfs4filelayout.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4filelayout.h b/fs/nfs/nfs4filelayout.h
index b8da95548d3d..235ff952d3c8 100644
--- a/fs/nfs/nfs4filelayout.h
+++ b/fs/nfs/nfs4filelayout.h
@@ -70,6 +70,8 @@ struct nfs4_pnfs_ds {
struct list_head ds_addrs;
struct nfs_client *ds_clp;
atomic_t ds_count;
+ unsigned long ds_state;
+#define NFS4DS_CONNECTING 0 /* ds is establishing connection */
};
struct nfs4_file_layout_dsaddr {