diff options
author | David Howells <dhowells@redhat.com> | 2021-11-10 13:25:03 +0000 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2022-01-11 22:13:01 +0000 |
commit | e0484344c0413e1fcd5642b77d49c7648fb194ec (patch) | |
tree | f3d7ed889f38860476ce5269d1f3db88d915930b /Documentation/filesystems/netfs_library.rst | |
parent | 1702e79734104d711a84ff55bd6a93c21947bc01 (diff) | |
download | linux-stable-e0484344c0413e1fcd5642b77d49c7648fb194ec.tar.gz linux-stable-e0484344c0413e1fcd5642b77d49c7648fb194ec.tar.bz2 linux-stable-e0484344c0413e1fcd5642b77d49c7648fb194ec.zip |
fscache: Rewrite documentation
Rewrite the fscache documentation.
Changes
=======
ver #3:
- The volume coherency data is now an arbitrarily-sized blob, not a u64.
ver #2:
- Put quoting around some bits of C being referred to in the docs[1].
- Stripped the markup off the ref to the netfs lib doc[2].
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/r/20211130175119.63d0e7aa@canb.auug.org.au/ [1]
Link: https://lore.kernel.org/r/20211130162311.105fcfa5@canb.auug.org.au/ [2]
Link: https://lore.kernel.org/r/163819672252.215744.15454333549935901588.stgit@warthog.procyon.org.uk/ # v1
Link: https://lore.kernel.org/r/163906986754.143852.17703291789683936950.stgit@warthog.procyon.org.uk/ # v2
Link: https://lore.kernel.org/r/163967193834.1823006.15991526817786159772.stgit@warthog.procyon.org.uk/ # v3
Link: https://lore.kernel.org/r/164021585970.640689.3162537597817521032.stgit@warthog.procyon.org.uk/ # v4
Diffstat (limited to 'Documentation/filesystems/netfs_library.rst')
-rw-r--r-- | Documentation/filesystems/netfs_library.rst | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Documentation/filesystems/netfs_library.rst b/Documentation/filesystems/netfs_library.rst index 375baca7edcd..136f8da3d0e2 100644 --- a/Documentation/filesystems/netfs_library.rst +++ b/Documentation/filesystems/netfs_library.rst @@ -454,7 +454,8 @@ operation table looks like the following:: void *term_func_priv); int (*prepare_write)(struct netfs_cache_resources *cres, - loff_t *_start, size_t *_len, loff_t i_size); + loff_t *_start, size_t *_len, loff_t i_size, + bool no_space_allocated_yet); int (*write)(struct netfs_cache_resources *cres, loff_t start_pos, @@ -515,11 +516,14 @@ The methods defined in the table are: * ``prepare_write()`` - [Required] Called to adjust a write to the cache and check that there is - sufficient space in the cache. The start and length values indicate the - size of the write that netfslib is proposing, and this can be adjusted by - the cache to respect DIO boundaries. The file size is passed for - information. + [Required] Called to prepare a write to the cache to take place. This + involves checking to see whether the cache has sufficient space to honour + the write. ``*_start`` and ``*_len`` indicate the region to be written; the + region can be shrunk or it can be expanded to a page boundary either way as + necessary to align for direct I/O. i_size holds the size of the object and + is provided for reference. no_space_allocated_yet is set to true if the + caller is certain that no data has been written to that region - for example + if it tried to do a read from there already. * ``write()`` |