summaryrefslogtreecommitdiff
path: root/tools/lib/python
diff options
context:
space:
mode:
authorChristian Brauner <brauner@kernel.org>2026-09-25 16:14:34 +0200
committerChristian Brauner <brauner@kernel.org>2026-10-06 15:32:37 +0200
commit8097a263bd4cbe88b41b0626d8863e237bccaed6 (patch)
tree1a63029adb9e8c66d926ca1e1e9020baea1ab1e1 /tools/lib/python
parent117b8bbd2b80f0d11667ceae051c5175026378cc (diff)
parent25c034ac3d2e39655aa03b5fee375bf84108208c (diff)
downloadlinux-next-8097a263bd4cbe88b41b0626d8863e237bccaed6.tar.gz
linux-next-8097a263bd4cbe88b41b0626d8863e237bccaed6.zip
Merge patch series "netfs, cachefiles: Changes for next, primarily occupancy tracking-related"
David Howells <dhowells@redhat.com> says: Cachefiles is modified to better implement caching for the class of files that are opened new/truncated, written once sequentially with no seeking and then closed (ie. the most common class): (1) The object type in the cachefiles file xattr is now correctly set to CACHEFILES_CONTENT_{SINGLE,ALL,BACKFS_MAP} rather than just being 0, to indicate whether we have one of: a single monolithic blob, all the data up to cache i_size with no holes or a sparse file with the data mapped by the backing file system (as currently upstream). (2) For "ALL" type files, the cache's i_size is used to track how much data is saved in the cache and no longer bears any relation to the netfs i_size. The actual object size is stored in the xattr. (3) For most typical files which are contiguous and written progressively, the object type is now set to "ALL". For anything else, cachefiles uses SEEK_DATA/HOLE to find extent outlines at before (this is the current behaviour and needs to be fixed, but in a separate set of patches as it's not trivial). (4) Reads of "ALL" type files can then skip the SEEK_DATA/HOLE step to determine the occupancy; backing file i_size and the object size field stored in the state xattr suffice. Other changes are also made: (1) cachefile_do_prepare_read() is merged into cachefiles_prepare_read() now that the ondemand mode stuff got removed. (2) Some extra traces are added for write failure and insufficient space. (3) The state xattr on a cachefile is pre-set to try to avoid having to deal with ENOSPC from setxattr when committing the object. * patches from https://patch.msgid.link/20260910220242.2165023-1-dhowells@redhat.com: cachefiles: Preset the state xattr when creating a new file cachefiles: Don't rely on backing fs storage map for most use cases cachefiles: Add a tracepoint to log insufficient space errors netfs, cachefiles: Add a couple of traces for write failure cachefiles: Clean up cachefiles_do_prepare_read() Link: https://patch.msgid.link/20260910220242.2165023-1-dhowells@redhat.com Signed-off-by: Christian Brauner (Amutable) <brauner@kernel.org>
Diffstat (limited to 'tools/lib/python')
0 files changed, 0 insertions, 0 deletions