OSDN Git Service

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)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Nov 2021 14:33:24 +0000 (10:33 -0400)
commit39fec6889d15a658c3a3ebb06fd69d3584ddffd3
treec6b493f5ba395be77ad423f6fd850b9c6d089277
parent3eda41df05d6ad5c825cbc7fef03d563597b1afa
ext4: fix lazy initialization next schedule time computation in more granular unit

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>
fs/ext4/super.c