* cachefiles: cache objects get created on a frozen cache filesystem
@ 2026-11-14 9:42 Christian Brauner
2026-11-28 18:48 ` Drif Abdelmalek Mohamed Said
0 siblings, 1 reply; 2+ messages in thread
From: Christian Brauner @ 2026-11-14 9:42 UTC (permalink / raw)
To: David Howells; +Cc: Jan Kara, netfs, linux-fsdevel, linux-kernel
Hey,
I'm working on freeze protection fixes across the tree and this one I
just can't fix myself.
cachefiles only takes freeze protection around its xattr updates since
80887f316729 ("cachefiles: Fix non-taking of sb_writers around
set/removexattr"). The namespace operations on the cache filesystem
still don't have it. So cachefiles modifies a frozen cache filesystem.
On ext4 that trips the WARN_ON() in ext4_journal_check_start().
Reproduced on v7.4-rc1 with the cache on ext4, bound through
/dev/cachefiles, and an NFS mount with -o fsc. Freeze the cache
filesystem and read files through NFS that aren't cached yet:
WARNING: fs/ext4/ext4_jbd2.c:90 at ext4_journal_check_start+0x1f6/0x2d0, CPU#2: kworker/u16:1/43
Workqueue: fscache fscache_cookie_worker
Call Trace:
__ext4_journal_start_sb+0x7a/0x470
__ext4_new_inode+0x23da/0x45d0
ext4_tmpfile+0x1b9/0x490
vfs_tmpfile+0x414/0xa90
kernel_tmpfile_open+0x3d/0x70
cachefiles_create_tmpfile+0x1c7/0x800
cachefiles_create_file+0x6f/0x2f0
cachefiles_look_up_object+0x71a/0x8a0
cachefiles_lookup_cookie+0x3b8/0x8f0
fscache_cookie_worker+0xa23/0x19a0
process_one_work+0x946/0x1820
worker_thread+0x4f1/0xd60
kthread+0x364/0x460
That's one per file read.
From reading the code the other namespace operations have the same
problem but I've only triggered the tmpfile creation:
- vfs_mkdir() in cachefiles_get_directory()
- vfs_rename() in cachefiles_bury_object()
- vfs_unlink() in cachefiles_unlink()
- vfs_link() in cachefiles_commit_tmpfile()
They need mnt_want_write(cache->mnt) taken before the parent's inode
lock, like the xattr helpers do it.
The tmpfile creation goes back to 1f08c925e7a3 ("cachefiles: Implement
backing file wrangling").
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: cachefiles: cache objects get created on a frozen cache filesystem
2026-11-14 9:42 cachefiles: cache objects get created on a frozen cache filesystem Christian Brauner
@ 2026-11-28 18:48 ` Drif Abdelmalek Mohamed Said
0 siblings, 0 replies; 2+ messages in thread
From: Drif Abdelmalek Mohamed Said @ 2026-11-28 18:48 UTC (permalink / raw)
To: brauner; +Cc: dhowells, jack, linux-fsdevel, linux-kernel, netfs
Hello everyone, I’d like to take this one unless one of you is already working
on it.
Cordially,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-28 18:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-14 9:42 cachefiles: cache objects get created on a frozen cache filesystem Christian Brauner
2026-11-28 18:48 ` Drif Abdelmalek Mohamed Said
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®