linux-stable/fs/afs
David Howells a9eb558a5b afs: Stop implementing ->writepage()
We're trying to get rid of the ->writepage() hook[1].  Stop afs from using
it by unlocking the page and calling afs_writepages_region() rather than
folio_write_one().

A flag is passed to afs_writepages_region() to indicate that it should only
write a single region so that we don't flush the entire file in
->write_begin(), but do add other dirty data to the region being written to
try and reduce the number of RPC ops.

This requires ->migrate_folio() to be implemented, so point that at
filemap_migrate_folio() for files and also for symlinks and directories.

This can be tested by turning on the afs_folio_dirty tracepoint and then
doing something like:

   xfs_io -c "w 2223 7000" -c "w 15000 22222" -c "w 23 7" /afs/my/test/foo

and then looking in the trace to see if the write at position 15000 gets
stored before page 0 gets dirtied for the write at position 23.

Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Christoph Hellwig <hch@lst.de>
cc: Matthew Wilcox <willy@infradead.org>
cc: linux-afs@lists.infradead.org
Link: https://lore.kernel.org/r/20221113162902.883850-1-hch@lst.de/ [1]
Link: https://lore.kernel.org/r/166876785552.222254.4403222906022558715.stgit@warthog.procyon.org.uk/ # v1
2022-12-22 11:40:35 +00:00
..
addr_list.c
afs.h
afs_cm.h
afs_fs.h
afs_vl.h
callback.c
cell.c
cmservice.c
dir.c afs: Stop implementing ->writepage() 2022-12-22 11:40:35 +00:00
dir_edit.c
dir_silly.c
dynroot.c
file.c afs: Stop implementing ->writepage() 2022-12-22 11:40:35 +00:00
flock.c
fs_operation.c
fs_probe.c afs: Fix lost servers_outstanding count 2022-12-22 11:40:35 +00:00
fsclient.c
inode.c
internal.h afs: remove afs_cache_netfs and afs_zap_permits() declarations 2022-12-22 11:40:35 +00:00
Kconfig
main.c
Makefile
misc.c
mntpt.c
proc.c
protocol_afs.h
protocol_uae.h
protocol_yfs.h
rotate.c
rxrpc.c
security.c
server.c
server_list.c
super.c
vl_alias.c
vl_list.c
vl_probe.c
vl_rotate.c
vlclient.c
volume.c afs: remove variable nr_servers 2022-12-22 11:40:35 +00:00
write.c afs: Stop implementing ->writepage() 2022-12-22 11:40:35 +00:00
xattr.c
xdr_fs.h
yfsclient.c