]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
ext4: fix lazy initialization next schedule time computation in more granular unit
authorShaoying Xu <shaoyi@amazon.com>
Thu, 2 Sep 2021 16:44:12 +0000 (16:44 +0000)
committerAndrea Righi <andrea.righi@canonical.com>
Tue, 4 Jan 2022 08:48:08 +0000 (09:48 +0100)
commit49c38fefb8c61746b8cf1c8145f9d2cd7c43de8a
tree1cc78737f305a7de419d06aa14f09e35a0f8a6f8
parent713f1d3b59f0d33a379a855c1faa201339191637
ext4: fix lazy initialization next schedule time computation in more granular unit

BugLink: https://bugs.launchpad.net/bugs/1951822
commit 39fec6889d15a658c3a3ebb06fd69d3584ddffd3 upstream.

Ext4 file system has default lazy inode table initialization setup once
it is mounted. However, it has issue on computing the next schedule time
that makes the timeout same amount in jiffies but different real time in
secs if with various HZ values. Therefore, fix by measuring the current
time in a more granular unit nanoseconds and make the next schedule time
independent of the HZ value.

Fixes: bfff68738f1c ("ext4: add support for lazy inode table initialization")
Signed-off-by: Shaoying Xu <shaoyi@amazon.com>
Cc: stable@vger.kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20210902164412.9994-2-shaoyi@amazon.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/ext4/super.c