Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp70615rdb; Mon, 18 Sep 2023 08:29:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHLBQ+8MteZwFD9JO+0d/qvj8xfklOvBh2zRy5gLl5aZMP2SFqo/s/RwkeO8EjlV/e/oBdM X-Received: by 2002:a05:6a20:3d15:b0:155:2359:2194 with SMTP id y21-20020a056a203d1500b0015523592194mr13248416pzi.46.1695050983211; Mon, 18 Sep 2023 08:29:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695050983; cv=none; d=google.com; s=arc-20160816; b=Ozk0UItioY4+5/oCmuhiiMayr2vGsNEk4tlkcfk76jl/jU2Hgp+0ZQHfNSRrh6BWae H90f+Zzdy+OPo/8N/vDEnitkf10JZzqnPwUVUynfWZtryCaBw9+r2fKAKrEDC3jD3LP5 ibc7SJ1QNzTp8k+glNDe5IlGQHUNQA4cAgwnPCrV3onGvqEP0IaCT7nxRyHpYwPv5nk9 L5yiQgkRS1QU66K3tEQ1tbRA9FnEIHg/QAe9zkY0mjyQxbGgL85hzDap0vLL40I2rj06 lF+S6a259NE5XHQ+xAgd9gHJISfJlmpWJJgZxEIeZhFmemQM170FtLdsFG/oiKMe5W/7 r17A== 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=PSEy32za9Lq9DRAr4xjqMWupW7qEqPFRKL6ZtwnDSoM=; fh=v8a13lpFSZWlL4AptTEJnmXnlqoWXhGCGCgvrcnCT9I=; b=KwFbyuUC2ieP/DgTzPECbiTj0FQmWzGyshMDLJZ4zovXeA1DzMenOISbX0dou2BZsc y69wLJju9dBvIo7StC2Kp024EYMmZrVMF1VSgu9iTIYflVajJeqVgCliJjYjvY1w/XaJ drqqu0z0nVXoObLzgn8mYssv070osm9FjeES9b4TIpdm7tqxhLrUUoiL9nWSBfP0F/tt VQgPFXJ0/WmGAfUf4ZroNQyd/wguAJIpCxRGSQrDRdP1bezxYR+WDcV03PYYtKO5CgYg YRf7OsAGarMNf/33HKgAVyDvcGHPMPAQ82DRRjyb56RddzqFb/a5aNhLcZgIAl15RljS dipg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HXUiK6m2; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s21-20020a63af55000000b00573fb2f7537si8270450pgo.586.2023.09.18.08.29.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 08:29:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=HXUiK6m2; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.36 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 pete.vger.email (Postfix) with ESMTP id EE80A80E6FE7; Mon, 18 Sep 2023 08:28:49 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229452AbjIRP2W (ORCPT + 99 others); Mon, 18 Sep 2023 11:28:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229522AbjIRP15 (ORCPT ); Mon, 18 Sep 2023 11:27:57 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25BAEE78 for ; Mon, 18 Sep 2023 08:25:03 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CDB2C116D2; Mon, 18 Sep 2023 14:01:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695045670; bh=vVxaXwBNqYVp9Tr8tf6Zt/VPqh7Mco63r7P50T5BHO4=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=HXUiK6m2/qU9FWltAY3JeohlqlmO7oY3ygZ1wPDDSfJP/WxuU4cWGMR0OPuowcwBi fuEmxvegQ96SqJEWv93O7jyRlRoZ84cXBRNRw71lG/H31im5r/aZRUtaWdlonaFE/R bjLcOb5K4wGV/HWtanomxNpym7PJYQDqdvDgHJisG/mt6gmdmKT8Cm3EtO/7Vl32vH 9HQTMGQfyyrYqX/qqPPwwL1x836klCJ3xSTiqBQL1OpjnoLJmhGIYKGHXTrgfcG/I9 uL/+AGam/jmMkbDd1fD3HNZ+ow8Q+S/W1eKhan8Hf/hMtxLGkX1RX53xrE5OVTjATY DdHklYZgHGKCg== Subject: [PATCH v1 41/52] NFSD: Add nfsd4_encode_fattr4_time_metadata() From: Chuck Lever To: linux-nfs@vger.kernel.org Cc: Chuck Lever Date: Mon, 18 Sep 2023 10:01:09 -0400 Message-ID: <169504566918.133720.1802016538751714347.stgit@manet.1015granger.net> In-Reply-To: <169504501081.133720.4162400017732492854.stgit@manet.1015granger.net> References: <169504501081.133720.4162400017732492854.stgit@manet.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 pete.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 (pete.vger.email [0.0.0.0]); Mon, 18 Sep 2023 08:28:50 -0700 (PDT) From: Chuck Lever Refactor the encoder for FATTR4_TIME_METADATA into a helper. In a subsequent patch, this helper will be called from a bitmask loop. Signed-off-by: Chuck Lever --- fs/nfsd/nfs4xdr.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 28eb777f82d2..75121b4a6020 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -3262,6 +3262,12 @@ static __be32 nfsd4_encode_fattr4_time_delta(struct xdr_stream *xdr, return nfsd4_encode_nfstime4(xdr, &ts); } +static __be32 nfsd4_encode_fattr4_time_metadata(struct xdr_stream *xdr, + const struct nfsd4_fattr_args *args) +{ + return nfsd4_encode_nfstime4(xdr, &args->stat.ctime); +} + /* * Note: @fhp can be NULL; in this case, we might have to compose the filehandle * ourselves. @@ -3600,7 +3606,7 @@ nfsd4_encode_fattr(struct xdr_stream *xdr, struct svc_fh *fhp, goto out; } if (bmval1 & FATTR4_WORD1_TIME_METADATA) { - status = nfsd4_encode_nfstime4(xdr, &args.stat.ctime); + status = nfsd4_encode_fattr4_time_metadata(xdr, &args); if (status) goto out; }