OSDN Git Service

ext4: add new helper interface ext4_try_to_trim_range()
authorWang Jianchao <wangjianchao@kuaishou.com>
Sat, 24 Jul 2021 07:41:21 +0000 (15:41 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 12 Aug 2021 17:11:25 +0000 (13:11 -0400)
commit6920b3913235f517728bb69abe9b39047a987113
treece9c447d7ccf1a72e6bde1fb281448bdd8f7424a
parentbd2eea8d0a6b6a9aca22f20bf74f73b71d8808af
ext4: add new helper interface ext4_try_to_trim_range()

There is no functional change in this patch but just split the
codes, which serachs free block and does trim, into a new function
ext4_try_to_trim_range. This is preparing for the following async
backgroup discard.

Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Wang Jianchao <wangjianchao@kuaishou.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20210724074124.25731-3-jianchao.wan9@gmail.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/mballoc.c