ext4: add a new helper to check if es must be kept
authorBaokun Li <libaokun1@huawei.com>
Mon, 24 Apr 2023 03:38:36 +0000 (11:38 +0800)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 26 Jun 2023 23:35:12 +0000 (19:35 -0400)
commit9649eb18c6288f514cacffdd699d5cd999c2f8f6
tree83f8c9d86f881679089b8993aa597f40217ca80a
parentde25d6e9610a8b30cce9bbb19b50615d02ebca02
ext4: add a new helper to check if es must be kept

In the extent status tree, we have extents which we can just drop without
issues and extents we must not drop - this depends on the extent's status
- currently ext4_es_is_delayed() extents must stay, others may be dropped.

A helper function is added to help determine if the current extent can
be dropped, although only ext4_es_is_delayed() extents cannot be dropped
currently.

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20230424033846.4732-3-libaokun1@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/extents_status.c