]> git.ipfire.org Git - thirdparty/linux.git/commit
cachefiles: introduce object ondemand state
authorJia Zhu <zhujia.zj@bytedance.com>
Mon, 20 Nov 2023 04:14:18 +0000 (12:14 +0800)
committerChristian Brauner <brauner@kernel.org>
Sat, 25 Nov 2023 15:03:54 +0000 (16:03 +0100)
commit357a18d033143617e9c7d420c8f0dd4cbab5f34d
tree0013755a96ae96c6ba4cfa4e67d962c96a8690c2
parentb85ea95d086471afb4ad062012a4d73cd328fa86
cachefiles: introduce object ondemand state

Previously, @ondemand_id field was used not only to identify ondemand
state of the object, but also to represent the index of the xarray.
This commit introduces @state field to decouple the role of @ondemand_id
and adds helpers to access it.

Signed-off-by: Jia Zhu <zhujia.zj@bytedance.com>
Link: https://lore.kernel.org/r/20231120041422.75170-2-zhujia.zj@bytedance.com
Reviewed-by: Jingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: David Howells <dhowells@redhat.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/cachefiles/internal.h
fs/cachefiles/ondemand.c