On Tue, 2022-03-08 at 21:52 +, David Howells wrote:
> A network filesystem may set coherency data on a volume cookie, and if
> given, cachefiles will store this in an xattr on the directory in the cache
> corresponding to the volume.
>
> The function that sets the xattr just stores the content
Make afs use netfslib's tracking for the server's idea of what the current
inode size is independently of inode->i_size. We really want to use this
value when calculating the new vnode size when initiating a StoreData RPC
op rather than the size stat() presents to the user (ie. inode->i_size) as
t
Provide a place in which to keep track of the actual remote file size in
the netfs context. This is needed because inode->i_size will be updated as
we buffer writes in the pagecache, but the server file size won't get
updated until we flush them back.
Signed-off-by: David Howells
cc: linux-cache
Split some core bits out into their own file. More bits will be added to
this file later.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164623006934.3564931.17932680017894039748.st...@warthog.procyon.org.uk/
# v1
---
fs/netfs/Makefile |1 +
Split fs/netfs/read_helper.c into two pieces, one to deal with buffered
writes and one to deal with the I/O mechanism.
Changes
===
ver #2)
- Add kdoc reference to new file.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164623005586.3564931.61495
Rename the read_helper.c file to io.c before splitting out the buffered
read functions and some other bits.
Changes
===
ver #2)
- Rename read_helper.c before splitting.
Signed-off-by: David Howells
---
Documentation/filesystems/netfs_library.rst |3
fs/netfs/Makefile
Rename netfs_rreq_unlock() to netfs_rreq_unlock_folios() to make it sound
less like it's dropping a lock on an netfs_io_request struct.
Remove the 'static' marker on netfs_rreq_unlock_folios() and declaring it
in internal.h preparatory to splitting the file.
Changes
===
ver #2)
- Slide this
Add a function to do the steps needed to begin a read request, allowing
this code to be removed from several other functions and consolidated.
Changes
===
ver #2)
- Move before the unstaticking patch so that some functions can be left
static.
- Set uninitialised return code in netfs_begin
Add a netfs_i_context struct that should be included in the network
filesystem's own inode struct wrapper, directly after the VFS's inode
struct, e.g.:
struct my_inode {
struct {
struct inodevfs_inode;
struct netfs
Change the request initialisation function to return an error code so that
the network filesystem can return a failure (ENOMEM, for example).
This will also allow ceph to abort a ->readahead() op if the server refuses
to give it a cap allowing local caching from within the netfslib framework
(erro
From: Jeff Layton
Pass start and len to the rreq allocator. This should ensure that the
fields are set so that ->init_request() can use them.
Also add a parameter to indicates the origin of the request. Ceph can use
this to tell whether to get caps.
Changes
===
ver #2)
- Show the request
Adjust the netfs_failure tracepoint to indicate a subrequest number of -1
when it's a full-request failure unrelated to any particular subrequest,
such as a failure to encrypt its data buffer.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164623001948
Add refcount tracing for the netfs_io_subrequest structure.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164622998584.3564931.5052255990645723639.st...@warthog.procyon.org.uk/
# v1
---
fs/netfs/internal.h |2 --
fs/netfs/objects.c
Add refcount tracing for the netfs_io_request structure.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164622997668.3564931.14456171619219324968.st...@warthog.procyon.org.uk/
# v1
---
fs/netfs/internal.h | 11 +--
fs/netfs/object
Adjust the netfs_rreq tracepoint to include the origin of the request and
to increase the size of the "what trace" output strings by a character so
that "ENCRYPT" and "DECRYPT" will fit without abbreviation.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org
Split netfs_io_* object handling out into a file that's going to contain
object allocation, get and put routines.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164622995118.3564931.6089530629052064470.st...@warthog.procyon.org.uk/
# v1
---
fs/netfs
Adjust helper function names and comments after mass rename of
struct netfs_read_*request to struct netfs_io_*request.
Changes
===
ver #2)
- Make the changes in the docs also.
Signed-off-by: David Howells
cc: linux-cachefs@redhat.com
Link:
https://lore.kernel.org/r/164622992433.3564931.66
Rename netfs_read_*request to netfs_io_*request so that the same structures
can be used for the write helpers too.
perl -p -i -e 's/netfs_read_(request|subrequest)/netfs_io_$1/g' \
`git grep -l 'netfs_read_\(sub\|\)request'`
perl -p -i -e 's/nr_rd_ops/nr_outstanding/g' \
`git grep -l nr_rd_o
netfs has a number of lists of symbols for use in tracing, listed in an
enum and then listed again in a symbol->string mapping for use with
__print_symbolic(). This is, however, redundant.
Instead, use the symbol->string mapping list to also generate the enum
where the enum is in the same file.
From: Jeffle Xu
Export fscache_end_operation() to avoid code duplication.
Besides, considering the paired fscache_begin_read_operation() is
already exported, it shall make sense to also export
fscache_end_operation().
Signed-off-by: Jeffle Xu
Signed-off-by: David Howells
cc: linux-cachefs@red
Having had a go at implementing write helpers and content encryption
support in netfslib, it seems that the netfs_read_{,sub}request structs and
the equivalent write request structs were almost the same and so should be
merged, thereby requiring only one set of alloc/get/put functions and a
commo
A network filesystem may set coherency data on a volume cookie, and if
given, cachefiles will store this in an xattr on the directory in the cache
corresponding to the volume.
The function that sets the xattr just stores the contents of the volume
coherency buffer directly into the xattr, with not
22 matches
Mail list logo