Skip to contentSkip to conversation

NFS: Add stubs for GETDEVICELIST

PATCH Superseded Anna Schumaker 2 participants 3 messages Apr 10, 2015

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFS: Add stubs for GETDEVICELIST

d4b18c3e (pnfs: remove GETDEVICELIST implementation) removed the GETDEVICELIST operation from the NFS client, but left a "hole" in the nfs4_procedures array. This caused /proc/self/mountstats to report an operation named "51" where GETDEVICELIST used to be. This patch adds back stubs to fix mountstats.

---
 fs/nfs/nfs4xdr.c     | 26 ++++++++++++++++++++++++--
 fs/nfs/nfs4xdr.c.rej | 10 ++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 fs/nfs/nfs4xdr.c.rej
fs/nfs/nfs4xdr.c +24 -2
index 39e521a..aadcc91 100644
@@ -860,6 +860,8 @@ static int nfs4_stat_to_errno(int);
 #define NFS4_dec_free_stateid_sz	(compound_decode_hdr_maxsz + \
 					 decode_sequence_maxsz + \
 					 decode_free_stateid_maxsz)
+#define NFS4_enc_getdevicelist_sz	(0)
+#define NFS4_dec_getdevicelist_sz	(0)
 
 const u32 nfs41_maxwrite_overhead = ((RPC_MAX_HEADER_WITH_AUTH +
 				      compound_encode_hdr_maxsz +
@@ -2997,6 +2999,16 @@ static void nfs4_xdr_enc_free_stateid(struct rpc_rqst *req,
 	encode_free_stateid(xdr, args, &hdr);
 	encode_nops(&hdr);
 }
+
+/*
+ *  Encode GEDEVICELIST request
+ */
+static void nfs4_xdr_enc_getdevicelist(struct rpc_rqst *req,
+				       struct xdr_stream *xdr,
+				       void *args)
+{
+}
+
 #endif /* CONFIG_NFS_V4_1 */
 
 static void print_overflow_msg(const char *func, const struct xdr_stream *xdr)
@@ -7202,6 +7214,16 @@ static int nfs4_xdr_dec_free_stateid(struct rpc_rqst *rqstp,
 out:
 	return status;
 }
+
+/*
+ * Decide GETDEVICELIST response
+ */
+static int nfs4_xdr_dec_getdevicelist(struct rpc_rqst *rqstp,
+				      struct xdr_stream *xdr,
+				      void *res)
+{
+	return 0;
+}
 #endif /* CONFIG_NFS_V4_1 */
 
 /**
@@ -7413,8 +7435,8 @@ struct rpc_procinfo	nfs4_procedures[] = {
 	PROC(SECINFO_NO_NAME,	enc_secinfo_no_name,	dec_secinfo_no_name),
 	PROC(TEST_STATEID,	enc_test_stateid,	dec_test_stateid),
 	PROC(FREE_STATEID,	enc_free_stateid,	dec_free_stateid),
-	PROC(BIND_CONN_TO_SESSION,
-			enc_bind_conn_to_session, dec_bind_conn_to_session),
+	PROC(GETDEVICELIST,	enc_getdevicelist,	dec_getdevicelist),
+	PROC(BIND_CONN_TO_SESSION, enc_bind_conn_to_session, dec_bind_conn_to_session),
 	PROC(DESTROY_CLIENTID,	enc_destroy_clientid,	dec_destroy_clientid),
 #endif /* CONFIG_NFS_V4_1 */
 #ifdef CONFIG_NFS_V4_2
fs/nfs/nfs4xdr.c.rej new file +10 -0
new file mode 100644
index 0000000..5560fe6
@@ -0,0 +1,10 @@
+--- fs/nfs/nfs4xdr.c
++++ fs/nfs/nfs4xdr.c
+@@ -7435,6 +7457,7 @@ struct rpc_procinfo	nfs4_procedures[] = {
+ 	PROC(SECINFO_NO_NAME,	enc_secinfo_no_name,	dec_secinfo_no_name),
+ 	PROC(TEST_STATEID,	enc_test_stateid,	dec_test_stateid),
+ 	PROC(FREE_STATEID,	enc_free_stateid,	dec_free_stateid),
++	PROC(GETDEVICELIST,	enc_getdevicelist,	dec_getdevicelist),
+ 	PROC(BIND_CONN_TO_SESSION,
+ 			enc_bind_conn_to_session, dec_bind_conn_to_session),
+ 	PROC(DESTROY_CLIENTID,	enc_destroy_clientid,	dec_destroy_clientid),
Signature · 1 line
2.3.5
#1 lore raw

fs/nfs/nfs4xdr.c.rej

Quoted 76 lines · Anna Schumaker

d4b18c3e (pnfs: remove GETDEVICELIST implementation) removed the GETDEVICELIST operation from the NFS client, but left a "hole" in the nfs4_procedures array. This caused /proc/self/mountstats to report an operation named "51" where GETDEVICELIST used to be. This patch adds back stubs to fix mountstats.

---
 fs/nfs/nfs4xdr.c     | 26 ++++++++++++++++++++++++--
 fs/nfs/nfs4xdr.c.rej | 10 ++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 fs/nfs/nfs4xdr.c.rej
fs/nfs/nfs4xdr.c +24 -2
index 39e521a..aadcc91 100644
@@ -860,6 +860,8 @@ static int nfs4_stat_to_errno(int);
 #define NFS4_dec_free_stateid_sz       (compound_decode_hdr_maxsz + \
                                         decode_sequence_maxsz + \
                                         decode_free_stateid_maxsz)
+#define NFS4_enc_getdevicelist_sz      (0)
+#define NFS4_dec_getdevicelist_sz      (0)
 
 const u32 nfs41_maxwrite_overhead = ((RPC_MAX_HEADER_WITH_AUTH +
                                      compound_encode_hdr_maxsz +
@@ -2997,6 +2999,16 @@ static void nfs4_xdr_enc_free_stateid(struct rpc_rqst *req,
        encode_free_stateid(xdr, args, &hdr);
        encode_nops(&hdr);
 }
+
+/*
+ *  Encode GEDEVICELIST request
+ */
+static void nfs4_xdr_enc_getdevicelist(struct rpc_rqst *req,
+                                      struct xdr_stream *xdr,
+                                      void *args)
+{
+}
+
 #endif /* CONFIG_NFS_V4_1 */
 
 static void print_overflow_msg(const char *func, const struct xdr_stream *xdr)
@@ -7202,6 +7214,16 @@ static int nfs4_xdr_dec_free_stateid(struct rpc_rqst *rqstp,
 out:
        return status;
 }
+
+/*
+ * Decide GETDEVICELIST response
+ */
+static int nfs4_xdr_dec_getdevicelist(struct rpc_rqst *rqstp,
+                                     struct xdr_stream *xdr,
+                                     void *res)
+{
+       return 0;
+}
 #endif /* CONFIG_NFS_V4_1 */
 
 /**
@@ -7413,8 +7435,8 @@ struct rpc_procinfo       nfs4_procedures[] = {
        PROC(SECINFO_NO_NAME,   enc_secinfo_no_name,    dec_secinfo_no_name),
        PROC(TEST_STATEID,      enc_test_stateid,       dec_test_stateid),
        PROC(FREE_STATEID,      enc_free_stateid,       dec_free_stateid),
-       PROC(BIND_CONN_TO_SESSION,
-                       enc_bind_conn_to_session, dec_bind_conn_to_session),
+       PROC(GETDEVICELIST,     enc_getdevicelist,      dec_getdevicelist),
+       PROC(BIND_CONN_TO_SESSION, enc_bind_conn_to_session, dec_bind_conn_to_session),
        PROC(DESTROY_CLIENTID,  enc_destroy_clientid,   dec_destroy_clientid),
 #endif /* CONFIG_NFS_V4_1 */
 #ifdef CONFIG_NFS_V4_2
fs/nfs/nfs4xdr.c.rej new file +0 -0
new file mode 100644
index 0000000..5560fe6

Did you intend to create this file?

Quoted 18 lines
fs/nfs/nfs4xdr.c.rej new file +10 -1
@@ -0,0 +1,10 @@
+--- fs/nfs/nfs4xdr.c
++++ fs/nfs/nfs4xdr.c
+@@ -7435,6 +7457,7 @@ struct rpc_procinfo      nfs4_procedures[] = {
+       PROC(SECINFO_NO_NAME,   enc_secinfo_no_name,    dec_secinfo_no_name),
+       PROC(TEST_STATEID,      enc_test_stateid,       dec_test_stateid),
+       PROC(FREE_STATEID,      enc_free_stateid,       dec_free_stateid),
++      PROC(GETDEVICELIST,     enc_getdevicelist,      dec_getdevicelist),
+       PROC(BIND_CONN_TO_SESSION,
+                       enc_bind_conn_to_session, dec_bind_conn_to_session),
+       PROC(DESTROY_CLIENTID,  enc_destroy_clientid,   dec_destroy_clientid),
--

2.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#2 lore raw
Quoted 72 lines · Trond Myklebust
Quoted 70 lines · Anna Schumaker

d4b18c3e (pnfs: remove GETDEVICELIST implementation) removed the GETDEVICELIST operation from the NFS client, but left a "hole" in the nfs4_procedures array. This caused /proc/self/mountstats to report an operation named "51" where GETDEVICELIST used to be. This patch adds back stubs to fix mountstats.

---
 fs/nfs/nfs4xdr.c     | 26 ++++++++++++++++++++++++--
 fs/nfs/nfs4xdr.c.rej | 10 ++++++++++
 2 files changed, 34 insertions(+), 2 deletions(-)
 create mode 100644 fs/nfs/nfs4xdr.c.rej
fs/nfs/nfs4xdr.c +24 -2
index 39e521a..aadcc91 100644
@@ -860,6 +860,8 @@ static int nfs4_stat_to_errno(int);
 #define NFS4_dec_free_stateid_sz       (compound_decode_hdr_maxsz + \
                                         decode_sequence_maxsz + \
                                         decode_free_stateid_maxsz)
+#define NFS4_enc_getdevicelist_sz      (0)
+#define NFS4_dec_getdevicelist_sz      (0)
 
 const u32 nfs41_maxwrite_overhead = ((RPC_MAX_HEADER_WITH_AUTH +
                                      compound_encode_hdr_maxsz +
@@ -2997,6 +2999,16 @@ static void nfs4_xdr_enc_free_stateid(struct rpc_rqst *req,
        encode_free_stateid(xdr, args, &hdr);
        encode_nops(&hdr);
 }
+
+/*
+ *  Encode GEDEVICELIST request
+ */
+static void nfs4_xdr_enc_getdevicelist(struct rpc_rqst *req,
+                                      struct xdr_stream *xdr,
+                                      void *args)
+{
+}
+
 #endif /* CONFIG_NFS_V4_1 */
 
 static void print_overflow_msg(const char *func, const struct xdr_stream *xdr)
@@ -7202,6 +7214,16 @@ static int nfs4_xdr_dec_free_stateid(struct rpc_rqst *rqstp,
 out:
        return status;
 }
+
+/*
+ * Decide GETDEVICELIST response
+ */
+static int nfs4_xdr_dec_getdevicelist(struct rpc_rqst *rqstp,
+                                     struct xdr_stream *xdr,
+                                     void *res)
+{
+       return 0;
+}
 #endif /* CONFIG_NFS_V4_1 */
 
 /**
@@ -7413,8 +7435,8 @@ struct rpc_procinfo       nfs4_procedures[] = {
        PROC(SECINFO_NO_NAME,   enc_secinfo_no_name,    dec_secinfo_no_name),
        PROC(TEST_STATEID,      enc_test_stateid,       dec_test_stateid),
        PROC(FREE_STATEID,      enc_free_stateid,       dec_free_stateid),
-       PROC(BIND_CONN_TO_SESSION,
-                       enc_bind_conn_to_session, dec_bind_conn_to_session),
+       PROC(GETDEVICELIST,     enc_getdevicelist,      dec_getdevicelist),
+       PROC(BIND_CONN_TO_SESSION, enc_bind_conn_to_session, dec_bind_conn_to_session),
        PROC(DESTROY_CLIENTID,  enc_destroy_clientid,   dec_destroy_clientid),
 #endif /* CONFIG_NFS_V4_1 */
Quoted 8 lines

fs/nfs/nfs4xdr.c.rej

Quoted 6 lines
fs/nfs/nfs4xdr.c +0 -0
 #ifdef CONFIG_NFS_V4_2
fs/nfs/nfs4xdr.c.rej new file +0 -0
new file mode 100644
index 0000000..5560fe6

Did you intend to create this file?

*sigh* I did not. I'll resend without it.

Anna

Quoted 19 lines
Quoted 19 lines
fs/nfs/nfs4xdr.c.rej new file +10 -1
@@ -0,0 +1,10 @@
+--- fs/nfs/nfs4xdr.c
++++ fs/nfs/nfs4xdr.c
+@@ -7435,6 +7457,7 @@ struct rpc_procinfo      nfs4_procedures[] = {
+       PROC(SECINFO_NO_NAME,   enc_secinfo_no_name,    dec_secinfo_no_name),
+       PROC(TEST_STATEID,      enc_test_stateid,       dec_test_stateid),
+       PROC(FREE_STATEID,      enc_free_stateid,       dec_free_stateid),
++      PROC(GETDEVICELIST,     enc_getdevicelist,      dec_getdevicelist),
+       PROC(BIND_CONN_TO_SESSION,
+                       enc_bind_conn_to_session, dec_bind_conn_to_session),
+       PROC(DESTROY_CLIENTID,  enc_destroy_clientid,   dec_destroy_clientid),
--

2.3.5

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html