From patchwork Wed Jun 20 15:32:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139356 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp932929lji; Wed, 20 Jun 2018 08:33:50 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJESpguAnf0RWXIZqM3lDAbl0i1PXl/D1+qT5ZLB/wERX2ImkggNmjKESFt7oxJdM22jHfo X-Received: by 2002:a62:48cd:: with SMTP id q74-v6mr22849006pfi.153.1529508829852; Wed, 20 Jun 2018 08:33:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529508829; cv=none; d=google.com; s=arc-20160816; b=preouOQTMAdRg5Yr8myy7SYQ05XbSvSVmHyQR/LlR5Tt6VIrAbA56LvyEjEI/0OuMH 6l0QXH/2kA2uLM0PVbqvpmA0cg5ybCZpqtRQ3Xo4xNuhcD1CTEIn9VuLI23INQ7njaWo tBAxr3p3kzP1rx1IdP6Efq+HsDWQkolt7XguqTyHclNwbp4irnKzFfGUDDPgmf6nsIgE bRx7SpcvygIEAzTCzpYwZ3UQQJVxDkl788O8a27kD2xOQ42hHpII2L+/KxUgux0yf5HK TOCDKhHU3JgbrufKdG44C8SYdxzJr9SdWIk5Eu9SSnT+j0L1kvHd48KuwiwPgbF/XMJi EeUA== 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=nj53NiKPU/9401Q646lOwB1zB0PZJxm2Md+37Qzpj3o=; b=FepLouFqHuEfpbWHwezYZNl5Hjy5mnTgjmYtl7OyCL0pVHmMd+MDLiAE4qqysfuvG5 BYBbA1yf2uC/ybvqfMSbCBG0htAYgK9Q1GTT2V2MU8gKnHB5cCY0B8Djfkdacz5uTT+J CcHqyRx7GNqSt/JIjLA7mgQaFyf3we2KBNeCBQ7kodOiNvidkko9WqNeEOe0ctadlK7D 9IfvA6QxCiqEAeSHpE80A7/pVBN+aiNGgVLr57CtShQqT5eSV9P2QDBDs0wUFC5HkQAS PmfW7twcqAkKf7qQd1m2vevJ70oPewWr7ekavdJ/bUYDoKIlywP091a3imRIQijnT0ym WIRw== 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 u8-v6si2551378pfl.87.2018.06.20.08.33.49; Wed, 20 Jun 2018 08:33:49 -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 S1754168AbeFTPdq (ORCPT + 30 others); Wed, 20 Jun 2018 11:33:46 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:32781 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753938AbeFTPdo (ORCPT ); Wed, 20 Jun 2018 11:33:44 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue001 [212.227.15.129]) with ESMTPA (Nemesis) id 0M1vbP-1gK3bv2iPT-00tyr6; Wed, 20 Jun 2018 17:33:36 +0200 From: Arnd Bergmann To: Theodore Ts'o , Andreas Dilger , Jan Kara Cc: y2038@lists.linaro.org, linux-ext4@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH 2/6] ext4: use 64-bit timestamps for mmp_time Date: Wed, 20 Jun 2018 17:32:59 +0200 Message-Id: <20180620153322.54221-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180620153322.54221-1-arnd@arndb.de> References: <20180620153322.54221-1-arnd@arndb.de> X-Provags-ID: V03:K1:7+eRQPh3uEgClCrJVyNQwckvPa3aPLK9+P5+XJvIvWw0DTq8vLY wo24erLuYLCFw1Ea5seDddn5qqWUgOkAp51H2uNGVIxmEPfq6WUdf2g+Lrx+5oyG62ZFY0J KLwu8FdgnGbHY2xiJeWSkFZlk08yDrI2+8tcXKdmCfQmshb5NYApITAcuCwGN8peoBB932Z PZMbGZS9CEcPYb31jnCPw== X-UI-Out-Filterresults: notjunk:1; V01:K0:itZ639F3zPo=:wFONAgh62chH71J8a74KAY +rbOocw/NVovMksxN6AfARGXAGT7KdqqdQeFZKx4FF921tZSph6NvmUt9eWe8qs3hbqukHrO/ 2ICwY1CbGQyM+6pfsN6FwU4mps86uRqzAC2y/MwWifxDqIF2Sdmei/cfYlJULstddsulJTmUl +aq+2QIWMbwGScxIUIaABYU0DEAxx0KzfnZQsGtmgR0njYooM3quhsig8bl1yxBpXyiinyHFp Hrvhc1NTrfiW/S2EcP9F+Dfp/IuFe1g7AEJ7IsYMtaQMJDaYTdxxnQG5H49TU5chZ8C+QUXqG wnc0HrkylGw4bm9olDFRTB8sep4MlTgrO5hgKGYEthg81tsriFHgh1RkXJpkgY7iwg5N/+y0B zyTPI8pojhaixcYafPLebUkec3FvMQ/pswEfuzHgaLKU1cduYoLJz90+HXoNdesDI6aWAZiD6 1Pb4GEZdk815VpuPD8ASEYbLvzOp3B+fBNe8VivMF1c06/7zIw1PuSVn59nM9iyRqLyLlUtN/ uXNdn11sZ0e1cYaKvImtTwN5YHJmy8Lvkfk6zrXHjHXt5vij51WRtOlNuo20hqyZZAV2i/tnC DXNE57JF3N75UBqbJ0kA90KEI80HeN1TEjjmRRaVOQoHRvPNFK3P2d+GfOu8boJz62WGZtysC 8HylXRAJ+avqkPNYToyndzs4XrzTk2R30PQWbnNUniiR+3+EvodeOqUMqZeo9P+kTEKk= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mmp_time field is 64 bits wide, which is good, but calling get_seconds() results in a 32-bit value on 32-bit architectures. Using ktime_get_real_seconds() instead returns 64 bits everywhere. Signed-off-by: Arnd Bergmann --- fs/ext4/mmp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) -- 2.9.0 Reviewed-by: Andreas Dilger Reviewed-by: Jan Kara diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c index 27b9a76a0dfa..39da4eb48361 100644 --- a/fs/ext4/mmp.c +++ b/fs/ext4/mmp.c @@ -147,7 +147,7 @@ static int kmmpd(void *data) mmp_block = le64_to_cpu(es->s_mmp_block); mmp = (struct mmp_struct *)(bh->b_data); - mmp->mmp_time = cpu_to_le64(get_seconds()); + mmp->mmp_time = cpu_to_le64(ktime_get_real_seconds()); /* * Start with the higher mmp_check_interval and reduce it if * the MMP block is being updated on time. @@ -165,7 +165,7 @@ static int kmmpd(void *data) seq = 1; mmp->mmp_seq = cpu_to_le32(seq); - mmp->mmp_time = cpu_to_le64(get_seconds()); + mmp->mmp_time = cpu_to_le64(ktime_get_real_seconds()); last_update_time = jiffies; retval = write_mmp_block(sb, bh); @@ -244,7 +244,7 @@ static int kmmpd(void *data) * Unmount seems to be clean. */ mmp->mmp_seq = cpu_to_le32(EXT4_MMP_SEQ_CLEAN); - mmp->mmp_time = cpu_to_le64(get_seconds()); + mmp->mmp_time = cpu_to_le64(ktime_get_real_seconds()); retval = write_mmp_block(sb, bh);