Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1981119imm; Thu, 21 Jun 2018 05:30:37 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIIRa/4+IPr/ttmD6ELE3YmRlKd+YpM9acXn+pgA/jpRNQ1VRyfF1cDbj6hGDMiHH88h2w/ X-Received: by 2002:a63:aa4c:: with SMTP id x12-v6mr21777854pgo.387.1529584237220; Thu, 21 Jun 2018 05:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529584237; cv=none; d=google.com; s=arc-20160816; b=o+B2NRLXGBqSj8IwkR/uHUKEORKGJpNbOUohN4ZKMogSJRVqLgVmmGBXghXa6mzEm4 aD+BR2vAKyaWLL/M+1BZ+Up8MkSKaS6dVLRoaOC4biIpZ1AW9Y2IP21IrTmelRlVMtBq JBzMjJcPMIgcfGj7EI/5R/mwoPjR9Bv3biIxdj2XvJtLHDnRV/A8p/hLnbOoU2Ar7y4X euurRQcpDBbp0eqjomwU2Xi2ePAaWdPsuglc6PlN8OdrdjnmartvE+G3GOI46t5iVbJv PvOLm3IpoGgjgH7u0k+cyfCrKKnZ5VOxkY9AK13CwrcNhv2DG5SDx7jsJ+SgX5d5SwHV Re1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=UBMwDzvdm6O0X3xnjKFRC/2Ebq4ydfYpWmZ3EctP80g=; b=VM1Pcusme0bLR3YpZklKDJDZRbPSYNcm+p57w7UY5irsg7K5e3YGdvYcsx0KrZNQV3 jsnJ8CIjcNZEKrrD57tkhQIGmxAKpkKSwqHKOQ2rhUvbkaBelGF0a1isSlaF52aXxBoT RIZ4Egf+8eCg2bwnnP7Ja+r8l1DA9R1aD1FZvm2GH0Gg2lB5o406t6IVm3D+1zh42vXP BO+vApBVUT1udHVHogK1+4L5hn2kp42Cjf1cBs49OchYTcX4V+jvsQ3Vw/788jSRLx/R WXtWMrRJYqvAmHDHuNrpVt7ZFL6tFjHmhR1KiAEt7ZW4RBDGUnyUbCzdLiKdJS/QBb2U ce8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PcCBzHr1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h26-v6si4730644pfd.253.2018.06.21.05.30.22; Thu, 21 Jun 2018 05:30:37 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=PcCBzHr1; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933470AbeFUM3m (ORCPT + 99 others); Thu, 21 Jun 2018 08:29:42 -0400 Received: from mail-vk0-f68.google.com ([209.85.213.68]:42657 "EHLO mail-vk0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933262AbeFUM3l (ORCPT ); Thu, 21 Jun 2018 08:29:41 -0400 Received: by mail-vk0-f68.google.com with SMTP id s187-v6so1742847vke.9; Thu, 21 Jun 2018 05:29:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=UBMwDzvdm6O0X3xnjKFRC/2Ebq4ydfYpWmZ3EctP80g=; b=PcCBzHr130IvUyNMP6C1S/fIPQjaIJFs2I0TuvMgt0sZXb24Btsr9wAebgzQ6PUSMl /gbkd0NO1RvSH1S5hREpDcaSjJ3kqLCe9YoD30JMz5ueqdIncBgml5ny66EPGg7CZDh4 QyOJ7zZa53LCLjbzDKwv+0ElNL7WfDQUgoTKpo4qk21QP1xYoS+650q4iBe3h1kqvWzY VibF2xki2oz0CmXaCoN3B9QfRpGgyzdnucImw752t2DjFKHcI4a+49cLZEEbkzCmllRG gDDSbvxRvmCEDmIgr1gn6tNsAehECaIqWuYnq9vAoLadQGi9qlYzIwm1Zgq3uuxGtSwd Qxmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=UBMwDzvdm6O0X3xnjKFRC/2Ebq4ydfYpWmZ3EctP80g=; b=ub3QVmp2NmGMOtXbWBX1n3rZdX919/LYJm+lKlnIXJC8zroGfuav5b3oFAt2E+iix1 lKCT39HE78XbBi1mJprIxz3b2kvMCey4vG+C727ORJQqMizdK0vjaGIRpo/GtV7x7ZD/ gScrMv14u4eQG8V2QCXtnTBpTU/1vnutMnoR04fW3EtJ7vut4xds8She7KO5sFq8r8mw wE9s2xrld4MxzqZtG6AbRAKsO+M8u6yuBN0X7CQfW3HJNXs0mbEm13BTn3YHd7T0lUeB eLnz5T327aiRB7AfSWpqYz7jcDX380hAfHJTpj2jKxowDP2mpuKuZ4erGfE/WjrN0sZN h59g== X-Gm-Message-State: APt69E3zYI6Er2LAju0M0yfyUgFVyqaJnEZvMv3vkXTKYIC5eCYvdd7b x7nqVplmaUFWIbbQvZE3lcUlU/N1/eEGaDytrZE= X-Received: by 2002:a1f:62c4:: with SMTP id w187-v6mr14833236vkb.112.1529584180374; Thu, 21 Jun 2018 05:29:40 -0700 (PDT) MIME-Version: 1.0 References: <20180620155101.57685-1-arnd@arndb.de> <20180620155101.57685-2-arnd@arndb.de> In-Reply-To: <20180620155101.57685-2-arnd@arndb.de> From: "Yan, Zheng" Date: Thu, 21 Jun 2018 20:29:28 +0800 Message-ID: Subject: Re: [PATCH 2/5] ceph: stop using current_kernel_time() To: Arnd Bergmann Cc: Zheng Yan , Sage Weil , Ilya Dryomov , y2038 Mailman List , ceph-devel , Jeff Layton , Chengguang Xu , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 20, 2018 at 11:52 PM Arnd Bergmann wrote: > > 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. > > Signed-off-by: Arnd Bergmann > --- > fs/ceph/mds_client.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > 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)); > does current_time() internally uses ktime_get_coarse_real_ts64()? If not, granularity difference may cause problem. see commit 56199016e8672feb7b903eda003a863d5bf2b8c4 for more information Regards Yan, Zheng > req->r_op = op; > req->r_direct_mode = mode; > -- > 2.9.0 > > -- > To unsubscribe from this list: send the line "unsubscribe ceph-devel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html