Commit 923d3996 authored by Shaoying Xu's avatar Shaoying Xu Committed by Yang Yingliang
Browse files

ext4: fix lazy initialization next schedule time computation in more granular unit



stable inclusion
from linux-4.19.218
commit 0898c7a70aae87eeec6b00f03e0bb592fefd295f

--------------------------------

commit 39fec688 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: bfff6873 ("ext4: add support for lazy inode table initialization")
Signed-off-by: default avatarShaoying Xu <shaoyi@amazon.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Link: https://lore.kernel.org/r/20210902164412.9994-2-shaoyi@amazon.com


Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
parent 04bc8501
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment