From: Jan Kara <jack@suse.cz>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Al Viro <viro@zeniv.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
y2038@lists.linaro.org, Jan Kara <jack@suse.cz>,
reiserfs-devel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] reiserfs: use 64-bit values in print_time
Date: Wed, 20 Jun 2018 10:28:30 +0200 [thread overview]
Message-ID: <20180620082830.vwpcikmpnjluqud4@quack2.suse.cz> (raw)
In-Reply-To: <20180619154343.3640484-3-arnd@arndb.de>
On Tue 19-06-18 17:43:15, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
...
> 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;
> }
Well, seeing how print_time() is used, more appropriate prototype would be:
static char *print_time(u32 t)
and then print it as %u.
Honza
--
Jan Kara <jack@suse.com>
SUSE Labs, CR
next prev parent reply other threads:[~2018-06-20 8:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-19 15:43 [PATCH 1/3] reiserfs: remove unused j_timestamp Arnd Bergmann
2018-06-19 15:43 ` [PATCH 2/3] reiserfs: use monotonic time for j_trans_start_time Arnd Bergmann
2018-06-20 8:25 ` Jan Kara
2018-06-19 15:43 ` [PATCH 3/3] reiserfs: use 64-bit values in print_time Arnd Bergmann
2018-06-20 8:28 ` Jan Kara [this message]
2018-06-20 8:21 ` [PATCH 1/3] reiserfs: remove unused j_timestamp Jan Kara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180620082830.vwpcikmpnjluqud4@quack2.suse.cz \
--to=jack@suse.cz \
--cc=akpm@linux-foundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=reiserfs-devel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=y2038@lists.linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®