Jeff Layton wrote:
> > (7) If stored data is culled from the local cache, we must set zero_point
> > above that if the data also got written to the server.
>
> When you say culled here, it sounds like you're just throwing out the
> dirty cache without writing the data back. That shouldn't
Jeff Layton wrote:
> > + rreq->rsize = 4 * 1024 * 1024;
> > return 0;
> ...
> > + rreq->rsize = 1024 * 1024;
> > +
>
> Holy magic numbers, batman! I think this deserves a comment that
> explains how you came up with these values.
Actually, that should be set to something like the object
Jeff Layton wrote:
> It's nice to see this go into common code, but why not go ahead and
> convert ceph (and possibly NFS) to use this? Is there any reason not to?
I'm converting ceph on a follow-on branch and for ceph this will be dealt with
there.
I could do NFS round about here, I suppose.
Rearrange the netfs_io_subrequest struct to put the netfs_io_request
pointer (rreq) first. This then allows netfs_io_subrequest to be put in a
union with a pointer to a wrapper around netfs_io_request for cifs.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith
Remove some code that was #if'd out with the netfslib conversion. This is
split into parts for file.c as the diff generator otherwise produces a hard
to read diff for part of it where a big chunk is cut out.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: R
Remove some code that was #if'd out with the netfslib conversion. This is
split into parts for file.c as the diff generator otherwise produces a hard
to read diff for part of it where a big chunk is cut out.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: R
appen automatically? Does netfs need to do that?
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs
Remove some code that was #if'd out with the netfslib conversion. This is
split into parts for file.c as the diff generator otherwise produces a hard
to read diff for part of it where a big chunk is cut out.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: R
Move cifs_loose_read_iter() and cifs_file_write_iter() to file.c so that
they are colocated with similar functions rather than being split with
cifsfs.c.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc
Replace the cifs_writedata struct with the same wrapper around
netfs_io_subrequest that was used to replace cifs_readdata.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc: linux-cachefs@redhat.com
cc
cifs's wsize and
available credits. As each subop is created, it can be dispatched or
queued for dispatch.
At this point, cifs is not wired up to actually *use* netfslib; that will
be done in a subsequent patch.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: R
Make the wait_mtu_credits functions use size_t for the size and num
arguments rather than unsigned int as netfslib uses size_t/ssize_t for
arguments and return values to allow for extra capacity.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff
Use cifsi->netfs_ctx.remote_i_size instead of cifsi->server_eof so that
netfslib can refer to it to.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc: linux-cachefs@redhat.com
cc: linu
Use more fields from netfs_io_subrequest instead of those incorporated into
cifs_io_subrequest from cifs_readdata and cifs_writedata.
Signed-off-by: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc: linux-cachefs
Make afs use the netfs write helpers.
Signed-off-by: David Howells
cc: Marc Dionne
cc: Jeff Layton
cc: linux-...@lists.infradead.org
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/afs/file.c | 65 +++-
fs/afs/internal.h
: David Howells
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/smb/client/cifsglob.h | 22 ++
fs/smb/client/cifsproto.h | 9
Provide a launder_folio implementation for netfslib.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/buffered_write.c| 71
fs/netfs/main.c | 1
Support unbuffered and direct I/O reads from an encrypted file. This may
require making a larger read than is required into a bounce buffer and
copying out the required bits. We don't decrypt in-place in the user
buffer lest userspace interfere and muck up the decryption.
Signed-off-by:
re written back in the normal
way; similarly failed writethrough writes are marked dirty and left to
writeback to retry. Another option would be to simply invalidate them, but
the contents can be simultaneously accessed by read() and through mmap.
Signed-off-by: David Howells
cc: Jeff Layton
Support unbuffered and direct I/O writes to an encrypted file. This may
require making an RMW cycle if the write is not appropriately aligned with
respect to the crypto blocks.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux
Make netfs_skip_folio_read() take account of blocksize such as crypto
blocksize.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/buffered_read.c | 32 +---
1 file changed
Add a parameter for minimum blocksize in the netfs_i_context struct. This
can be used, for instance, to force I/O alignment for content encryption.
It also requires the use of an RMW cycle if a write we want to do doesn't
meet the block alignment requirements.
Signed-off-by: David Howell
block size is equal to or less than the size of a page (in which case we
might be better doing it as pages become read), but it will handle crypto
blocks larger than the size of a page.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
also by
this same mechanism.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/Makefile| 1 +
fs/netfs/buffered_write.c| 3 +-
fs/netfs/crypto.c| 89
Provide an implementation of writepages for network filesystems to delegate
to.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/buffered_write.c | 627 ++
include
Provide a top-level-ish function that can be pointed to directly by
->read_iter file op.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/buffered_read.c |
Provide an entry point to delegate a filesystem's ->page_mkwrite() to.
This checks for conflicting writes, then attached any netfs-specific group
marking (e.g. ceph snap) to the page to be considered dirty.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: li
Institute a netfs write helper, netfs_file_write_iter(), to be pointed at
by the network filesystem ->write_iter() call. Make it handled buffered
writes by calling the previously defined netfs_perform_write() to copy the
source data into the pagecache.
Signed-off-by: David Howells
cc: J
requirements.
Also provide a field that can tell the code to add some extra space onto
the bounce buffer for use by the filesystem in the case of a
content-encrypted file.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
further subrequests may be copied into the buffer
and then abandoned.
In the future, this will also take care of doing an unbuffered read from
encrypted content, with the decryption being done by the library.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: li
Allocate a multipage folio when copying data into the pagecache if possible
if there's sufficient data to warrant it.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/buffered_write.
st() and netfs_put_write_request() are provided
to refcount a request. These take constants from the netfs_wreq_trace
enum for logging into ftrace.
(6) The ->free_write_request is method is called to ask the filesystem to
clean up a request.
Signed-off-by: David Howells
cc: Jeff
over to folio->private.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/buffered_read.c | 61 ++--
include/trace/events/netfs.h | 2 ++
2 files changed,
dirty, but not uptodate. It will also tag pages as belonging to
fs-specific write groups if so directed by the filesystem.
This is derived from generic_perform_write(), but doesn't use
->write_begin() and ->write_end(), having that logic rolled in instead.
Signed-off-by: David Ho
in operation on a dirty folio.
(2) If private is set, with bit 0 clear, then this points to a group.
(3) If private is set, with bit 0 set, then this points to a netfs_folio
struct (with bit 0 AND'ed out).
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc
Make the refcounting of netfs_begin_read() easier to use by not eating the
caller's ref on the netfs_io_request it's given. This makes it easier to
use when we need to look in the request struct after.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc:
cause dependency cycles as fscache calls into netfslib directly.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/9p/vfs_addr.c| 18 ++
fs/afs/file.c | 14 +-
fs
Add a hook for netfslib's write helpers to call to tell the network
filesystem that it should update its i_size.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
include/linux/netfs.h | 4
1 file ch
Make netfs_put_request() just return if given a NULL request pointer.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/objects.c | 23 +--
1 file changed, 13 insertions(+), 10
, decrypted if necessary, the modifications made, then the modified
data can be reencrypted/recompressed and sent back to the server.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/internal.h | 6
Export netfs_put_subrequest() and the netfs_rreq and netfs_sreq
tracepoints.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/main.c| 3 +++
fs/netfs/objects.c | 1 +
2 files changed, 4
: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/iterator.c | 97 +++
include/linux/netfs.h | 2 +
2 files changed, 99 insertions(+)
diff --git a/fs/netfs/iterator.c b/fs
Limit a subrequest to a maximum size and/or a maximum number of contiguous
physical regions. This permits, for instance, an subreq's iterator to be
limited to the number of DMA'able segments that a large RDMA request can
handle.
Signed-off-by: David Howells
cc: Jeff Layton
cc: lin
Add a second xarray struct to netfs_io_request for the purposes of holding
a bounce buffer for when we have to deal with encrypted/compressed data or
if we have to up/download data in blocks larger than we were asked for.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
Provide tools to create a buffer in an xarray, with a function to add
new folios with a mark. This will be used to create bounce buffer and can be
used more easily to create a list of folios the span of which would require
more than a page's worth of bio_vec structs.
Signed-off-by: David Ho
it may be immediately
deallocated.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/objects.c| 10 ++
include/linux/netfs.h | 3 +++
2 files changed, 13 insertions(+)
diff --git a/fs
mpression.
These iov_iters persist for the lifetime of the (sub)request, and so can be
accessed multiple times without worrying about them being deallocated upon
return to the caller.
The network filesystem must appropriately advance the iterator before
terminating the request.
Signed-off-by: Davi
Provide default invalidate_folio and release_folio calls. These will need
to interact with invalidation correctly at some point. They will be needed
if netfslib is to make use of folio->private for its own purposes.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
Borrow NFS's direct-vs-buffered I/O locking into netfslib. Similar code is
also used in ceph.
Modify it to have the correct checker annotations for i_rwsem lock
acquisition/release and to return -ERESTARTSYS if waits are interrupted.
Signed-off-by: David Howells
cc: Jeff Layton
cc:
Add an rsize parameter to netfs_io_request to be filled in by the network
filesystem when the request is initialised. This indicates the maximum
size of a read request that the netfs will honour in that region.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux
Add a ->free_subrequest() op so that the netfs can clean up data attached
to a subrequest.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/objects.c| 2 ++
include/linux/netfs.h | 1 +
2 fi
dth.
Remove this, at least for now, and accept the extra network load (which
doesn't matter in the common case of writing a whole file at a time from
beginning to end).
This makes folio->private available for netfslib to use.
Signed-off-by: David Howells
cc: Marc Dionne
cc: Jeff Layton
Allow O_NONBLOCK to be noted in the netfs_io_request struct. Also add a
flag, NETFS_RREQ_BLOCKED to record if we did block.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/objects.c| 2
Allow the network filesystem to specify extra space to be allocated on the
end of the io (sub)request. This allows cifs, for example, to use this
space rather than allocating its own cifs_readdata struct.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde
int above that.
Assuming the above, any read from the server at or above the zero_point
position will return all zeroes.
The zero_point value can be stored in the cache, provided the above rules
are applied to it by any code that culls part of the local cache.
Signed-off-by: David Howells
c
Add a procfile, /proc/fs/netfs/requests, to list in-progress netfslib I/O
requests.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/internal.h | 22 +++
fs/netfs/main.c | 91
Add a ->free_subrequest() op so that the netfs can clean up data attached
to a subrequest.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/objects.c| 2 ++
include/linux/netfs.h | 1 +
2 fi
Allow the network filesystem to specify extra space to be allocated on the
end of the io (sub)request. This allows cifs, for example, to use this
space rather than allocating its own cifs_readdata struct.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde
Allow O_NONBLOCK to be noted in the netfs_io_request struct. Also add a
flag, NETFS_RREQ_BLOCKED to record if we did block.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/objects.c| 2
int above that.
Assuming the above, any read from the server at or above the zero_point
position will return all zeroes.
The zero_point value can be stored in the cache, provided the above rules
are applied to it by any code that culls part of the local cache.
Signed-off-by: David Howells
c
Add a procfile, /proc/fs/netfs/requests, to list in-progress netfslib I/O
requests.
Signed-off-by: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-fsde...@vger.kernel.org
cc: linux...@kvack.org
---
fs/netfs/internal.h | 22 +++
fs/netfs/main.c | 91
tfs helpers"
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2210612
Signed-off-by: Dave Wysochanski
Reviewed-by: Jeff Layton
Signed-off-by: David Howells
Link: https://lore.kernel.org/r/20230608214137.856006-1-dwyso...@redhat.com/ #
v1
Link: https://lore.kernel.org/r/20230915185704
Okay, this looks reasonable. Should I apply Jeff's suggestion before I send
it to Linus?
David
--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs
GUO Zihua wrote:
> Remove duplicated include for linux/uio.h. Resolves checkincludes
> message.
>
> Signed-off-by: GUO Zihua
Acked-by: David Howells
--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs
GUO Zihua wrote:
> Remove duplicated include for linux/uio.h. Resolves checkincludes
> message.
>
> Signed-off-by: GUO Zihua
Acked-by: David Howells
--
Linux-cachefs mailing list
Linux-cachefs@redhat.com
https://listman.redhat.com/mailman/listinfo/linux-cachefs
31368.2334525.8569808925687731937.st...@warthog.procyon.org.uk/
# v5
Link: https://lore.kernel.org/r/20230216150701.3654894-1-dhowe...@redhat.com/ #
v6
David Howells (2):
mm: Merge folio_has_private()/filemap_release_folio() call pairs
mm, netfs, fscache: Stop read optimisation when folio
ck in fuse.
Reported-by: Rohith Surabattula
Suggested-by: Matthew Wilcox
Signed-off-by: David Howells
cc: Matthew Wilcox
cc: Linus Torvalds
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Dave Wysochanski
cc: Dominique Martinet
cc: Ilya Dryomov
cc: "Theodore Ts'o"
if a cachefiles object already contains data
when we open it.
Fixes: 1f67e6d0b188 ("fscache: Provide a function to note the release of a
page")
Fixes: 047487c947e8 ("cachefiles: Implement the I/O routines")
Reported-by: Rohith Surabattula
Suggested-by: Matthew Wilcox
Signed-off-by: Dav
Marcel Holtmann wrote:
> The cachefiles misc character device uses MISC_DYNAMIC_MINOR and thus
> doesn't support module auto-loading. Assign a static minor number for it
> and provide appropriate module aliases for it. This is enough for kmod to
> create the /dev/cachefiles device node on startup
Move netfs_extract_iter_to_sg() to lib/scatterlist.c as it's going to be
used by more than just network filesystems (AF_ALG, for example).
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: &qu
Fix a couple of spelling mistakes in a comment.
Suggested-by: Simon Horman
Link: https://lore.kernel.org/r/zhh2msrqel4gs...@corigine.com/
Link: https://lore.kernel.org/r/zhh1nqzwogzxl...@corigine.com/
Signed-off-by: David Howells
Reviewed-by: Simon Horman
cc: Jeff Layton
cc: Steve French
cc
Wrap a line at 80 to stop checkpatch complaining.
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: "David S. Miller"
cc: Eric Dumazet
cc: Jakub Kicinski
cc: Paolo Abeni
cc: Matthew
Rename netfs_extract_iter_to_sg() and its auxiliary functions to drop the
netfs_ prefix.
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: "Matthew Wilcox (Oracle)"
cc: "David S. Mi
Move netfs_extract_iter_to_sg() to lib/scatterlist.c as it's going to be
used by more than just network filesystems (AF_ALG, for example).
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: &qu
Wrap a line at 80 to stop checkpatch complaining.
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: "David S. Miller"
cc: Eric Dumazet
cc: Jakub Kicinski
cc: Paolo Abeni
cc: Matthew
Fix a couple of spelling mistakes in a comment.
Suggested-by: Simon Horman
Link: https://lore.kernel.org/r/zhh2msrqel4gs...@corigine.com/
Link: https://lore.kernel.org/r/zhh1nqzwogzxl...@corigine.com/
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith
Rename netfs_extract_iter_to_sg() and its auxiliary functions to drop the
netfs_ prefix.
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: "Matthew Wilcox (Oracle)"
cc: "David S. Mi
If it comes to a respin, I'll stick in an extra patch to fix the spellings -
and if not, I'll submit the patch separately. It shouldn't be changed in with
the movement of code to give git analysis a better chance of tracking the
movement.
David
--
Linux-cachefs mailing list
Linux-cachefs@redhat.c
Rename netfs_extract_iter_to_sg() and its auxiliary functions to drop the
netfs_ prefix.
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: "David S. Miller"
cc: linux-cry...@vger.kernel.org
Move netfs_extract_iter_to_sg() to lib/scatterlist.c as it's going to be
used by more than just network filesystems (AF_ALG, for example).
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Jens Axboe
cc: Herbert Xu
cc: &qu
.
This also requires the SELinux policy to be changed so that cachefilesd can
access /etc/passwd, otherwise only numeric uids and gids can be set.
Signed-off-by: David Howells
---
cachefilesd.c | 59 +++--
cachefilesd.conf.5 |7 ++
2
and, in particular, the poison checking which will cause
the process to abort with no message as to why.
Signed-off-by: David Howells
---
cachefilesd.c | 25 +
1 file changed, 9 insertions(+), 16 deletions(-)
diff --git a/cachefilesd.c b/cachefilesd.c
index d4d236f
hown'd to those IDs.
Signed-off-by: David Howells
cc: David Howells
cc: Jeff Layton
cc: linux-cachefs@redhat.com
cc: linux-er...@lists.ozlabs.org
cc: linux-fsde...@vger.kernel.org
---
fs/cachefiles/namei.c |3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/cac
Chris Chilvers wrote:
> While testing the fscache performance fixes [1] that were merged into 6.4-rc1
> it appears that the caching no longer works. The client will write to the
> cache
> but never reads.
Can you try reading from afs? You would need to enable CONFIG_AFS_FS in your
kernel if it
Jia Zhu wrote:
> +int cachefiles_ondemand_restore(struct cachefiles_cache *cache, char *args)
> +{
> + struct cachefiles_req *req;
> +
> + XA_STATE(xas, &cache->reqs, 0);
> +
> + if (!test_bit(CACHEFILES_ONDEMAND_MODE, &cache->flags))
> + return -EOPNOTSUPP;
> +
> + /*
Jia Zhu wrote:
> #define CACHEFILES_OBJECT_STATE_FUNCS(_state, _STATE)\
> static inline bool
> \
> cachefiles_ondemand_object_is_##_state(const struct cachefiles_object
> *object) \
> {
Jia Zhu wrote:
> if (cachefiles_in_ondemand_mode(cache)) {
> - if (!xa_empty(&cache->reqs))
> - mask |= EPOLLIN;
> + if (!xa_empty(xa)) {
> + rcu_read_lock();
> + xa_for_each_marked(xa, index, req, CACHEFILE
a
scatterlist")
Signed-off-by: David Howells
Reviewed-by: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: linux-cachefs@redhat.com
cc: linux-c...@vger.kernel.org
cc: linux-fsde...@vger.kernel.org
---
fs/netfs/iterator.c |2 +-
1 file changed, 1 insertion(+),
acked iterators.
Fixes: 018584697533 ("netfs: Add a function to extract an iterator into a
scatterlist")
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: linux-cachefs@redhat.com
cc: linux-c...@vger.kernel.org
acked iterators.
Fixes: 018584697533 ("netfs: Add a function to extract an iterator into a
scatterlist")
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: linux-cachefs@redhat.com
cc: linux-c...@vger.kernel.org
Jia Zhu wrote:
> + if (!xa_empty(xa)) {
> + xa_lock(xa);
> + xa_for_each_marked(xa, index, req, CACHEFILES_REQ_NEW) {
> + if
> (!cachefiles_ondemand_is_reopening_read(req)) {
> + m
Jia Zhu wrote:
> + struct cachefiles_object *object =
> + ((struct cachefiles_ondemand_info *)work)->object;
container_of().
> + continue;
> + } else if (cachefiles_ondemand_object_is_reopening(object)) {
The "else" is unnecessary.
> +static voi
Jia Zhu wrote:
> @@ -65,10 +71,7 @@ struct cachefiles_object {
> enum cachefiles_content content_info:8; /* Info about content
> presence */
> unsigned long flags;
> #define CACHEFILES_OBJECT_USING_TMPFILE 0 /* Have an
> unlinked tmpfile
Jia Zhu wrote:
> +enum cachefiles_object_state {
> + CACHEFILES_ONDEMAND_OBJSTATE_close, /* Anonymous fd closed by daemon or
> initial state */
> + CACHEFILES_ONDEMAND_OBJSTATE_open, /* Anonymous fd associated with
> object is available */
That looks weird. Maybe make them all-lowerca
t;netfs: Add a function to extract an iterator into a
scatterlist")
Reported-by: kernel test robot
Reported-by: Dan Carpenter
Signed-off-by: David Howells
cc: Steve French
cc: Jeff Layton
cc: linux-c...@vger.kernel.org
cc: linux-cachefs@redhat.com
Link: https://lore.kernel.org/oe-k
manage their lifetime. It cannot be
assumed that a ref can be validly taken, particularly in the case of a KVEC
iterator.
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: linux-cachefs@redhat.com
cc: linux-c...@vger.kernel.org
cc
tream that's then
tricky to recover from.
We don't deal with other types of iterator here, leaving it to other
mechanisms to retain the pages (eg. PG_locked, PG_writeback and the pipe
lock).
Signed-off-by: David Howells
cc: Jeff Layton
cc: Steve French
cc: Shyam Prasad N
cc: Roh
achefiles object already contains data
when we open it.
Reported-by: Rohith Surabattula
Suggested-by: Matthew Wilcox
Signed-off-by: David Howells
cc: Matthew Wilcox
cc: Linus Torvalds
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Dave Wysochanski
cc: Dominique
ck in fuse.
Reported-by: Rohith Surabattula
Suggested-by: Matthew Wilcox
Signed-off-by: David Howells
cc: Matthew Wilcox
cc: Linus Torvalds
cc: Steve French
cc: Shyam Prasad N
cc: Rohith Surabattula
cc: Dave Wysochanski
cc: Dominique Martinet
cc: Ilya Dryomov
cc: "Theodore Ts'o"
org.uk/
# v4
Link:
https://lore.kernel.org/r/167172131368.2334525.8569808925687731937.st...@warthog.procyon.org.uk/
# v5
---
%(shortlog)s
%(diffstat)s
David Howells (2):
mm: Merge folio_has_private()/filemap_release_folio() call pairs
mm, netfs, fscache: Stop read optimisation when folio removed from
pagecache
fs/9
1 - 100 of 1001 matches
Mail list logo