]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commit
afs: Copy local writes to the cache when writing to the server
authorDavid Howells <dhowells@redhat.com>
Thu, 6 Feb 2020 14:22:30 +0000 (14:22 +0000)
committerDavid Howells <dhowells@redhat.com>
Fri, 26 Nov 2021 21:23:49 +0000 (21:23 +0000)
commit2ec3854deecec405aed424d32999b40be7e8b69e
tree3adae2df8b5b83df5e8d0c10cad50cf99bc283ed
parent63084b363064c10ef39816517e88ebde5f7eff91
afs: Copy local writes to the cache when writing to the server

When writing to the server from afs_writepage() or afs_writepages(), copy
the data to the cache object too.

To make this possible, the cookie must have its active users count
incremented when the page is dirtied and kept incremented until we manage
to clean up all the pages.  This allows the writeback to take place after
the last file struct is released.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
cc: linux-cachefs@redhat.com
fs/afs/file.c
fs/afs/inode.c
fs/afs/internal.h
fs/afs/super.c
fs/afs/write.c