* [PATCH v2] generic/622: increase sleep time for lazytime expiration
@ 2026-10-09 8:55 ` Jan Prusakowski via Linux-f2fs-devel
0 siblings, 0 replies; 6+ messages in thread
From: Jan Prusakowski @ 2026-10-09 8:55 UTC (permalink / raw)
To: Zorro Lang, Chao Yu, fstests; +Cc: jaegeuk, linux-f2fs-devel, Jan Prusakowski
In generic/622, expire_timestamps() tests whether lazytime timestamp
updates are persisted after dirtytime expiration. It configures
dirtytime_expire_seconds to 1 second and enables continuous writeback
of dirty inodes, followed by sleeping for 2 seconds to allow the
asynchronous VFS flusher thread to expire the I_DIRTY_TIME inode,
invoke the filesystem's write_inode callback, and flush the dirty
metadata before the test executes _scratch_shutdown -f.
However, on filesystems or configurations with higher writeback
overhead -- such as F2FS with transparent compression enabled, where
compressed files cannot use inline data and writes use out-of-place
updates (OPU) with higher latency in the compression and writeback
pipeline -- the 2-second sleep window can occasionally be insufficient.
Because the inode is only eligible for expiration after 1 second, only
about 1 second remains in the 2-second sleep window for the flusher
thread to schedule, expire the inode, and mark the inode page dirty
before restore_expiration_settings resets dirtytime_expire_seconds to
24 hours and shutdown occurs. If the flusher thread is delayed, the
subsequent shutdown checkpoint ignores the unexpired I_DIRTY_TIME inode,
causing the test to intermittently fail with:
FAIL: lazytime mtime wasn't persisted by expiration
ondisk_time (...) != expected_time (...)
Increase the sleep duration in expire_timestamps() from 2 to 4 seconds
to give sufficient margin for the flusher thread to reliably expire the
lazytime inode and dirty the inode page before shutdown.
Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
---
Changes in v2:
- Increase sleep time to 4 seconds unconditionally with an explanatory
comment instead of using an F2FS-specific conditional.
- Remove the non-standard Change-Id trailer.
tests/generic/622 | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/generic/622 b/tests/generic/622
index cb0f5828..16088199 100755
--- a/tests/generic/622
+++ b/tests/generic/622
@@ -60,8 +60,12 @@ expire_timestamps()
__expire_inodes
# Userspace doesn't have direct visibility into when inodes are dirty,
- # so the best we can do is sleep for a couple seconds.
- sleep 2
+ # so the best we can do is sleep for a few seconds. Because
+ # dirtytime_expire_seconds is 1 second, sleeping for 4 seconds leaves
+ # enough margin after expiration for background writeback to finish even
+ # on filesystems with higher writeback overhead (e.g. F2FS with file
+ # compression).
+ sleep 4
restore_expiration_settings
}
--
2.56.0.360.g66cac248cb-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [f2fs-dev] [PATCH v2] generic/622: increase sleep time for lazytime expiration
@ 2026-10-09 8:55 ` Jan Prusakowski via Linux-f2fs-devel
0 siblings, 0 replies; 6+ messages in thread
From: Jan Prusakowski via Linux-f2fs-devel @ 2026-10-09 8:55 UTC (permalink / raw)
To: Zorro Lang, Chao Yu, fstests; +Cc: jaegeuk, linux-f2fs-devel
In generic/622, expire_timestamps() tests whether lazytime timestamp
updates are persisted after dirtytime expiration. It configures
dirtytime_expire_seconds to 1 second and enables continuous writeback
of dirty inodes, followed by sleeping for 2 seconds to allow the
asynchronous VFS flusher thread to expire the I_DIRTY_TIME inode,
invoke the filesystem's write_inode callback, and flush the dirty
metadata before the test executes _scratch_shutdown -f.
However, on filesystems or configurations with higher writeback
overhead -- such as F2FS with transparent compression enabled, where
compressed files cannot use inline data and writes use out-of-place
updates (OPU) with higher latency in the compression and writeback
pipeline -- the 2-second sleep window can occasionally be insufficient.
Because the inode is only eligible for expiration after 1 second, only
about 1 second remains in the 2-second sleep window for the flusher
thread to schedule, expire the inode, and mark the inode page dirty
before restore_expiration_settings resets dirtytime_expire_seconds to
24 hours and shutdown occurs. If the flusher thread is delayed, the
subsequent shutdown checkpoint ignores the unexpired I_DIRTY_TIME inode,
causing the test to intermittently fail with:
FAIL: lazytime mtime wasn't persisted by expiration
ondisk_time (...) != expected_time (...)
Increase the sleep duration in expire_timestamps() from 2 to 4 seconds
to give sufficient margin for the flusher thread to reliably expire the
lazytime inode and dirty the inode page before shutdown.
Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
---
Changes in v2:
- Increase sleep time to 4 seconds unconditionally with an explanatory
comment instead of using an F2FS-specific conditional.
- Remove the non-standard Change-Id trailer.
tests/generic/622 | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/generic/622 b/tests/generic/622
index cb0f5828..16088199 100755
--- a/tests/generic/622
+++ b/tests/generic/622
@@ -60,8 +60,12 @@ expire_timestamps()
__expire_inodes
# Userspace doesn't have direct visibility into when inodes are dirty,
- # so the best we can do is sleep for a couple seconds.
- sleep 2
+ # so the best we can do is sleep for a few seconds. Because
+ # dirtytime_expire_seconds is 1 second, sleeping for 4 seconds leaves
+ # enough margin after expiration for background writeback to finish even
+ # on filesystems with higher writeback overhead (e.g. F2FS with file
+ # compression).
+ sleep 4
restore_expiration_settings
}
--
2.56.0.360.g66cac248cb-goog
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] generic/622: increase sleep time for lazytime expiration
2026-10-09 8:55 ` [f2fs-dev] " Jan Prusakowski via Linux-f2fs-devel
@ 2026-10-12 12:33 ` Christoph Hellwig
-1 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2026-10-12 12:33 UTC (permalink / raw)
To: Jan Prusakowski; +Cc: Zorro Lang, Chao Yu, fstests, jaegeuk, linux-f2fs-devel
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v2] generic/622: increase sleep time for lazytime expiration
@ 2026-10-12 12:33 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2026-10-12 12:33 UTC (permalink / raw)
To: Jan Prusakowski; +Cc: jaegeuk, Zorro Lang, fstests, linux-f2fs-devel
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2] generic/622: increase sleep time for lazytime expiration
2026-10-09 8:55 ` [f2fs-dev] " Jan Prusakowski via Linux-f2fs-devel
@ 2026-10-14 10:52 ` Chao Yu via Linux-f2fs-devel
-1 siblings, 0 replies; 6+ messages in thread
From: Chao Yu @ 2026-10-14 10:52 UTC (permalink / raw)
To: Jan Prusakowski, Zorro Lang, fstests; +Cc: chao, jaegeuk, linux-f2fs-devel
On 10/9/26 16:55, Jan Prusakowski wrote:
> In generic/622, expire_timestamps() tests whether lazytime timestamp
> updates are persisted after dirtytime expiration. It configures
> dirtytime_expire_seconds to 1 second and enables continuous writeback
> of dirty inodes, followed by sleeping for 2 seconds to allow the
> asynchronous VFS flusher thread to expire the I_DIRTY_TIME inode,
> invoke the filesystem's write_inode callback, and flush the dirty
> metadata before the test executes _scratch_shutdown -f.
>
> However, on filesystems or configurations with higher writeback
> overhead -- such as F2FS with transparent compression enabled, where
> compressed files cannot use inline data and writes use out-of-place
> updates (OPU) with higher latency in the compression and writeback
FYI, I encounter similar issue on non-compressed inode, so v2 w/o checking
compression makes sense to me.
> pipeline -- the 2-second sleep window can occasionally be insufficient.
> Because the inode is only eligible for expiration after 1 second, only
> about 1 second remains in the 2-second sleep window for the flusher
> thread to schedule, expire the inode, and mark the inode page dirty
> before restore_expiration_settings resets dirtytime_expire_seconds to
> 24 hours and shutdown occurs. If the flusher thread is delayed, the
> subsequent shutdown checkpoint ignores the unexpired I_DIRTY_TIME inode,
> causing the test to intermittently fail with:
>
> FAIL: lazytime mtime wasn't persisted by expiration
> ondisk_time (...) != expected_time (...)
>
> Increase the sleep duration in expire_timestamps() from 2 to 4 seconds
> to give sufficient margin for the flusher thread to reliably expire the
> lazytime inode and dirty the inode page before shutdown.
>
> Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [f2fs-dev] [PATCH v2] generic/622: increase sleep time for lazytime expiration
@ 2026-10-14 10:52 ` Chao Yu via Linux-f2fs-devel
0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-10-14 10:52 UTC (permalink / raw)
To: Jan Prusakowski, Zorro Lang, fstests; +Cc: jaegeuk, linux-f2fs-devel
On 10/9/26 16:55, Jan Prusakowski wrote:
> In generic/622, expire_timestamps() tests whether lazytime timestamp
> updates are persisted after dirtytime expiration. It configures
> dirtytime_expire_seconds to 1 second and enables continuous writeback
> of dirty inodes, followed by sleeping for 2 seconds to allow the
> asynchronous VFS flusher thread to expire the I_DIRTY_TIME inode,
> invoke the filesystem's write_inode callback, and flush the dirty
> metadata before the test executes _scratch_shutdown -f.
>
> However, on filesystems or configurations with higher writeback
> overhead -- such as F2FS with transparent compression enabled, where
> compressed files cannot use inline data and writes use out-of-place
> updates (OPU) with higher latency in the compression and writeback
FYI, I encounter similar issue on non-compressed inode, so v2 w/o checking
compression makes sense to me.
> pipeline -- the 2-second sleep window can occasionally be insufficient.
> Because the inode is only eligible for expiration after 1 second, only
> about 1 second remains in the 2-second sleep window for the flusher
> thread to schedule, expire the inode, and mark the inode page dirty
> before restore_expiration_settings resets dirtytime_expire_seconds to
> 24 hours and shutdown occurs. If the flusher thread is delayed, the
> subsequent shutdown checkpoint ignores the unexpired I_DIRTY_TIME inode,
> causing the test to intermittently fail with:
>
> FAIL: lazytime mtime wasn't persisted by expiration
> ondisk_time (...) != expected_time (...)
>
> Increase the sleep duration in expire_timestamps() from 2 to 4 seconds
> to give sufficient margin for the flusher thread to reliably expire the
> lazytime inode and dirty the inode page before shutdown.
>
> Signed-off-by: Jan Prusakowski <jprusakowski@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-14 10:52 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-09 8:55 [PATCH v2] generic/622: increase sleep time for lazytime expiration Jan Prusakowski
2026-10-09 8:55 ` [f2fs-dev] " Jan Prusakowski via Linux-f2fs-devel
2026-10-12 12:33 ` Christoph Hellwig
2026-10-12 12:33 ` [f2fs-dev] " Christoph Hellwig
2026-10-14 10:52 ` Chao Yu
2026-10-14 10:52 ` [f2fs-dev] " Chao Yu via Linux-f2fs-devel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.