From patchwork Tue Jun 19 15:43:13 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139162 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5372543lji; Tue, 19 Jun 2018 08:51:31 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ6WQyAneF2snNQjJ0SLaUovZ99I89+/iJbzuqh9x1yg9KdnnrSEwjjxgZ+iZs7ANZN4WuS X-Received: by 2002:a17:902:683:: with SMTP id 3-v6mr19615685plh.291.1529423491800; Tue, 19 Jun 2018 08:51:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529423491; cv=none; d=google.com; s=arc-20160816; b=tCN4nXcs68cew7duMVfBYLtpWoWoPj+TA2lTLO2e+inqV02pw/OiX3Bwth/1BO28E7 5eGcpEYjinm7QgQcnfwhVg9BlHxDhGMvAzoeTaMlv17yUl897FB4KY+OJ3P12PpOE6s5 AxJMw39w2P9/rifN4Wm1JVf3cGuInoHKk/LTWy5NfbRY6oZNh3s7iRKV0Wtx+0/KVVnk tS7jYCIgKaX33H6QGcWEl+TQ4vawMKJ6uquOao414DG6ecp1C3XWR20sEPL6J2Xxrwzs E6LYbT8Rqy7u8LAm3uOf6FiHUPV3zgfMD/I86CS9OI/+TBChslbpqUBU1Arh6NP/eneB 5ccw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=M8R/7bw+GB6AuIsMMgxXuZRd6Ue54R9FTt+1Lv4p0tU=; b=0AqXxc+9mMvQN0u5+/iVcldetvGnIQ2YXgu1ggS6BUrHshpfybTJR9RkimBQAZ12C5 A3DsHJkbsIdWKMYFAWCOC9ESmHGW8ScO67A3Mq0zHC6ou7rChRavj/xU3iIk9kj6Sl0f k36vb0MixN/K7fRZDBVlRvM2d8qHO9KI+7x2ygCGZDmipCH5GedKned5xi8S6QBhPXIm MGVbkkKNJZSu2cMDyAqB6mzXRCpl3yvRnie7N3D3TzW2hgah/Xw5Ap3SWlen84ZofKp5 xt0VTPNzZubLvZMnaCxLxEjHcXED6nyyI36puKJRABV1AZ/LkNqBErLVPLg3A0fQZtSu cleQ== 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 t184-v6si3510pgt.540.2018.06.19.08.51.31; Tue, 19 Jun 2018 08:51:31 -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 S966889AbeFSPv2 (ORCPT + 30 others); Tue, 19 Jun 2018 11:51:28 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:58847 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966587AbeFSPvZ (ORCPT ); Tue, 19 Jun 2018 11:51:25 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LknvV-1g5SUe3jj3-00apmV; Tue, 19 Jun 2018 17:43:46 +0200 From: Arnd Bergmann To: Al Viro , Andrew Morton Cc: y2038@lists.linaro.org, Jan Kara , Arnd Bergmann , Thomas Gleixner , reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] reiserfs: remove unused j_timestamp Date: Tue, 19 Jun 2018 17:43:13 +0200 Message-Id: <20180619154343.3640484-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K1:PhUlqdc57Bsheo9QhsiqJC4Hy04uSKg3QW7Iy9pKND6Tkc7NvIw LFMnHADwjxFX4sqU2Rwc2MHEYaGs7U0NmFTPtzp1bujQYfqD1Mw0jziAt2WaP2NLWxBoxgo iTU4VpcrgE50ITkrSwlIYhvHDCtwiAERm3Poz16c6k3uk/JlKeUPVZryQW3P3DqkQaVZlGo dDV8u4BR2pLP3nPfJkpLQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:xZegJWaghyQ=:D6yuCmDPNbtLH7SJE3CV5Z 3aaqSCxMs0nc7ehl0U7pvJ9zgyBMS9pQGzs3j47Cljky82h+4e+wN9m8OqOQLvT7Q6u0WKHF2 rRMwuY1fCDmo+NzIWyYVsXMb2MFwTbDdSiRuxXr6rohbbAogJlw2OY1KJtRkyYlYtnNI6C8Hf rHaEfCYZlEOZ4XG887sJ+iULp75netPv38Orz9MScn0Sif0uMisC2mqAjfCTscL/2sgrChXVs FaoKxiBasQnb5PrDDu7UNkPG9TFLfecvfBG0YkAoPGREORrpYpDNEcmHylG9dPImGn4KdA2/J RKgJQt19bQc1YAPkINA7o2HBBAvU+vF0xYcV7NwCUxRgS3zEoERF5/W7ryusH/PoeLwX//iuJ 3L5e2w/td0rDzavVwb7Mb46GNPUoC34lyWlmc9IoMPfQIrt0JHuDCqoyqypVpSSMqRkWW0aMo VjROvN85OKdXbgGcvnw8m+XUnn0qJkNq7XTtZiY2re1wxjwRd49Evntf/US07c2zyu1AvH2Vf gpbE7cg5O0o4s/uBDvjC4HTCnvjdXDbjL+PAIJ5XdbintEFMMTy/i0sOreELHNcR8r/xdi+rf nrsH4w9/y2ZrNE6OjHxfwnZajXWSCD2a6g2dwTDuHgvIxXSNarBCXV1KPZ4DsxWDLQohjcRh8 wpQbXgtvldTknleDb56I+UTS7NjE51W4/2kvmUCc4yWpSFF7bE6RUrArIspCN9wg4dhA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This uses the deprecated time_t type but is write-only, so we can just remove it. Signed-off-by: Arnd Bergmann --- fs/reiserfs/journal.c | 1 - fs/reiserfs/reiserfs.h | 1 - 2 files changed, 2 deletions(-) -- 2.9.0 Reviewed-by: Jan Kara diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 52eb5d293a34..1e7f733b2a12 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -4110,7 +4110,6 @@ static int do_journal_end(struct reiserfs_transaction_handle *th, int flags) atomic_set(&jl->j_older_commits_done, 0); jl->j_trans_id = journal->j_trans_id; - jl->j_timestamp = journal->j_trans_start_time; jl->j_commit_bh = c_bh; jl->j_start = journal->j_start; jl->j_len = journal->j_len; diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h index ae4811fecc1f..1536ebbaf6ab 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h @@ -271,7 +271,6 @@ struct reiserfs_journal_list { struct mutex j_commit_mutex; unsigned int j_trans_id; - time_t j_timestamp; struct reiserfs_list_bitmap *j_list_bitmap; struct buffer_head *j_commit_bh; /* commit buffer head */ struct reiserfs_journal_cnode *j_realblock; From patchwork Tue Jun 19 15:43:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139151 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5364998lji; Tue, 19 Jun 2018 08:44:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJLrP9rt4AI7Wqsk2+Uxmz78v3b2qJFm1Q2SjmVT2pQiHqFnw+lZqB+H/ROCGFpbiEhi8SZ X-Received: by 2002:a17:902:600a:: with SMTP id r10-v6mr19679087plj.70.1529423079312; Tue, 19 Jun 2018 08:44:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529423079; cv=none; d=google.com; s=arc-20160816; b=nweiV90YRpfI4K6tpNVJIpI2C20Tk+IGC0knz/KJNOeSGUgjpT/QDgn7vEACWeyibc vw6AmyhEMiLPjRKg8dEU3zQBNkhkYamvuBzJ5cnTx8gIEUu0WX3zE2IDKGS64yajLusN 1nJHFsI02d2kwmBFayRLYAZ/Eix+sLIDAB056jOJEr2BJnbQSEq+SnECU1VlhW4GKJVv MLfB7WnkCSJz4TiQoOrB1mv3INXIBc58j0a18uZDlT7qYLb2WjeIr39IRIWdoN484LzL zrRj+Xt5iqp053TX7YcCC+CSdmEWsYo/QZxS2hhAy6a9eieOuncSb8pBkmQpnBlSSyIr 3gXA== 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=/c719lTHly1DVMuBcWz1kgxER6LyEVqzTMOQDGm6Wt0=; b=PfxDey1xeUQT/NIUs4mR4I9hJagfPoOTgrykkqr3SSU9r7b/B9+Adx8ZwrIIS2ss+w +8eIlwF6FAHDg2mJO6Q6UV6kwLn2MwUDxdAqH2gAtgDklxFeu8YKJk6l9OLQeMAy9Lfy L/OFXgZ7vzhtH5c6ENQW4343U/kt8x6A848fdgGMsmrblmY0Ntm4FzhGU/J8fbbVptdP tSOKe4BiWWjw0U5/qinTCNWrre99OxCN73kK5f9i/2YvOE9oLgOFQybqFrRozjIHB1Kb VyteABCkfIejKEaCtdswvqilniSwaSR4YEm5pwNCWP7lPV7cf7Blpgy3ZICzWZSP5WFc 5oVQ== 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 r25-v6si16151pff.24.2018.06.19.08.44.39; Tue, 19 Jun 2018 08:44:39 -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 S966720AbeFSPoh (ORCPT + 30 others); Tue, 19 Jun 2018 11:44:37 -0400 Received: from mout.kundenserver.de ([212.227.126.130]:53989 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964999AbeFSPof (ORCPT ); Tue, 19 Jun 2018 11:44:35 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0MSTdP-1fcDsf2nmN-00TRzx; Tue, 19 Jun 2018 17:44:26 +0200 From: Arnd Bergmann To: Al Viro , Andrew Morton Cc: y2038@lists.linaro.org, Jan Kara , Arnd Bergmann , Thomas Gleixner , reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] reiserfs: use monotonic time for j_trans_start_time Date: Tue, 19 Jun 2018 17:43:14 +0200 Message-Id: <20180619154343.3640484-2-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180619154343.3640484-1-arnd@arndb.de> References: <20180619154343.3640484-1-arnd@arndb.de> X-Provags-ID: V03:K1:+zzcWiLbZF4eRVpZBZyHbYgyWmydPM4yH5ASZxe+8CP6IHZpbT0 OjdSxSrB4TTRhLYDaq2SXdQkHWx7IqhumAjSQOE0Vzyo5rUGOP3DLb9AUsZvZergDkvhDZO Cpmsx1VOy/OE358bWnIf7YJgltKG9rghWPP7H6NVb5H7KN9tuqBw/oyQqa9+3H8vdAk7Gpp a1Bcw+FBkMeoPqkXiSKqQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:U4Oi6eDsVqo=:9zQ2lRqPxqCn5HGFdwK2Ms uy9ico2jkgsIAhubCyoRWufPcMNq8CzkZzMeUfFymaduLPNW6s304gQppdUywlpFsPVyQWFpd CoRYlSgbqzrYp0az4Kpw7957nFfKPRgmE8bdu3g3+BgwhG/eiTyC8Z/0rTtjR1svNx2yyiJsk raiIY0HI3nf5t5Nqf8UKf1Bae613WawL4/Xb9cNuRRtAnhwdD9on7EHadIAEuV1M4hx9/P+oB HkqCVQEsSdZ2HpBxTknt9FSx0QJoF19vL5NeuDhYqcrItX2eOiGDsK86Ji8kIgW3fKBVAxhyr ok4VXlJoR5Zfg/NOn+J9k+SzOaLoYikCilB5qcq22NHNkmPkeuDmDIfWerrTFWARWxFTUKGer NKrTnyS0PNJFNBPggbY6KYJHVDnPN7hubI3TfBoGhj/aXpXkf0lMYSyFZAH1Jh/hC3zIwgL5H RGnwKykrXAJ5UJ3LOdYKgt/vXRqSYCs3HQelrjzHjRWxR81KaQwFhK3LSkI+EarEAJqUXIJ2G XNZcP5+LabY3kUpl10sHI4VDCd3h2XS3GrP6vZsDrApyGLDo/W6u62jWlyUfaTKBYNVJdG8fK LD/kCqeRWkoSNyha1AjW4WZdM/S4T9snNPSVv6SzQO8nRMadoFlimX2kSDooHQfDPiMuBOq/y 3Bs+olLgJxwS7ivUqNvU5EdrK1gp5DqUaHzF1wTE2tlPKvQOrimYx/NsqfdX+oMDTiLM= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Using CLOCK_REALTIME time_t timestamps breaks on 32-bit systems in 2038, and gives surprising results with a concurrent settimeofday(). This changes the reiserfs journal timestamps to use ktime_get_seconds() instead, which makes it use a 64-bit CLOCK_MONOTONIC stamp. In the procfs output, the monotonic timestamp needs to be converted back to CLOCK_REALTIME to keep the existing ABI. Signed-off-by: Arnd Bergmann --- fs/reiserfs/journal.c | 22 +++++++++++----------- fs/reiserfs/procfs.c | 8 ++++++-- fs/reiserfs/reiserfs.h | 2 +- 3 files changed, 18 insertions(+), 14 deletions(-) -- 2.9.0 Reviewed-by: Jan Kara diff --git a/fs/reiserfs/journal.c b/fs/reiserfs/journal.c index 1e7f733b2a12..e809da912c00 100644 --- a/fs/reiserfs/journal.c +++ b/fs/reiserfs/journal.c @@ -2381,7 +2381,7 @@ static int journal_read(struct super_block *sb) struct reiserfs_journal_desc *desc; unsigned int oldest_trans_id = 0; unsigned int oldest_invalid_trans_id = 0; - time_t start; + time64_t start; unsigned long oldest_start = 0; unsigned long cur_dblock = 0; unsigned long newest_mount_id = 9; @@ -2395,7 +2395,7 @@ static int journal_read(struct super_block *sb) cur_dblock = SB_ONDISK_JOURNAL_1st_BLOCK(sb); reiserfs_info(sb, "checking transaction log (%pg)\n", journal->j_dev_bd); - start = get_seconds(); + start = ktime_get_seconds(); /* * step 1, read in the journal header block. Check the transaction @@ -2556,7 +2556,7 @@ static int journal_read(struct super_block *sb) if (replay_count > 0) { reiserfs_info(sb, "replayed %d transactions in %lu seconds\n", - replay_count, get_seconds() - start); + replay_count, ktime_get_seconds() - start); } /* needed to satisfy the locking in _update_journal_header_block */ reiserfs_write_lock(sb); @@ -2914,7 +2914,7 @@ int journal_transaction_should_end(struct reiserfs_transaction_handle *th, int new_alloc) { struct reiserfs_journal *journal = SB_JOURNAL(th->t_super); - time_t now = get_seconds(); + time64_t now = ktime_get_seconds(); /* cannot restart while nested */ BUG_ON(!th->t_trans_id); if (th->t_refcount > 1) @@ -3023,7 +3023,7 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th, struct super_block *sb, unsigned long nblocks, int join) { - time_t now = get_seconds(); + time64_t now = ktime_get_seconds(); unsigned int old_trans_id; struct reiserfs_journal *journal = SB_JOURNAL(sb); struct reiserfs_transaction_handle myth; @@ -3056,7 +3056,7 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th, PROC_INFO_INC(sb, journal.journal_relock_writers); goto relock; } - now = get_seconds(); + now = ktime_get_seconds(); /* * if there is no room in the journal OR @@ -3119,7 +3119,7 @@ static int do_journal_begin_r(struct reiserfs_transaction_handle *th, } /* we are the first writer, set trans_id */ if (journal->j_trans_start_time == 0) { - journal->j_trans_start_time = get_seconds(); + journal->j_trans_start_time = ktime_get_seconds(); } atomic_inc(&journal->j_wcount); journal->j_len_alloc += nblocks; @@ -3559,11 +3559,11 @@ static void flush_async_commits(struct work_struct *work) */ void reiserfs_flush_old_commits(struct super_block *sb) { - time_t now; + time64_t now; struct reiserfs_transaction_handle th; struct reiserfs_journal *journal = SB_JOURNAL(sb); - now = get_seconds(); + now = ktime_get_seconds(); /* * safety check so we don't flush while we are replaying the log during * mount @@ -3613,7 +3613,7 @@ void reiserfs_flush_old_commits(struct super_block *sb) static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) { - time_t now; + time64_t now; int flush = flags & FLUSH_ALL; int commit_now = flags & COMMIT_NOW; int wait_on_commit = flags & WAIT; @@ -3694,7 +3694,7 @@ static int check_journal_end(struct reiserfs_transaction_handle *th, int flags) } /* deal with old transactions where we are the last writers */ - now = get_seconds(); + now = ktime_get_seconds(); if ((now - journal->j_trans_start_time) > journal->j_max_trans_age) { commit_now = 1; journal->j_next_async_flush = 1; diff --git a/fs/reiserfs/procfs.c b/fs/reiserfs/procfs.c index e39b3910d24d..520f9003c13a 100644 --- a/fs/reiserfs/procfs.c +++ b/fs/reiserfs/procfs.c @@ -303,6 +303,10 @@ static int show_journal(struct seq_file *m, void *unused) struct reiserfs_sb_info *r = REISERFS_SB(sb); struct reiserfs_super_block *rs = r->s_rs; struct journal_params *jp = &rs->s_v1.s_journal; + ktime_t j_trans_start_ktime = ktime_set(JF(j_trans_start_time), 0); + + /* print as CLOCK_REALTIME */ + j_trans_start_ktime = ktime_mono_to_real(j_trans_start_ktime); seq_printf(m, /* on-disk fields */ "jp_journal_1st_block: \t%i\n" @@ -325,7 +329,7 @@ static int show_journal(struct seq_file *m, void *unused) "j_bcount: \t%lu\n" "j_first_unflushed_offset: \t%lu\n" "j_last_flush_trans_id: \t%u\n" - "j_trans_start_time: \t%li\n" + "j_trans_start_time: \t%lli\n" "j_list_bitmap_index: \t%i\n" "j_must_wait: \t%i\n" "j_next_full_flush: \t%i\n" @@ -366,7 +370,7 @@ static int show_journal(struct seq_file *m, void *unused) JF(j_bcount), JF(j_first_unflushed_offset), JF(j_last_flush_trans_id), - JF(j_trans_start_time), + ktime_divns(j_trans_start_ktime, NSEC_PER_SEC), JF(j_list_bitmap_index), JF(j_must_wait), JF(j_next_full_flush), diff --git a/fs/reiserfs/reiserfs.h b/fs/reiserfs/reiserfs.h index 1536ebbaf6ab..d0fc829bd760 100644 --- a/fs/reiserfs/reiserfs.h +++ b/fs/reiserfs/reiserfs.h @@ -330,7 +330,7 @@ struct reiserfs_journal { struct buffer_head *j_header_bh; - time_t j_trans_start_time; /* time this transaction started */ + time64_t j_trans_start_time; /* time this transaction started */ struct mutex j_mutex; struct mutex j_flush_mutex; From patchwork Tue Jun 19 15:43:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 139152 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp5365061lji; Tue, 19 Jun 2018 08:44:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJkNtV2SPN5A0fAbuFnzLaDCCDvBD6Fr530e+x3JV43hLSDkY0GJ/PEgBNjKzizXW/Itm5O X-Received: by 2002:a65:61c7:: with SMTP id j7-v6mr15756799pgv.358.1529423083381; Tue, 19 Jun 2018 08:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529423083; cv=none; d=google.com; s=arc-20160816; b=B/Llf/wcAPJLUZDd4JvBifQnyNlp0lh4kpDqWTdEZY6tB1DlTud6mmXmapJ5UR+SE0 n5xM/a/F9sct0NfWmMuvNPSC84igl6nRMnf441uNJiDMHIGBxML7EzZt3gRtnqXEKdQA taQ1Dz7Fxf0j55zhx1O5Iqs8hcjtt4jRpHoJkp8QABED5NQn3wYzFWVfuzJVz1F9kVWA AXgCbMRud/+Yt1tJ5h0PpjktzKWAEjzVPQiuBD/kmW91DoJQygTHZ/Zx6uIvzxhfzs4M XJh0AraHjzfaY1vLJzlV4/jGtcCKUN2ZLsNaCUhNbd3Ssy8SLOea8hwjjKEjegf+tbo1 baVQ== 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=2dlm9KFxfsPD5AJUfE5unjxiRMLRUOKbCcApln+xaK8=; b=owbNf4DwkodkDW5xqgoA+xcvlg2ELAgYZeCzzHxBO2rMttj0oRRoHHsk/3tjeY9Rg9 tF4mgTpKtRwrjgA22Iz02W7aqW1xkmgyx41trHoKFskEiGdkaQR2rJyQ2hw4+b8QB92v KG8oIcXKsPBC0jQb+15sKmw+f0ASEKavRFroKU9XrPBQNydooi+4dAwGigEvAQloR4Ci /0T7kWp1PTDhBS0ZHWRCl3JgjiFr219hb4JBJfwo732a11RETHr2LzsPD5N/t7wOx1Vr dUb+CX3AvBm080IPvlZSNxa+fwQOl95UWokPK89VEvgIYZMQzM+GzEUKtB2g37VkvEUt 8huQ== 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 n20-v6si2087plp.298.2018.06.19.08.44.43; Tue, 19 Jun 2018 08:44:43 -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 S966784AbeFSPok (ORCPT + 30 others); Tue, 19 Jun 2018 11:44:40 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:35599 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964999AbeFSPoi (ORCPT ); Tue, 19 Jun 2018 11:44:38 -0400 Received: from wuerfel.lan ([95.208.111.237]) by mrelayeu.kundenserver.de (mreue006 [212.227.15.129]) with ESMTPA (Nemesis) id 0LfcCc-1fya533Zww-00pMdY; Tue, 19 Jun 2018 17:44:36 +0200 From: Arnd Bergmann To: Al Viro , Andrew Morton Cc: y2038@lists.linaro.org, Jan Kara , Arnd Bergmann , reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] reiserfs: use 64-bit values in print_time Date: Tue, 19 Jun 2018 17:43:15 +0200 Message-Id: <20180619154343.3640484-3-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20180619154343.3640484-1-arnd@arndb.de> References: <20180619154343.3640484-1-arnd@arndb.de> X-Provags-ID: V03:K1:52k9zeNWrwsdYEhT04fve0Mkyatoe2paE7NXA9DXR/xTGb+bCSi 74f2ak6fl7sNyt2UYeSlbTtWDhq6IdxOunhsbQ7PUPkTaO4A8qIetj8W9Qq1C/t5v+1A9mW wfaQfH3RVZRLveDO/7B6E8HI16NPKh/tr35uw35pgomT19FancGashdlC7ljOvdeakojhsH 0ia9Ou6Sf1xJyMs2OyPTQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:Aacv8960YZY=:GvqKP78lPufsLVgzPi1PEt p35ys5uba0cpcKTZ6Lq/kgtpNrCWAJzxsalEbAF7b91ZklbOjaLnCz6kODU8/5f8tKoiiRINj sI82PNwsA65oBgBqrC5P2gfZslC1h/ZOBAhuqSa9jn95PhZq+fwqHfX0Kpn+48CHLbzaeE4u1 CBFj2/pdJfyqfAi3R/5pMRjs8aeaCxvhMSg1n31tk0hLV8yP3OSrHvX79QqLmsM83D2hgfNq+ Hg2T6uY8bmE3LgTLwNWcaIk2E+qwmHrDqlWGDbchSwOh14JxbODUUbG5FRYrmd9LvscIRdWfX T0+BvrcdC4sy1Kh3GQ3vZd92AOtraO5toYk63VGdUih9leeFSBMKRwOhH3wmGK4AfucTKfJ/m K7I1TsB2dLSJYqV4fTL+FEmPjoomKcEqDa73A79do82EJPmS4uQMp4QHj01OBQUGQxFEXC+Kg iPXYVsEJ2Bm1SkgFgcMBverftGIr3jR7aRB1vMhib0o/+CGpjGCSdCY4AU/av+hPUBfe6iPbx Niew5gZEyCt9Ldo5uzfwyrm3Jpv8p9m/oKPO2N7ajDysU27opmr2ygmSJWd6Dh1L/7WP+yS8i wUfe1Qb4Y0ZsNIZdUwT7I4UVZ7j+S4Ywa3RW1Cs/lYXAZBOmNnzZNmQtFfFeewIqAWi2FOGcL plbKs5Qh2TgGjzTF0MryIF2hrQ5ObJY52p1TbXFD0SZj3GTJ0vHcfVYXWYaG7ct5g4NA= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Inode timestamps are now 64-bit wide even on 32-bit machines, and reiserfs interprets the 32-bit on-disk timestamps as unsigned when returning them to user space with statx(), so for consistency we should print them the same way in the emergency console logs. Signed-off-by: Arnd Bergmann --- fs/reiserfs/item_ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.9.0 diff --git a/fs/reiserfs/item_ops.c b/fs/reiserfs/item_ops.c index e3c558d1b78c..d0ab3a763962 100644 --- a/fs/reiserfs/item_ops.c +++ b/fs/reiserfs/item_ops.c @@ -33,11 +33,11 @@ static int sd_is_left_mergeable(struct reiserfs_key *key, unsigned long bsize) return 0; } -static char *print_time(time_t t) +static char *print_time(time64_t t) { static char timebuf[256]; - sprintf(timebuf, "%ld", t); + sprintf(timebuf, "%lld", t); return timebuf; }