* [PATCH 2/2] zram: fixup read_block_state()
[not found] <20251216022727.578BFC4CEF5@smtp.kernel.org>
@ 2026-01-15 3:30 ` Sergey Senozhatsky
2026-01-15 22:07 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Sergey Senozhatsky @ 2026-01-15 3:30 UTC (permalink / raw)
To: Andrew Morton; +Cc: linux-kernel, linux-mm, Sergey Senozhatsky, Chris Mason
ac_time is now in seconds, do not use ktime_to_timespec64()
Reported-by: Chris Mason <clm@meta.com>
Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
---
drivers/block/zram/zram_drv.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
index cc51aa8b6181..912711faa4e4 100644
--- a/drivers/block/zram/zram_drv.c
+++ b/drivers/block/zram/zram_drv.c
@@ -1579,11 +1579,9 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
if (!slot_allocated(zram, index))
goto next;
- ts = ktime_to_timespec64(zram->table[index].attr.ac_time);
copied = snprintf(kbuf + written, count,
- "%12zd %12lld.%06lu %c%c%c%c%c%c\n",
- index, (s64)ts.tv_sec,
- ts.tv_nsec / NSEC_PER_USEC,
+ "%12zd %12u.%06lu %c%c%c%c%c%c\n",
+ index, zram->table[index].attr.ac_time, 0,
test_slot_flag(zram, index, ZRAM_SAME) ? 's' : '.',
test_slot_flag(zram, index, ZRAM_WB) ? 'w' : '.',
test_slot_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',
--
2.52.0.457.g6b5491de43-goog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] zram: fixup read_block_state()
2026-01-15 3:30 ` [PATCH 2/2] zram: fixup read_block_state() Sergey Senozhatsky
@ 2026-01-15 22:07 ` Andrew Morton
2026-01-15 22:54 ` Sergey Senozhatsky
0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2026-01-15 22:07 UTC (permalink / raw)
To: Sergey Senozhatsky; +Cc: linux-kernel, linux-mm, Chris Mason
On Thu, 15 Jan 2026 12:30:06 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
> ac_time is now in seconds, do not use ktime_to_timespec64()
Please help me out here - which patch introduced the issue which Chris
found?
> Reported-by: Chris Mason <clm@meta.com>
The Closes: link would be helpful.
> Signed-off-by: Sergey Senozhatsky <senozhatsky@chromium.org>
> ---
> drivers/block/zram/zram_drv.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c
> index cc51aa8b6181..912711faa4e4 100644
> --- a/drivers/block/zram/zram_drv.c
> +++ b/drivers/block/zram/zram_drv.c
> @@ -1579,11 +1579,9 @@ static ssize_t read_block_state(struct file *file, char __user *buf,
> if (!slot_allocated(zram, index))
> goto next;
>
> - ts = ktime_to_timespec64(zram->table[index].attr.ac_time);
> copied = snprintf(kbuf + written, count,
> - "%12zd %12lld.%06lu %c%c%c%c%c%c\n",
> - index, (s64)ts.tv_sec,
> - ts.tv_nsec / NSEC_PER_USEC,
> + "%12zd %12u.%06lu %c%c%c%c%c%c\n",
> + index, zram->table[index].attr.ac_time, 0,
local `ts' is now unused?
> test_slot_flag(zram, index, ZRAM_SAME) ? 's' : '.',
> test_slot_flag(zram, index, ZRAM_WB) ? 'w' : '.',
> test_slot_flag(zram, index, ZRAM_HUGE) ? 'h' : '.',
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] zram: fixup read_block_state()
2026-01-15 22:07 ` Andrew Morton
@ 2026-01-15 22:54 ` Sergey Senozhatsky
2026-01-15 23:25 ` Andrew Morton
0 siblings, 1 reply; 4+ messages in thread
From: Sergey Senozhatsky @ 2026-01-15 22:54 UTC (permalink / raw)
To: Andrew Morton; +Cc: Sergey Senozhatsky, linux-kernel, linux-mm, Chris Mason
On (26/01/15 14:07), Andrew Morton wrote:
> On Thu, 15 Jan 2026 12:30:06 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
>
> > ac_time is now in seconds, do not use ktime_to_timespec64()
>
> Please help me out here - which patch introduced the issue which Chris
> found?
This one:
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-use-u32-for-entry-ac_time-tracking.patch
> > Reported-by: Chris Mason <clm@meta.com>
>
> The Closes: link would be helpful.
I thought that for fixup patches that are still in your tree we
don't need Closes: tags. If you prefer to have them, it should
be this email:
http://lore.kernel.org/linux-kernel/20260114124522.1326519-1-clm@meta.com
[..]
> > - ts = ktime_to_timespec64(zram->table[index].attr.ac_time);
> > copied = snprintf(kbuf + written, count,
> > - "%12zd %12lld.%06lu %c%c%c%c%c%c\n",
> > - index, (s64)ts.tv_sec,
> > - ts.tv_nsec / NSEC_PER_USEC,
> > + "%12zd %12u.%06lu %c%c%c%c%c%c\n",
> > + index, zram->table[index].attr.ac_time, 0,
>
> local `ts' is now unused?
Oh, yes. Somehow my compiler didn't notice that.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] zram: fixup read_block_state()
2026-01-15 22:54 ` Sergey Senozhatsky
@ 2026-01-15 23:25 ` Andrew Morton
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Morton @ 2026-01-15 23:25 UTC (permalink / raw)
To: Sergey Senozhatsky; +Cc: linux-kernel, linux-mm, Chris Mason
On Fri, 16 Jan 2026 07:54:25 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
> On (26/01/15 14:07), Andrew Morton wrote:
> > On Thu, 15 Jan 2026 12:30:06 +0900 Sergey Senozhatsky <senozhatsky@chromium.org> wrote:
> >
> > > ac_time is now in seconds, do not use ktime_to_timespec64()
> >
> > Please help me out here - which patch introduced the issue which Chris
> > found?
>
> This one:
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/zram-use-u32-for-entry-ac_time-tracking.patch
I figured that out when I fouf Chris's email ;)
> > > Reported-by: Chris Mason <clm@meta.com>
> >
> > The Closes: link would be helpful.
>
> I thought that for fixup patches that are still in your tree we
> don't need Closes: tags. If you prefer to have them, it should
> be this email:
> http://lore.kernel.org/linux-kernel/20260114124522.1326519-1-clm@meta.com
Yep, got it thanks.
Closes: tags are helpful when reviewing, to see all the info. Fixes:
tags aren't useful because the hashes are unstable and because the fix
is destined to become part of the thing which it fixes anyway.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-01-15 23:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20251216022727.578BFC4CEF5@smtp.kernel.org>
2026-01-15 3:30 ` [PATCH 2/2] zram: fixup read_block_state() Sergey Senozhatsky
2026-01-15 22:07 ` Andrew Morton
2026-01-15 22:54 ` Sergey Senozhatsky
2026-01-15 23:25 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox