History

NFSv4/4.1: Fix nfs4_schedule_state_recovery abuses

nfs4_schedule_state_recovery() should only be used when we need to force the state manager to check the lease. If we just want to start the state manager in order to handle a state recovery situation, we should be using nfs4_schedule_state_manager(). This patch fixes the abuses of nfs4_schedule_state_recovery() by replacing its use with a set of helper functions that do the right thing.

Trond Myklebust committed 15 years ago

Commit 0400a6b1 parent c34c32e4 files · +52 −34Browse files

Showing the changes to include (1 of 4 files). Show all

Unified · Split

include/linux/nfs_fs_sb.h+3−5
@@ -68,9 +68,7 @@ struct nfs_client { · 67 unmodified lines
6868 unsigned char cl_id_uniquifier;
6969 u32 cl_cb_ident; /* v4.0 callback identifier */
7070 const struct nfs4_minor_version_ops *cl_mvops;
71−#endif /* CONFIG_NFS_V4 */
7271
73−#ifdef CONFIG_NFS_V4_1
7472 /* The sequence id to use for the next CREATE_SESSION */
7573 u32 cl_seqid;
7674 /* The flags used for obtaining the clientid during EXCHANGE_ID */
@@ -78,7 +76,7 @@ struct nfs_client { · 1 unmodified line
7876 struct nfs4_session *cl_session; /* sharred session */
7977 struct list_head cl_layouts;
8078 struct pnfs_deviceid_cache *cl_devid_cache; /* pNFS deviceid cache */
81−#endif /* CONFIG_NFS_V4_1 */
79+#endif /* CONFIG_NFS_V4 */
8280
8381 #ifdef CONFIG_NFS_FSCACHE
8482 struct fscache_cookie *fscache; /* client index cache cookie */
@@ -183,7 +181,7 @@ struct nfs_server { · 98 unmodified lines
183181 /* maximum number of slots to use */
184182 #define NFS4_MAX_SLOT_TABLE RPC_MAX_SLOT_TABLE
185183
186−#if defined(CONFIG_NFS_V4_1)
184+#if defined(CONFIG_NFS_V4)
187185
188186 /* Sessions */
189187 #define SLOT_TABLE_SZ (NFS4_MAX_SLOT_TABLE/(8*sizeof(long)))
@@ -223,5 +221,5 @@ struct nfs4_session { · 33 unmodified lines
223221 struct nfs_client *clp;
224222 };
225223
226−#endif /* CONFIG_NFS_V4_1 */
224+#endif /* CONFIG_NFS_V4 */
227225 #endif