From patchwork Thu Jun 9 05:04:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Deepa Dinamani X-Patchwork-Id: 9167805 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 0C96E604DB for ; Thu, 9 Jun 2016 19:18:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEF7427F3E for ; Thu, 9 Jun 2016 19:18:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E356E28328; Thu, 9 Jun 2016 19:18:07 +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=-4.2 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from userp1040.oracle.com (userp1040.oracle.com [156.151.31.81]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7174C27F3E for ; Thu, 9 Jun 2016 19:18:07 +0000 (UTC) Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u59JHA19013376 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 9 Jun 2016 19:17:11 GMT Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u59JH8g1004802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 9 Jun 2016 19:17:09 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1bB5S0-0000pX-R3; Thu, 09 Jun 2016 12:17:08 -0700 Received: from userv0022.oracle.com ([156.151.31.74]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1bAsAM-0003bv-TO for ocfs2-devel@oss.oracle.com; Wed, 08 Jun 2016 22:06:02 -0700 Received: from aserp1030.oracle.com (aserp1030.oracle.com [141.146.126.68]) by userv0022.oracle.com (8.14.4/8.13.8) with ESMTP id u5955xVe019980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Thu, 9 Jun 2016 05:05:59 GMT Received: from userp2030.oracle.com (userp2030.oracle.com [156.151.31.89]) by aserp1030.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u5955w4K026851 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 9 Jun 2016 05:05:58 GMT Authentication-Results: aserp1030.oracle.com; dkim=pass reason="2048-bit key" header.d=gmail.com header.i=@gmail.com header.b=VyByURx3 Received: from pps.filterd (userp2030.oracle.com [127.0.0.1]) by userp2030.oracle.com (8.16.0.11/8.16.0.11) with SMTP id u59522gK019400 for ; Thu, 9 Jun 2016 05:05:58 GMT Authentication-Results: oracle.com; spf=pass smtp.mail=deepa.kernel@gmail.com Received: from mail-pa0-f68.google.com (mail-pa0-f68.google.com [209.85.220.68]) by userp2030.oracle.com with ESMTP id 23e3b645p1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Thu, 09 Jun 2016 05:05:58 +0000 Received: by mail-pa0-f68.google.com with SMTP id gp3so1909938pac.2 for ; Wed, 08 Jun 2016 22:05:57 -0700 (PDT) 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=5/oxDF9yRBbM7HPwOuDQT+dwW6u914jsuC35cqWpWBE=; b=b9nHHFA1IIOsnZZe7R+BFmk7NhnvzrlYaGfPUv6UBnOdwmDn1S/P0MYWaFSsqXbMZY gDfWaRKBrGEGjAHiMe/uJ1yQ6ARZVsg8bJRza+E5e0dLgHwE6+n92Isni28K3I7Q3Aog wBCu8QlTtH7mmUalEqj+11MMiZ3qFKK+VYdcnqSGrAl4IIvdTYgZgBUfMg2QrC2jRd6Z CFL7y+r81SLO4L6x/zPKpILDAPdEw80tzsrxyVBau1nJ/fSL4TiKOkFnRS+1cGNUuBKf M8LCl3TVVnj8P4LXZ1mEkDuhjUaOEqmuUZBBRaLP1YebMVgTdH/FFqUiFkmgn8aqMyvL 84WA== X-Gm-Message-State: ALyK8tKEqBAAZGoHWaf7rRnLY/g6o2F3kWk8d+5urNuoL6+poG7mSKkf2PVEQKCB1mmK0g== X-Received: by 10.66.231.35 with SMTP id td3mr10106975pac.56.1465448756771; Wed, 08 Jun 2016 22:05:56 -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.05.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 08 Jun 2016 22:05:55 -0700 (PDT) From: Deepa Dinamani To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 8 Jun 2016 22:04:58 -0700 Message-Id: <1465448705-25055-15-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> X-ServerName: mail-pa0-f68.google.com X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 redirect=_spf.google.com X-Proofpoint-Virus-Version: vendor=nai engine=5800 definitions=8190 signatures=670728 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1604210000 definitions=main-1606090051 X-Mailman-Approved-At: Thu, 09 Jun 2016 12:17:07 -0700 Cc: Arnd Bergmann , y2038@lists.linaro.org, Mark Fasheh , Al Viro , Thomas Gleixner , Linus Torvalds , ocfs2-devel@oss.oracle.com Subject: [Ocfs2-devel] [PATCH 14/21] fs: ocfs2: Replace CURRENT_TIME with ktime_get_real_seconds() X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-Virus-Scanned: ClamAV using ClamSMTP CURRENT_TIME is not y2038 safe. Use y2038 safe ktime_get_real_seconds() here for timestamps. struct heartbeat_block's hb_seq is already 64 bits wide and accommodates times beyond y2038. Signed-off-by: Deepa Dinamani Cc: Mark Fasheh Cc: Joel Becker Cc: ocfs2-devel@oss.oracle.com --- fs/ocfs2/cluster/heartbeat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/ocfs2/cluster/heartbeat.c b/fs/ocfs2/cluster/heartbeat.c index 6aaf3e3..d13c646 100644 --- a/fs/ocfs2/cluster/heartbeat.c +++ b/fs/ocfs2/cluster/heartbeat.c @@ -737,7 +737,7 @@ static inline void o2hb_prepare_block(struct o2hb_region *reg, hb_block = (struct o2hb_disk_heartbeat_block *)slot->ds_raw_block; memset(hb_block, 0, reg->hr_block_bytes); /* TODO: time stuff */ - cputime = CURRENT_TIME.tv_sec; + cputime = ktime_get_real_seconds(); if (!cputime) cputime = 1;