From patchwork Thu Jun 9 05:05:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 9166257 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5FCB760467 for ; Thu, 9 Jun 2016 05:09:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5113B2830C for ; Thu, 9 Jun 2016 05:09:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4533428310; Thu, 9 Jun 2016 05:09:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3529F26E1A for ; Thu, 9 Jun 2016 05:09:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1946038AbcFIFHk (ORCPT ); Thu, 9 Jun 2016 01:07:40 -0400 Received: from mail-pa0-f66.google.com ([209.85.220.66]:32935 "EHLO mail-pa0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1426568AbcFIFGE (ORCPT ); Thu, 9 Jun 2016 01:06:04 -0400 Received: by mail-pa0-f66.google.com with SMTP id di3so1922305pab.0; Wed, 08 Jun 2016 22:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JMaVBl3kdOLKXP1xyN7QpIKvx9jXknY+B7xPXMxbmLw=; b=XqEsMG9N4CYf6AIYNMnfhm9IcmOi02Ox56H0dYStJN+FRTcJHaBEcmjh34WQU6HCss O9sqlbNCLhnFVwacGo0zOSdCAd5jR3DSlKlCzDVUtGanYf/sbTy4OiNEO0zcIh2dIZSQ G7k8hWqguSf+ZSvkPOMD23gqBoip+OOIOfE3eWF8cIrXnf3F2oXG/WgG8bP3FJ3tlHR+ RL7Pn35DEwvHU3M9QrvS1ngFWQbCWc+nAVKtyolyv2EhH7Yupx9W+Er8zjSOKzXIgumy y60hcz1BfkLsG2t+vQtyboEpw0qSF03aF64CNWv2aPSczMADeOJwK8btTJC7SaGiZZqN Ywhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=JMaVBl3kdOLKXP1xyN7QpIKvx9jXknY+B7xPXMxbmLw=; b=Jl43O7MKawgLGi4jyoQ1y1K0c6sCGwyeVsh/0ka06DuLMIdYO9YX4Ly/8QD6BGMPLL +V1aqtWJN0ewIsM4NlZx6JINu2aGyd7VfjOLTlr2ALmC165XAEJkSXNkRYSCiXER0sou bZh0AFL1hj5lfgcYzlQ7AVQFn5Q5ucZY0FyL006PPodK+hUYw1D9F1eldQlb/7yzsniM XgR/bkI5NGgdYqkZaLP9g8kA23dXVURLPNmWfmm4weDB2e7OtV23kuzNOTni3b6MOg4j dy05bXIK7nJl1UTQxd5DYWL6/EHL3I9da13O2MEntrSZR88xEaIa9cTWr/w0eAF4wNug 0sdQ== X-Gm-Message-State: ALyK8tKz0HeuRRXF6UGpWIdcsSCYnI3SMbc0XAmESU5vZdGViy7qWTc3AK2lmrqmReKbIQ== X-Received: by 10.66.101.136 with SMTP id fg8mr10048833pab.144.1465448763323; Wed, 08 Jun 2016 22:06:03 -0700 (PDT) Received: from deepa-ubuntu.hsd1.ca.comcast.net (c-73-252-251-201.hsd1.ca.comcast.net. [73.252.251.201]) by smtp.gmail.com with ESMTPSA id 129sm6220808pfe.3.2016.06.08.22.06.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 22:06:02 -0700 (PDT) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnd Bergmann , Thomas Gleixner , Al Viro , Linus Torvalds , y2038@lists.linaro.org, "Yan, Zheng" , Sage Weil , Ilya Dryomov , ceph-devel@vger.kernel.org Subject: [PATCH 20/21] libceph: Replace CURRENT_TIME with ktime_get_real_ts Date: Wed, 8 Jun 2016 22:05:04 -0700 Message-Id: <1465448705-25055-21-git-send-email-deepa.kernel@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP CURRENT_TIME is not y2038 safe. The macro will be deleted and all the references to it will be replaced by ktime_get_* apis. struct timespec is also not y2038 safe. Retain timespec for timestamp representation here as ceph uses it internally everywhere. These references will be changed to use struct timespec64 in a separate patch. Signed-off-by: Deepa Dinamani Cc: "Yan, Zheng" Cc: Sage Weil Cc: Ilya Dryomov Cc: ceph-devel@vger.kernel.org --- net/ceph/osd_client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/ceph/osd_client.c b/net/ceph/osd_client.c index 8946959..44eb2d0 100644 --- a/net/ceph/osd_client.c +++ b/net/ceph/osd_client.c @@ -3567,7 +3567,7 @@ ceph_osdc_watch(struct ceph_osd_client *osdc, ceph_oid_copy(&lreq->t.base_oid, oid); ceph_oloc_copy(&lreq->t.base_oloc, oloc); lreq->t.flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK; - lreq->mtime = CURRENT_TIME; + ktime_get_real_ts(&lreq->mtime); lreq->reg_req = alloc_linger_request(lreq); if (!lreq->reg_req) { @@ -3625,7 +3625,7 @@ int ceph_osdc_unwatch(struct ceph_osd_client *osdc, ceph_oid_copy(&req->r_base_oid, &lreq->t.base_oid); ceph_oloc_copy(&req->r_base_oloc, &lreq->t.base_oloc); req->r_flags = CEPH_OSD_FLAG_WRITE | CEPH_OSD_FLAG_ONDISK; - req->r_mtime = CURRENT_TIME; + ktime_get_real_ts(&req->r_mtime); osd_req_op_watch_init(req, 0, lreq->linger_id, CEPH_OSD_WATCH_OP_UNWATCH);