From patchwork Mon Nov 11 20:16:29 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 179138 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp7148672ilf; Mon, 11 Nov 2019 12:22:20 -0800 (PST) X-Google-Smtp-Source: APXvYqyrbypPSLFRhBnklXAMHpEIOeRTJYphKPMvNJjmfiRCfjiBwxKtaJD7qwFU1qzNBP//BEYq X-Received: by 2002:aa7:dbd4:: with SMTP id v20mr29247060edt.58.1573503739987; Mon, 11 Nov 2019 12:22:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573503739; cv=none; d=google.com; s=arc-20160816; b=DMPNnbTTci4J7VoI3GvwnMAZs0w9yseVCzmOaFTev2Jl1esFuz5iNBAhGHL+dFSZtV WkZQbVHF+VIAFjxJAwuSm/u7fjhPRuE2ArQOyr0+EOYElhsBqb3FFTx8dCphRxRjyBm9 v264LD6dPy1gGUN8i3DEWmF0Ufa4N4F6grIYOjoUEXA6DD8dIzK7jglFbBdH8gBxVAJ2 8Kp8aajx24+TUMIuEy8XVJ3td1svbgiM9kQeszPhfYpqT4YMmxgnytIAZHjyxOI2ioVd FaO4uBxDpHhHo4MdAndxqYrKpgllLlwddgQDYlgHDh1DQ8WzD98AtjZnNwyV6NFeYuQc cvlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=E9B5uqlBh2dd7G4ZTHSFWVSGbWlmUG/MQA1a8VQG+8M=; b=dNv6cDFSpSV3LI/zD4CH0mMjyzog/InT3MVMO8BSlqRpYpzYsFSvWzC173uaHJ1oX2 HHoAJmPnEkBJlXAn/2kPdeC9NwphGw2j9YYxYE95rP1LQ+iX0L9DIy9k8OHneD16JYRJ bEdq75exku+INry2MDjZIXhrgM25b83XaOoaob/wSPMS3xMxRPGCqysIAxyWGPwVJljT I6FOE2NtNEwExmlkpP+ALOpr0V/TXF0Iqn8X4svT/LkGD7HAooTcQUI2nkZIO2pv931P QxzlZU7XGCRMzcqz01sBnHTWB7RFsPbFuR+BWqDyMXeoZSnzAIMWP+g7zB9pHPPCGZtP XLxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c57si11779371edc.386.2019.11.11.12.22.19; Mon, 11 Nov 2019 12:22:19 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727729AbfKKUWD (ORCPT + 26 others); Mon, 11 Nov 2019 15:22:03 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:34829 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727483AbfKKUWA (ORCPT ); Mon, 11 Nov 2019 15:22:00 -0500 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.145]) with ESMTPA (Nemesis) id 1Mw9Hm-1heMNx137E-00s7xT; Mon, 11 Nov 2019 21:16:49 +0100 From: Arnd Bergmann To: linux-nfs@vger.kernel.org, "J. Bruce Fields" , Chuck Lever , Trond Myklebust , Anna Schumaker Cc: y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Arnd Bergmann Subject: [PATCH 09/19] nfsd: print 64-bit timestamps in client_info_show Date: Mon, 11 Nov 2019 21:16:29 +0100 Message-Id: <20191111201639.2240623-10-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20191111201639.2240623-1-arnd@arndb.de> References: <20191111201639.2240623-1-arnd@arndb.de> MIME-Version: 1.0 X-Provags-ID: V03:K1:seMJ42v1081bEPvwevwNuzbDoR7i4rBfE32rXv/gDtp4js7XnsP 3mzBJKVOUnKQzd/TGe/g65oEGys9jaUxG0wIzDBcSa+JTTscwYceqlTvZUCW+8c4PrwGNvV CdeUvJniXZuKdka9Ghw1sJqdwNPM9MM6rEo3zek+pKcuyxqshdiOXcVNYhowEWAWp7ReExJ BJBq5/czH5wa1umRKjtQA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:K1X4+M5ldbg=:eF0eHB+aTr06giF3z8cGgN 84/NB54bm3WbUg9w+tbttFcqp+6u0p859BIRQYodo/PbBtjm0ALNVgTft7nIEcmQnSpVvl2Oa urm78C7A5dVRl2ykLyxoFaKSwmG7vYFiHeioxVIFwZpduF830CAC9ddzCzClpLCP9H+b7KUoN 9BR3HTN2ddA5hPwcuzU1fTNgU0zI0RNtEP+VKaplIrh6o6PC1A8qm0qIpQqoM8gj56/qz4zeW DhhG0fiSpc47p4ca3LOjRI85/OjvA+VuRcR+4IxAHzxo90TuTG/QpGhgi80uhQDOaU8GChksw J1+KbaIQOw4JbA6GuhKtwJEcD6Xve9dcUcPyBfhvTPNwuxyay0Oyd+fS7K82oBhzR0J93uX9W H3ZjGuFA6VsnCPOeHRfCQ2JEou/IMvZeQUWeIP1VKASfYm/pylNTzxZwv2IobYj7jx1R33v0C wApZ3sF4ub3LhOD9i1LNq6RzdUwWryOkXLUFKUgL6zflcBNLTq4kkHcRUfZU+qQm1JyeJ/Lh5 Ouf0LvGvtZh0xwCSrBcMwPeXaBS2uJGMjk6H68HiC+nQrRVP51AhOj8fY/EIwcwhV1HZIfnhF J6pz3Eb9StxeSOYUgKHBHuSmi4wjFkI5sTqLe5m0dAKrsrlgkGcffD0LLXkZs4+ZRxWWf3ZgW eY+yZ0K8rGTFp4sMdHxns6YG1G+cYk+sQR37/sbotvq6Y9JfbA2ZOwQ7p9BBIwnYjtemIlmbD 9FfP2pk2Ml+HEY4IUzGGE9izUggir7KspodBvNZWol1V1Z8Iwo+aai9TGojjaCIZxvaFlxrUp /m7adYvW9mQS8xbITdpN+cH38UFRMQK2O644oT4upRfXcRM8r4FR5DA4uJK6Nh5EwekCwg22J zSUwzSRZPyzeVhMzJdQQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The nii_time field gets truncated to 'time_t' on 32-bit architectures before printing. Remove the use of 'struct timespec' to product the correct output beyond 2038. Signed-off-by: Arnd Bergmann --- fs/nfsd/nfs4state.c | 5 ++--- fs/nfsd/state.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) -- 2.20.0 diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index a20795b5053c..2333924d7c6b 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c @@ -2292,7 +2292,7 @@ static int client_info_show(struct seq_file *m, void *v) clp->cl_nii_domain.len); seq_printf(m, "\nImplementation name: "); seq_quote_mem(m, clp->cl_nii_name.data, clp->cl_nii_name.len); - seq_printf(m, "\nImplementation time: [%ld, %ld]\n", + seq_printf(m, "\nImplementation time: [%lld, %ld]\n", clp->cl_nii_time.tv_sec, clp->cl_nii_time.tv_nsec); } drop_client(clp); @@ -2946,8 +2946,7 @@ static __be32 copy_impl_id(struct nfs4_client *clp, xdr_netobj_dup(&clp->cl_nii_name, &exid->nii_name, GFP_KERNEL); if (!clp->cl_nii_name.data) return nfserr_jukebox; - clp->cl_nii_time.tv_sec = exid->nii_time.tv_sec; - clp->cl_nii_time.tv_nsec = exid->nii_time.tv_nsec; + clp->cl_nii_time = exid->nii_time; return 0; } diff --git a/fs/nfsd/state.h b/fs/nfsd/state.h index 46f56afb6cb8..ce32ba445343 100644 --- a/fs/nfsd/state.h +++ b/fs/nfsd/state.h @@ -320,7 +320,7 @@ struct nfs4_client { /* NFSv4.1 client implementation id: */ struct xdr_netobj cl_nii_domain; struct xdr_netobj cl_nii_name; - struct timespec cl_nii_time; + struct timespec64 cl_nii_time; /* for v4.0 and v4.1 callbacks: */ struct nfs4_cb_conn cl_cb_conn;