From patchwork Fri Jul 13 20:18:35 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 141944 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1208685ljj; Fri, 13 Jul 2018 13:19:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdJVvrGWfHPQSHW2tzvzcEK7UKJizbRtJbpGAdNGCn1Vge/pJe7EDEp0ahR8weLQ+JY6JQ7 X-Received: by 2002:a65:608b:: with SMTP id t11-v6mr7379345pgu.259.1531513187971; Fri, 13 Jul 2018 13:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531513187; cv=none; d=google.com; s=arc-20160816; b=uKagRB7sq979X1ZMy5RLQkyfW7eRxY9tOwTT+DQ1fMuUOYz6tlQDWivsX6fxKTeCet 6/vqg83oitzZUN0W6DAhT7mLHkcU4wh1E/EobF2JyEBp+VkwvrT/yBTGUSmf4GCjxI3M DrGA3zNaTNH6aZRy3x5Kjfkeyx8TlOjzCoRE9cYzEEmTwIsF+ibRXTn75nG0Z+s+ve1a mmj+XoL+vJDh2vxP0Rgjnk81lERWIX++N+NOLn9iRMVuxjLdcNhgpS+NkeWoki9Vst6g pLzhDEfEDNUJu+7QyAlUB+xFXhnrgPuQoJJyJKmZgH7DgKhFpeGmLdGEHrLYiltAMhFA vreA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=LrYpAEprRGPgaZros0RtF/TSU59V27Cqd084hE2IsDY=; b=pJr8tlc6EisL5oZd6pORUY4tU+Su8Hc0tTc7OI9Q0vSkw8yWopoceTrVBP6Zgg6/ei 0cO2bvPVCPd9mRaw7WYOD6y6IL/yKhKG+Er2vyMsg8csq5zQZ8V6ZQxs0TwOye+EgYya ooZdSKnQh4NcNp0T8h8uzvHt6K9e9J6JAO+k5Tp7mCx1S/jwj+4c+F8YKcMQR7wg+S72 hwMyPqGNr9qVMQ87RdhjPOK7tIyYpqY2EbKDHCXnte6FF/uk1OUHRR/HMgxczCzcK09Y AWVFxbl2MzQpXCVWkFAoy4c/ewQwclEGGJnTvbYmc+cecxQ8eRyj0CxyYUj2VYFpc0+Q /sqw== 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 q10-v6si800625pge.674.2018.07.13.13.19.47; Fri, 13 Jul 2018 13:19:47 -0700 (PDT) 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 S1732707AbeGMUfz (ORCPT + 31 others); Fri, 13 Jul 2018 16:35:55 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:43312 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731379AbeGMUfx (ORCPT ); Fri, 13 Jul 2018 16:35:53 -0400 Received: from wuerfel.lan ([46.223.138.35]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0LhoIM-1gRD8S4BuM-00n8K8; Fri, 13 Jul 2018 22:19:39 +0200 From: Arnd Bergmann To: Ilya Dryomov , Yan Zheng , Sage Weil Cc: y2038@lists.linaro.org, linux-fsdevel@vger.kernel.org, ceph-devel@vger.kernel.org, Arnd Bergmann , Jeff Layton , Chengguang Xu , linux-kernel@vger.kernel.org Subject: [PATCH 2/5] ceph: stop using current_kernel_time() Date: Fri, 13 Jul 2018 22:18:35 +0200 Message-Id: <20180713201923.3200799-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180713201923.3200799-1-arnd@arndb.de> References: <20180713201923.3200799-1-arnd@arndb.de> X-Provags-ID: V03:K1:/j+JY3+jfVfjGOtbATDBM/o31CE64ErEH/eIn/H9NrmAbOKBaSE LMlflK/97LxT6OYpFTn3GjucYJD2/WZ2I4xHpRCwvJT6B4PgqdwPSwm3l7uD6ZrrrsN05FF t1GLyV3j9ZFxLI4/XYR1sYINP81CSmGZB2Y2pfWUS6lZuIOP4O9Hg9PL85FMxNtIsrRbi40 NMntwq+8ToKDTLGNh0ijw== X-UI-Out-Filterresults: notjunk:1; V01:K0:cte//dIbqTE=:iqJwBejVae/WcCBpq1r2oO Y4n031ct2AtQYLaZhRvTIKcLlFSR4fjK2fGPZg3ZI6IpAj3OeTkMtgI5ZRUDV7pUAGhepnGBX 1xzFHgd/aG4FW9sddI7Gz7ucIH239FNo3RkhTBH0uHdnZEln+phMeYCY6cOqV7kX1eKroudHU NBT9jMxBslYnJgen1Wqb0ziZUYlkz67peADmvb4zUs/AUcr9TOMSUEo6d7BcDKCaHUOOtql2O 1RXfv9gEWtsVWEri+Qvts4b5OlgRY0pLKE/UbY4+LMPf/nP2fS/9cJjpClIKenR77mQRbnxrX pv+4bMx+yL2mZlWLjJK6ur8d3fuJxpHuxc9mh5BdXh5BqqIS13nkIK6mK8Nfan4bpv3s3h6ue JrCUwqPZVlugbLTIPygLvIFodkmt1/8m24xO9AK+8G/fbfFgk18qs0H17/u3qUZqSswKw+XkB G7zfKU+77rzP0U7WW1KxueMJneKLRt3VnFsDL7SwsYIhKcHxQlPbQTvgw1p7iD2CK4g82qd5k xRwllrxSK/N4Tr7bBPfUQjGadkQbIliI0/jXmPTDVyQlSgSHZznFjlWMemw2I3rDabCS8ROfX y72O9J3OMUw4wGF326INIJaEYaX0d+ZS/h+sZab7pf3g5Ds/cuFFVwSWhjaaZknK0SYWrRCeM cWxz/g5c1hq4eNZxT6ZMS3n2TliS+b8tbPMn/Tnat6qO0j41Rh5nScY0UOiGHM5qP9vk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ceph_mdsc_create_request() is one of the last callers of the deprecated current_kernel_time() as well as timespec_trunc(). This changes it to use the timespec64 based interfaces instead, though we still need to convert the result until we are ready to change over req->r_stamp. The output of the two functions, ktime_get_coarse_real_ts64() and current_kernel_time() is the same coarse-granular timestamp, the only difference here is that ktime_get_coarse_real_ts64() doesn't overflow in 2038. Signed-off-by: Arnd Bergmann --- v2: add clarification that this is the same timestamp --- fs/ceph/mds_client.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- 2.9.0 diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index dc8bc664a871..69c839316a7a 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -1779,6 +1779,7 @@ struct ceph_mds_request * ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode) { struct ceph_mds_request *req = kzalloc(sizeof(*req), GFP_NOFS); + struct timespec64 ts; if (!req) return ERR_PTR(-ENOMEM); @@ -1797,7 +1798,9 @@ ceph_mdsc_create_request(struct ceph_mds_client *mdsc, int op, int mode) init_completion(&req->r_safe_completion); INIT_LIST_HEAD(&req->r_unsafe_item); - req->r_stamp = timespec_trunc(current_kernel_time(), mdsc->fsc->sb->s_time_gran); + ktime_get_coarse_real_ts64(&ts); + req->r_stamp = timespec64_to_timespec(timespec64_trunc(ts, + mdsc->fsc->sb->s_time_gran)); req->r_op = op; req->r_direct_mode = mode;