Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp1252692rdh; Mon, 25 Sep 2023 07:30:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFA0dtbhIfgPOrOcS4W/WX2B3QZmyW9OCURBiDCo5MVFvr51nsOQpuESvlkMEpfkhcnyHKh X-Received: by 2002:a17:903:190:b0:1c6:15fc:999 with SMTP id z16-20020a170903019000b001c615fc0999mr3778663plg.45.1695652215830; Mon, 25 Sep 2023 07:30:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695652215; cv=none; d=google.com; s=arc-20160816; b=pz96jPAF2DP7U0ag6ANM0A/28YBya0O5kxfbrLIUn0Bur9ziQpMfOMeMIHn0cRp7fA 4MOZUx1fgyrE9twAlWD8E++/khCOKnK3ilI/akIc/LX+4z7ncQTaEA0PRv1gpo2OrkRc qJ58oqZ4ua0r3fMWtvV9JFC6eqpXE+/8/hWahj6YGHp4gUGN+0XmmveXs+qrtBu2XprH c4oBA1HKYjb8L18yOs4cJ6gG0GQQS0kH1miQSoUmtWzAFMpa+RBcQdFTgsy+pMebMA+j iiRqJve4EL+XJwiDWX3UtZVLQ1s/ubGyWF/yKEgbQbGedM96nuI8jGYXdozDgoxTfVOM PXZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:dkim-signature; bh=pLhSRZwCCU3Fjjj7XmniNnq8dlgnim7tjBB3IC6wov0=; fh=v8a13lpFSZWlL4AptTEJnmXnlqoWXhGCGCgvrcnCT9I=; b=PAuceMIQMvgBoAIMdJyPvmQeySaxPSeJj6Jyk2du3EKBJ5D5OjC54z5tVSQpBv03If BJo8JdaSs5mNctCkmGhMLbdylR0eI1FARUih0advccrFEWl3zwvCsdwH0raSiKYY4V62 DL9TAAmn+e2Aw3gmF0Tz2kw8GR2uJ1YQpBxzfxY1pdPoEh4d2Na8noUE99DDkRR+LMqS kLlH5uLB1Pd2CgI/HGQtC9w8P/FvvH3Cx8sC7T+REylj0RlJfy8o/CUmLaqQowazPEhe QTR0CKmSRY5gIhPLR6FygzHuE2LbcVLzGdt5x4GMQruBPU4raZ1XKZEVF6Ze12ORRoAP Yb8A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BpZo2jsC; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id s17-20020a170902c65100b001b3d27ca12fsi9377545pls.207.2023.09.25.07.30.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 07:30:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=BpZo2jsC; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 2841480963B1; Mon, 25 Sep 2023 06:28:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230505AbjIYN20 (ORCPT + 99 others); Mon, 25 Sep 2023 09:28:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231820AbjIYN2Z (ORCPT ); Mon, 25 Sep 2023 09:28:25 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A2BD911F for ; Mon, 25 Sep 2023 06:28:18 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CD7BC433C7; Mon, 25 Sep 2023 13:28:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695648498; bh=KPfg0qUNcF5vkrb3XKEZod2OcluDdVl+u1SjrMS0EGg=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=BpZo2jsCMS7qpZofmW/x2DexE+LAthDeqsPcNnrCiyImQ0FDVa3037tRghV+7vvaK B7nBSQEragLOfHwFLJAs8VKI/VebZWTFxbiqXJwJq7h0kzIHUDBOvxjU2ZgVJlbwef 6g5uR3lwaDyZrvxq61awVzQYqLykKnf5WGoDF7FcKSLY7dnYHMr6pCllfN65PiZyil VmLtK7Eh0dq+VXW/o/jg07Tutsp2bhVf6AMBDA0UYqSycZhiLjaF2SHkhDHhnMsN0u 6Q4lpoHI+Jerq4bAWyJYvWyD66MB9JcG8Zf2T1q7NvTHuLZQFi6jAbfKkkKPDOGQW5 KX64vdxar4SUw== Subject: [PATCH v1 7/8] NFSD: Make @gdev parameter of ->encode_getdeviceinfo a const pointer From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever Date: Mon, 25 Sep 2023 09:28:17 -0400 Message-ID: <169564849717.6013.13526635118089448794.stgit@klimt.1015granger.net> In-Reply-To: <169564827064.6013.5014460767978657478.stgit@klimt.1015granger.net> References: <169564827064.6013.5014460767978657478.stgit@klimt.1015granger.net> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Mon, 25 Sep 2023 06:28:22 -0700 (PDT) From: Chuck Lever This enables callers to be passed const pointer parameters. Signed-off-by: Chuck Lever --- fs/nfsd/blocklayoutxdr.c | 2 +- fs/nfsd/blocklayoutxdr.h | 2 +- fs/nfsd/flexfilelayoutxdr.c | 2 +- fs/nfsd/flexfilelayoutxdr.h | 2 +- fs/nfsd/pnfs.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fs/nfsd/blocklayoutxdr.c b/fs/nfsd/blocklayoutxdr.c index f8469348e06e..ce78f74715ee 100644 --- a/fs/nfsd/blocklayoutxdr.c +++ b/fs/nfsd/blocklayoutxdr.c @@ -77,7 +77,7 @@ nfsd4_block_encode_volume(struct xdr_stream *xdr, struct pnfs_block_volume *b) __be32 nfsd4_block_encode_getdeviceinfo(struct xdr_stream *xdr, - struct nfsd4_getdeviceinfo *gdp) + const struct nfsd4_getdeviceinfo *gdp) { struct pnfs_block_deviceaddr *dev = gdp->gd_device; int len = sizeof(__be32), ret, i; diff --git a/fs/nfsd/blocklayoutxdr.h b/fs/nfsd/blocklayoutxdr.h index 5f88539e81a1..b0361e8aa9a7 100644 --- a/fs/nfsd/blocklayoutxdr.h +++ b/fs/nfsd/blocklayoutxdr.h @@ -51,7 +51,7 @@ struct pnfs_block_deviceaddr { }; __be32 nfsd4_block_encode_getdeviceinfo(struct xdr_stream *xdr, - struct nfsd4_getdeviceinfo *gdp); + const struct nfsd4_getdeviceinfo *gdp); __be32 nfsd4_block_encode_layoutget(struct xdr_stream *xdr, const struct nfsd4_layoutget *lgp); int nfsd4_block_decode_layoutupdate(__be32 *p, u32 len, struct iomap **iomapp, diff --git a/fs/nfsd/flexfilelayoutxdr.c b/fs/nfsd/flexfilelayoutxdr.c index 5319cb97d8a7..aeb71c10ff1b 100644 --- a/fs/nfsd/flexfilelayoutxdr.c +++ b/fs/nfsd/flexfilelayoutxdr.c @@ -77,7 +77,7 @@ nfsd4_ff_encode_layoutget(struct xdr_stream *xdr, __be32 nfsd4_ff_encode_getdeviceinfo(struct xdr_stream *xdr, - struct nfsd4_getdeviceinfo *gdp) + const struct nfsd4_getdeviceinfo *gdp) { struct pnfs_ff_device_addr *da = gdp->gd_device; int len; diff --git a/fs/nfsd/flexfilelayoutxdr.h b/fs/nfsd/flexfilelayoutxdr.h index a447efb7759b..6d5a1066a903 100644 --- a/fs/nfsd/flexfilelayoutxdr.h +++ b/fs/nfsd/flexfilelayoutxdr.h @@ -43,7 +43,7 @@ struct pnfs_ff_layout { }; __be32 nfsd4_ff_encode_getdeviceinfo(struct xdr_stream *xdr, - struct nfsd4_getdeviceinfo *gdp); + const struct nfsd4_getdeviceinfo *gdp); __be32 nfsd4_ff_encode_layoutget(struct xdr_stream *xdr, const struct nfsd4_layoutget *lgp); diff --git a/fs/nfsd/pnfs.h b/fs/nfsd/pnfs.h index d8e1a333fa0a..de1e0dfed06a 100644 --- a/fs/nfsd/pnfs.h +++ b/fs/nfsd/pnfs.h @@ -27,7 +27,7 @@ struct nfsd4_layout_ops { struct nfs4_client *clp, struct nfsd4_getdeviceinfo *gdevp); __be32 (*encode_getdeviceinfo)(struct xdr_stream *xdr, - struct nfsd4_getdeviceinfo *gdevp); + const struct nfsd4_getdeviceinfo *gdevp); __be32 (*proc_layoutget)(struct inode *, const struct svc_fh *fhp, struct nfsd4_layoutget *lgp);