From patchwork Fri Apr 10 15:10:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Schumaker, Anna" X-Patchwork-Id: 6197501 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1773A9F1C4 for ; Fri, 10 Apr 2015 15:10:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 333D02021B for ; Fri, 10 Apr 2015 15:10:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C59DE201B9 for ; Fri, 10 Apr 2015 15:10:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932479AbbDJPKP (ORCPT ); Fri, 10 Apr 2015 11:10:15 -0400 Received: from mx143.netapp.com ([216.240.21.24]:7727 "EHLO mx143.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932925AbbDJPKO (ORCPT ); Fri, 10 Apr 2015 11:10:14 -0400 X-IronPort-AV: E=Sophos;i="5.11,557,1422950400"; d="scan'208";a="34776175" Received: from vmwexchts01-prd.hq.netapp.com ([10.122.105.12]) by mx143-out.netapp.com with ESMTP; 10 Apr 2015 08:10:13 -0700 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCHTS01-PRD.hq.netapp.com (10.122.105.12) with Microsoft SMTP Server id 15.0.995.29; Fri, 10 Apr 2015 08:10:12 -0700 Received: from davros.com ([10.63.227.12]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id t3AFAAuL011899; Fri, 10 Apr 2015 08:10:11 -0700 (PDT) From: Anna Schumaker To: , CC: Subject: [PATCH] NFS: Add stubs for GETDEVICELIST Date: Fri, 10 Apr 2015 11:10:09 -0400 Message-ID: <1428678609-28156-1-git-send-email-Anna.Schumaker@Netapp.com> X-Mailer: git-send-email 2.3.5 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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. Signed-off-by: Anna Schumaker --- 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 diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 39e521a..aadcc91 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -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 diff --git a/fs/nfs/nfs4xdr.c.rej b/fs/nfs/nfs4xdr.c.rej new file mode 100644 index 0000000..5560fe6 --- /dev/null +++ b/fs/nfs/nfs4xdr.c.rej @@ -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),