]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit - fs/fs-writeback.c
netfs: Move pinning-for-writeback from fscache to netfs
authorDavid Howells <dhowells@redhat.com>
Mon, 27 Nov 2023 13:58:07 +0000 (13:58 +0000)
committerDavid Howells <dhowells@redhat.com>
Sun, 24 Dec 2023 15:08:49 +0000 (15:08 +0000)
commitc9c4ff12df110feb1b91951010f673f4b16e49e8
tree0145b64f713dc12b3bd82b5032d92f9a28624f3a
parent7eb5b3e3a0a55f2d166ca949ef47ca6e0c704aab
netfs: Move pinning-for-writeback from fscache to netfs

Move the resource pinning-for-writeback from fscache code to netfslib code.
This is used to keep a cache backing object pinned whilst we have dirty
pages on the netfs inode in the pagecache such that VM writeback will be
able to reach it.

Whilst we're at it, switch the parameters of netfs_unpin_writeback() to
match ->write_inode() so that it can be used for that directly.

Note that this mechanism could be more generically useful than that for
network filesystems.  Quite often they have to keep around other resources
(e.g. authentication tokens or network connections) until the writeback is
complete.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
cc: linux-fsdevel@vger.kernel.org
cc: linux-mm@kvack.org
20 files changed:
fs/9p/vfs_addr.c
fs/9p/vfs_inode.c
fs/9p/vfs_super.c
fs/afs/file.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/super.c
fs/afs/write.c
fs/ceph/cache.h
fs/ceph/inode.c
fs/fs-writeback.c
fs/netfs/Makefile
fs/netfs/fscache_io.c
fs/netfs/misc.c [new file with mode: 0644]
fs/smb/client/cifsfs.c
fs/smb/client/file.c
include/linux/fs.h
include/linux/fscache.h
include/linux/netfs.h
include/linux/writeback.h