* [GIT PULL] vfs netfs
@ 2024-05-10 11:47 Christian Brauner
2024-05-13 19:38 ` pr-tracker-bot
0 siblings, 1 reply; 21+ messages in thread
From: Christian Brauner @ 2024-05-10 11:47 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This reworks the netfslib writeback implementation so that pages read
from the cache are written to the cache through ->writepages(), thereby
allowing the fscache page flag to be retired.
The reworking also:
(1) builds on top of the new writeback_iter() infrastructure;
(2) makes it possible to use vectored write RPCs as discontiguous streams
of pages can be accommodated;
(3) makes it easier to do simultaneous content crypto and stream division.
(4) provides support for retrying writes and re-dividing a stream;
(5) replaces the ->launder_folio() op, so that ->writepages() is used
instead;
(6) uses mempools to allocate the netfs_io_request and netfs_io_subrequest
structs to avoid allocation failure in the writeback path.
Some code that uses the fscache page flag is retained for compatibility
purposes with nfs and ceph. The code is switched to using the synonymous
private_2 label instead and marked with deprecation comments.
The merge commit contains additional details on the new algorithm that
I've left out of here as it would probably be excessively detailed.
On top of the netfslib infrastructure this contains the work to convert
cifs over to netfslib.
/* Testing */
clang: Debian clang version 16.0.6 (26)
gcc: (Debian 13.2.0-24)
All patches are based on v6.9-rc6 and have been sitting in linux-next.
No build failures or warnings were observed.
/* Conflicts */
No known conflicts.
The following changes since commit e67572cd2204894179d89bd7b984072f19313b03:
Linux 6.9-rc6 (2024-04-28 13:47:24 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.10.netfs
for you to fetch changes up to e2bc9f6cfbd62c72a93a70068daab8886bec32ce:
Merge branch 'cifs-netfs' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs (2024-05-02 11:23:31 +0200)
Please consider pulling these changes from the signed vfs-6.10.netfs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.10.netfs
----------------------------------------------------------------
Christian Brauner (2):
Merge branch 'netfs-writeback' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Merge branch 'cifs-netfs' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
David Howells (38):
netfs: Update i_blocks when write committed to pagecache
netfs: Replace PG_fscache by setting folio->private and marking dirty
mm: Remove the PG_fscache alias for PG_private_2
netfs: Remove deprecated use of PG_private_2 as a second writeback flag
netfs: Make netfs_io_request::subreq_counter an atomic_t
netfs: Use subreq_counter to allocate subreq debug_index values
mm: Provide a means of invalidation without using launder_folio
9p: Use alternative invalidation to using launder_folio
afs: Use alternative invalidation to using launder_folio
netfs: Remove ->launder_folio() support
netfs: Use mempools for allocating requests and subrequests
mm: Export writeback_iter()
netfs: Switch to using unsigned long long rather than loff_t
netfs: New writeback implementation
netfs: Add some write-side stats and clean up some stat names
netfs, afs: Implement helpers for new write code
netfs, 9p: Implement helpers for new write code
netfs, cachefiles: Implement helpers for new write code
netfs: Cut over to using new writeback code
netfs: Remove the old writeback code
netfs: Miscellaneous tidy ups
netfs, afs: Use writeback retry to deal with alternate keys
cifs: Use alternative invalidation to using launder_folio
cifs: Replace cifs_readdata with a wrapper around netfs_io_subrequest
cifs: Replace cifs_writedata with a wrapper around netfs_io_subrequest
cifs: Use more fields from netfs_io_subrequest
cifs: Make wait_mtu_credits take size_t args
cifs: Replace the writedata replay bool with a netfs sreq flag
cifs: Move cifs_loose_read_iter() and cifs_file_write_iter() to file.c
cifs: Set zero_point in the copy_file_range() and remap_file_range()
cifs: Add mempools for cifs_io_request and cifs_io_subrequest structs
cifs: Make add_credits_and_wake_if() clear deducted credits
cifs: Implement netfslib hooks
cifs: Cut over to using netfslib
cifs: Remove some code that's no longer used, part 1
cifs: Remove some code that's no longer used, part 2
cifs: Remove some code that's no longer used, part 3
cifs: Enable large folio support
fs/9p/vfs_addr.c | 60 +-
fs/afs/file.c | 8 +-
fs/afs/internal.h | 6 +-
fs/afs/validation.c | 4 +-
fs/afs/write.c | 189 +--
fs/cachefiles/io.c | 76 +-
fs/ceph/addr.c | 24 +-
fs/ceph/inode.c | 2 +
fs/netfs/Makefile | 3 +-
fs/netfs/buffered_read.c | 40 +-
fs/netfs/buffered_write.c | 829 ++-----------
fs/netfs/direct_write.c | 56 +-
fs/netfs/fscache_io.c | 14 +-
fs/netfs/internal.h | 55 +-
fs/netfs/io.c | 162 +--
fs/netfs/main.c | 55 +-
fs/netfs/misc.c | 10 +-
fs/netfs/objects.c | 81 +-
fs/netfs/output.c | 478 --------
fs/netfs/stats.c | 17 +-
fs/netfs/write_collect.c | 808 +++++++++++++
fs/netfs/write_issue.c | 684 +++++++++++
fs/nfs/file.c | 8 +-
fs/nfs/fscache.h | 6 +-
fs/nfs/write.c | 4 +-
fs/smb/client/Kconfig | 1 +
fs/smb/client/cifsfs.c | 124 +-
fs/smb/client/cifsfs.h | 11 +-
fs/smb/client/cifsglob.h | 65 +-
fs/smb/client/cifsproto.h | 12 +-
fs/smb/client/cifssmb.c | 120 +-
fs/smb/client/file.c | 2720 ++++++------------------------------------
fs/smb/client/fscache.c | 109 --
fs/smb/client/fscache.h | 54 -
fs/smb/client/inode.c | 45 +-
fs/smb/client/smb2ops.c | 10 +-
fs/smb/client/smb2pdu.c | 186 +--
fs/smb/client/smb2proto.h | 5 +-
fs/smb/client/trace.h | 144 ++-
fs/smb/client/transport.c | 17 +-
include/linux/fscache.h | 22 +-
include/linux/netfs.h | 197 +--
include/linux/pagemap.h | 2 +
include/net/9p/client.h | 2 +
include/trace/events/netfs.h | 250 +++-
mm/filemap.c | 60 +-
mm/page-writeback.c | 1 +
net/9p/Kconfig | 1 +
net/9p/client.c | 49 +
49 files changed, 3298 insertions(+), 4588 deletions(-)
delete mode 100644 fs/netfs/output.c
create mode 100644 fs/netfs/write_collect.c
create mode 100644 fs/netfs/write_issue.c
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-05-10 11:47 Christian Brauner
@ 2024-05-13 19:38 ` pr-tracker-bot
0 siblings, 0 replies; 21+ messages in thread
From: pr-tracker-bot @ 2024-05-13 19:38 UTC (permalink / raw)
To: Christian Brauner
Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 10 May 2024 13:47:02 +0200:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.10.netfs
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ef31ea6c2774c015946d2ffa26795766f7caaa42
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* [GIT PULL] vfs netfs
@ 2024-09-13 16:56 Christian Brauner
2024-09-16 10:28 ` Linus Torvalds
` (4 more replies)
0 siblings, 5 replies; 21+ messages in thread
From: Christian Brauner @ 2024-09-13 16:56 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains the work to improve read/write performance for the new
netfs library.
The main performance enhancing changes are:
- Define a structure, struct folio_queue, and a new iterator type,
ITER_FOLIOQ, to hold a buffer as a replacement for ITER_XARRAY. See
that patch for questions about naming and form.
ITER_FOLIOQ is provided as a replacement for ITER_XARRAY. The
problem with an xarray is that accessing it requires the use of a
lock (typically the RCU read lock) - and this means that we can't
supply iterate_and_advance() with a step function that might sleep
(crypto for example) without having to drop the lock between
pages. ITER_FOLIOQ is the iterator for a chain of folio_queue
structs, where each folio_queue holds a small list of folios. A
folio_queue struct is a simpler structure than xarray and is not
subject to concurrent manipulation by the VM. folio_queue is used
rather than a bvec[] as it can form lists of indefinite size,
adding to one end and removing from the other on the fly.
- Provide a copy_folio_from_iter() wrapper.
- Make cifs RDMA support ITER_FOLIOQ.
- Use folio queues in the write-side helpers instead of xarrays.
- Add a function to reset the iterator in a subrequest.
- Simplify the write-side helpers to use sheaves to skip gaps rather
than trying to work out where gaps are.
- In afs, make the read subrequests asynchronous, putting them into work
items to allow the next patch to do progressive unlocking/reading.
- Overhaul the read-side helpers to improve performance.
- Fix the caching of a partial block at the end of a file.
- Allow a store to be cancelled.
Then some changes for cifs to make it use folio queues instead of
xarrays for crypto bufferage:
- Use raw iteration functions rather than manually coding iteration when
hashing data.
- Switch to using folio_queue for crypto buffers.
- Remove the xarray bits.
Make some adjustments to the /proc/fs/netfs/stats file such that:
- All the netfs stats lines begin 'Netfs:' but change this to something
a bit more useful.
- Add a couple of stats counters to track the numbers of skips and waits
on the per-inode writeback serialisation lock to make it easier to
check for this as a source of performance loss.
Miscellaneous work:
- Ensure that the sb_writers lock is taken around
vfs_{set,remove}xattr() in the cachefiles code.
- Reduce the number of conditional branches in netfs_perform_write().
- Move the CIFS_INO_MODIFIED_ATTR flag to the netfs_inode struct and
remove cifs_post_modify().
- Move the max_len/max_nr_segs members from netfs_io_subrequest to
netfs_io_request as they're only needed for one subreq at a time.
- Add an 'unknown' source value for tracing purposes.
- Remove NETFS_COPY_TO_CACHE as it's no longer used.
- Set the request work function up front at allocation time.
- Use bh-disabling spinlocks for rreq->lock as cachefiles completion may
be run from block-filesystem DIO completion in softirq context.
- Remove fs/netfs/io.c.
/* Testing */
gcc version 14.2.0 (Debian 14.2.0-3)
Debian clang version 16.0.6 (27+b1)
All patches are based on the vfs-6.11-rc7.fixes merge to bring in prerequisite
fixes in individual filesystems. All of this has been sitting in linux-next. No
build failures or warnings were observed.
/* Conflicts */
Merge conflicts with mainline
=============================
No known merge conflicts.
This has now a merge conflict with main due to some rather late cifs fixes.
This can be resolved by:
git rm fs/netfs/io.c
and then:
diff --cc fs/smb/client/cifssmb.c
index cfae2e918209,04f2a5441a89..d0df0c17b18f
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@@ -1261,16 -1261,6 +1261,14 @@@ openRetry
return rc;
}
+static void cifs_readv_worker(struct work_struct *work)
+{
+ struct cifs_io_subrequest *rdata =
+ container_of(work, struct cifs_io_subrequest, subreq.work);
+
- netfs_subreq_terminated(&rdata->subreq,
- (rdata->result == 0 || rdata->result == -EAGAIN) ?
- rdata->got_bytes : rdata->result, true);
++ netfs_read_subreq_terminated(&rdata->subreq, rdata->result, false);
+}
+
static void
cifs_readv_callback(struct mid_q_entry *mid)
{
@@@ -1323,21 -1306,11 +1321,23 @@@
rdata->result = -EIO;
}
- if (rdata->result == 0 || rdata->result == -EAGAIN)
- iov_iter_advance(&rdata->subreq.io_iter, rdata->got_bytes);
+ if (rdata->result == -ENODATA) {
+ __set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
+ rdata->result = 0;
+ } else {
- if (rdata->got_bytes < rdata->actual_len &&
- rdata->subreq.start + rdata->subreq.transferred + rdata->got_bytes ==
- ictx->remote_i_size) {
++ size_t trans = rdata->subreq.transferred + rdata->got_bytes;
++ if (trans < rdata->subreq.len &&
++ rdata->subreq.start + trans == ictx->remote_i_size) {
+ __set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
+ rdata->result = 0;
+ }
+ }
+
rdata->credits.value = 0;
+ rdata->subreq.transferred += rdata->got_bytes;
- netfs_read_subreq_terminated(&rdata->subreq, rdata->result, false);
++ trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
+ INIT_WORK(&rdata->subreq.work, cifs_readv_worker);
+ queue_work(cifsiod_wq, &rdata->subreq.work);
release_mid(mid);
add_credits(server, &credits, 0);
}
diff --cc fs/smb/client/smb2pdu.c
index 88dc49d67037,95377bb91950..bb8ecbbe78af
--- a/fs/smb/client/smb2pdu.c
+++ b/fs/smb/client/smb2pdu.c
@@@ -4614,6 -4613,10 +4613,8 @@@ smb2_readv_callback(struct mid_q_entry
server->credits, server->in_flight,
0, cifs_trace_rw_credits_read_response_clear);
rdata->credits.value = 0;
+ rdata->subreq.transferred += rdata->got_bytes;
- if (rdata->subreq.start + rdata->subreq.transferred >= rdata->subreq.rreq->i_size)
- __set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
+ trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
INIT_WORK(&rdata->subreq.work, smb2_readv_worker);
queue_work(cifsiod_wq, &rdata->subreq.work);
release_mid(mid);
Merge conflicts with other trees
================================
No known merge conflicts.
The following changes since commit 4356ab331c8f0dbed0f683abde345cd5503db1e4:
Merge tag 'vfs-6.11-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs (2024-09-04 09:33:57 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.12.netfs
for you to fetch changes up to 4b40d43d9f951d87ae8dc414c2ef5ae50303a266:
docs: filesystems: corrected grammar of netfs page (2024-09-12 12:20:43 +0200)
Please consider pulling these changes from the signed vfs-6.12.netfs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.12.netfs
----------------------------------------------------------------
Christian Brauner (1):
Merge branch 'netfs-writeback' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs into vfs.netfs
David Howells (24):
cachefiles: Fix non-taking of sb_writers around set/removexattr
netfs: Adjust labels in /proc/fs/netfs/stats
netfs: Record contention stats for writeback lock
netfs: Reduce number of conditional branches in netfs_perform_write()
netfs, cifs: Move CIFS_INO_MODIFIED_ATTR to netfs_inode
netfs: Move max_len/max_nr_segs from netfs_io_subrequest to netfs_io_stream
netfs: Reserve netfs_sreq_source 0 as unset/unknown
netfs: Remove NETFS_COPY_TO_CACHE
netfs: Set the request work function upon allocation
netfs: Use bh-disabling spinlocks for rreq->lock
mm: Define struct folio_queue and ITER_FOLIOQ to handle a sequence of folios
iov_iter: Provide copy_folio_from_iter()
cifs: Provide the capability to extract from ITER_FOLIOQ to RDMA SGEs
netfs: Use new folio_queue data type and iterator instead of xarray iter
netfs: Provide an iterator-reset function
netfs: Simplify the writeback code
afs: Make read subreqs async
netfs: Speed up buffered reading
netfs: Remove fs/netfs/io.c
cachefiles, netfs: Fix write to partial block at EOF
netfs: Cancel dirty folios that have no storage destination
cifs: Use iterate_and_advance*() routines directly for hashing
cifs: Switch crypto buffer to use a folio_queue rather than an xarray
cifs: Don't support ITER_XARRAY
Dennis Lam (1):
docs: filesystems: corrected grammar of netfs page
Documentation/filesystems/netfs_library.rst | 2 +-
fs/9p/vfs_addr.c | 11 +-
fs/afs/file.c | 30 +-
fs/afs/fsclient.c | 9 +-
fs/afs/write.c | 4 +-
fs/afs/yfsclient.c | 9 +-
fs/cachefiles/io.c | 19 +-
fs/cachefiles/xattr.c | 34 +-
fs/ceph/addr.c | 76 +--
fs/netfs/Makefile | 4 +-
fs/netfs/buffered_read.c | 766 ++++++++++++++++----------
fs/netfs/buffered_write.c | 309 +++++------
fs/netfs/direct_read.c | 147 ++++-
fs/netfs/internal.h | 43 +-
fs/netfs/io.c | 804 ----------------------------
fs/netfs/iterator.c | 50 ++
fs/netfs/main.c | 7 +-
fs/netfs/misc.c | 94 ++++
fs/netfs/objects.c | 16 +-
fs/netfs/read_collect.c | 544 +++++++++++++++++++
fs/netfs/read_pgpriv2.c | 264 +++++++++
fs/netfs/read_retry.c | 256 +++++++++
fs/netfs/stats.c | 27 +-
fs/netfs/write_collect.c | 246 +++------
fs/netfs/write_issue.c | 93 ++--
fs/nfs/fscache.c | 19 +-
fs/nfs/fscache.h | 7 +-
fs/smb/client/cifsencrypt.c | 144 +----
fs/smb/client/cifsglob.h | 4 +-
fs/smb/client/cifssmb.c | 6 +-
fs/smb/client/file.c | 96 ++--
fs/smb/client/smb2ops.c | 219 ++++----
fs/smb/client/smb2pdu.c | 27 +-
fs/smb/client/smbdirect.c | 82 +--
include/linux/folio_queue.h | 156 ++++++
include/linux/iov_iter.h | 104 ++++
include/linux/netfs.h | 46 +-
include/linux/uio.h | 18 +
include/trace/events/netfs.h | 144 +++--
lib/iov_iter.c | 240 ++++++++-
lib/kunit_iov_iter.c | 259 +++++++++
lib/scatterlist.c | 69 ++-
42 files changed, 3520 insertions(+), 1984 deletions(-)
delete mode 100644 fs/netfs/io.c
create mode 100644 fs/netfs/read_collect.c
create mode 100644 fs/netfs/read_pgpriv2.c
create mode 100644 fs/netfs/read_retry.c
create mode 100644 include/linux/folio_queue.h
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-13 16:56 Christian Brauner
@ 2024-09-16 10:28 ` Linus Torvalds
2024-09-16 11:09 ` pr-tracker-bot
` (3 subsequent siblings)
4 siblings, 0 replies; 21+ messages in thread
From: Linus Torvalds @ 2024-09-16 10:28 UTC (permalink / raw)
To: Christian Brauner
Cc: linux-fsdevel, linux-kernel, David Howells, Steve French
On Fri, 13 Sept 2024 at 18:57, Christian Brauner <brauner@kernel.org> wrote:
>
> /* Conflicts */
>
> Merge conflicts with mainline
Hmm.
My conflict resolution is _similar_, but at the same time decidedly
different. And I'm not sure why yours is different.
> --- a/fs/smb/client/cifssmb.c
> +++ b/fs/smb/client/cifssmb.c
> @@@ -1261,16 -1261,6 +1261,14 @@@ openRetry
> return rc;
> }
>
> +static void cifs_readv_worker(struct work_struct *work)
> +{
> + struct cifs_io_subrequest *rdata =
> + container_of(work, struct cifs_io_subrequest, subreq.work);
> +
> - netfs_subreq_terminated(&rdata->subreq,
> - (rdata->result == 0 || rdata->result == -EAGAIN) ?
> - rdata->got_bytes : rdata->result, true);
> ++ netfs_read_subreq_terminated(&rdata->subreq, rdata->result, false);
So here, I have
++ netfs_read_subreq_terminated(&rdata->subreq, rdata->result, true);
with the third argument being 'true' instead of 'false' as in yours.
The reason? That's what commit a68c74865f51 ("cifs: Fix SMB1
readv/writev callback in the same way as SMB2/3") did when it moved
the (originally) netfs_subreq_terminated() into the worker, and it
changed the 'was_async' argument from "false" to a "true".
Now, that change makes little sense to me (a worker thread is not
softirq context), but that's what commit a68c74865f51 does, and so
that's logically what the merge should do.
> + rdata->subreq.transferred += rdata->got_bytes;
> - netfs_read_subreq_terminated(&rdata->subreq, rdata->result, false);
> ++ trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
where did this trace_netfs_sreq() come from?
> --- a/fs/smb/client/smb2pdu.c
> +++ b/fs/smb/client/smb2pdu.c
> @@@ -4614,6 -4613,10 +4613,8 @@@ smb2_readv_callback(struct mid_q_entry
> server->credits, server->in_flight,
> 0, cifs_trace_rw_credits_read_response_clear);
> rdata->credits.value = 0;
> + rdata->subreq.transferred += rdata->got_bytes;
> - if (rdata->subreq.start + rdata->subreq.transferred >= rdata->subreq.rreq->i_size)
> - __set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
> + trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
And where did this conflict resolution come from? I'm not seeing why
it removes that NETFS_SREQ_HIT_EOF bit logic..
Some searching gets me this:
https://lore.kernel.org/all/1131388.1726141806@warthog.procyon.org.uk/
which seems to explain your merge resolution, and I'm even inclined to
think that it might be right, but it's not *sensible*.
That whole removal of the NETFS_SREQ_HIT_EOF bit ends up undoing part
of commit ee4cdf7ba857 ("netfs: Speed up buffered reading"), and
doesn't seem to be supported by the changes done on the other side of
the conflict resolution.
IOW, the changes may be *correct*, but they do not seem to be valid as
a conflict resolution, and if they are fixes they should be done as
such separately.
Adding DavidH (and Steve French) to the participants, so that they can
know about my confusion, and maybe send a patch to fix it up properly
with actual explanations. Because I don't want to commit the merge as
you suggest without explanations for why those changes were magically
done independently of what seems to be happening in the development
history.
Linus
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-13 16:56 Christian Brauner
2024-09-16 10:28 ` Linus Torvalds
@ 2024-09-16 11:09 ` pr-tracker-bot
2024-09-16 12:58 ` David Howells
` (2 subsequent siblings)
4 siblings, 0 replies; 21+ messages in thread
From: pr-tracker-bot @ 2024-09-16 11:09 UTC (permalink / raw)
To: Christian Brauner
Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 13 Sep 2024 18:56:36 +0200:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.12.netfs
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/35219bc5c71f4197c8bd10297597de797c1eece5
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-13 16:56 Christian Brauner
2024-09-16 10:28 ` Linus Torvalds
2024-09-16 11:09 ` pr-tracker-bot
@ 2024-09-16 12:58 ` David Howells
2024-09-26 17:40 ` Leon Romanovsky
2024-09-27 8:01 ` David Howells
4 siblings, 0 replies; 21+ messages in thread
From: David Howells @ 2024-09-16 12:58 UTC (permalink / raw)
To: Linus Torvalds
Cc: dhowells, Christian Brauner, linux-fsdevel, linux-kernel,
Steve French
Linus Torvalds <torvalds@linux-foundation.org> wrote:
> > ++ netfs_read_subreq_terminated(&rdata->subreq, rdata->result, false);
>
> So here, I have
>
> ++ netfs_read_subreq_terminated(&rdata->subreq, rdata->result, true);
>
> with the third argument being 'true' instead of 'false' as in yours.
>
> The reason? That's what commit a68c74865f51 ("cifs: Fix SMB1
> readv/writev callback in the same way as SMB2/3") did when it moved
> the (originally) netfs_subreq_terminated() into the worker, and it
> changed the 'was_async' argument from "false" to a "true".
As part of these changes, the callback to netfslib from the SMB1 transport
variant is now delegated to a separate worker thread by cifs_readv_callback()
rather than being done in the cifs network processing thread (e.g. as is done
by the SMB2/3 smb2_readv_worker() in smb2pdu.c), so it's better to pass
"false" here.
All that argument does is tell netfslib whether it can do cleanup processing
and retrying in the calling thread (if "false") or whether it needs to
offload it to another thread (if "true"). I should probably rename the
argument from "was_async" to something more explanatory.
By putting "true" here, it causes the already offloaded processing to further
offload unnecessarily. It shouldn't break things though.
> > + rdata->subreq.transferred += rdata->got_bytes;
> > - netfs_read_subreq_terminated(&rdata->subreq, rdata->result, false);
> > ++ trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
>
> where did this trace_netfs_sreq() come from?
It got copied across with other lines when sync'ing the code with
smb2_readv_callback() whilst attempting the merge resolution. It's something
that got missed out when porting the changes I'd made to SMB2/3 to SMB1. It
should have been deferred to a follow up patch.
> > --- a/fs/smb/client/smb2pdu.c
> > +++ b/fs/smb/client/smb2pdu.c
> > @@@ -4614,6 -4613,10 +4613,8 @@@ smb2_readv_callback(struct mid_q_entry
> > server->credits, server->in_flight,
> > 0, cifs_trace_rw_credits_read_response_clear);
> > rdata->credits.value = 0;
> > + rdata->subreq.transferred += rdata->got_bytes;
> > - if (rdata->subreq.start + rdata->subreq.transferred >= rdata->subreq.rreq->i_size)
> > - __set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
> > + trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
>
> And where did this conflict resolution come from? I'm not seeing why
> it removes that NETFS_SREQ_HIT_EOF bit logic..
A fix that went upstream via SteveF's tree rather than Christian's tree added
NETFS_SREQ_HIT_EOF separately:
1da29f2c39b67b846b74205c81bf0ccd96d34727
netfs, cifs: Fix handling of short DIO read
The code that added to twiddle NETFS_SREQ_HIT_EOF is in the source, just above
the lines in the hunk above:
if (rdata->result == -ENODATA) {
__set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
rdata->result = 0;
} else {
size_t trans = rdata->subreq.transferred + rdata->got_bytes;
if (trans < rdata->subreq.len &&
rdata->subreq.start + trans == ictx->remote_i_size) {
__set_bit(NETFS_SREQ_HIT_EOF, &rdata->subreq.flags);
rdata->result = 0;
}
}
The two lines removed in the example resolution are therefore redundant and
should have been removed, but weren't.
David
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-13 16:56 Christian Brauner
` (2 preceding siblings ...)
2024-09-16 12:58 ` David Howells
@ 2024-09-26 17:40 ` Leon Romanovsky
2024-09-27 8:01 ` David Howells
4 siblings, 0 replies; 21+ messages in thread
From: Leon Romanovsky @ 2024-09-26 17:40 UTC (permalink / raw)
To: Christian Brauner, David Howells
Cc: Linus Torvalds, linux-fsdevel, linux-kernel
On Fri, Sep 13, 2024 at 06:56:36PM +0200, Christian Brauner wrote:
> Hey Linus,
>
> /* Summary */
>
> This contains the work to improve read/write performance for the new
> netfs library.
>
> The main performance enhancing changes are:
>
> - Define a structure, struct folio_queue, and a new iterator type,
> ITER_FOLIOQ, to hold a buffer as a replacement for ITER_XARRAY. See
> that patch for questions about naming and form.
>
> ITER_FOLIOQ is provided as a replacement for ITER_XARRAY. The
> problem with an xarray is that accessing it requires the use of a
> lock (typically the RCU read lock) - and this means that we can't
> supply iterate_and_advance() with a step function that might sleep
> (crypto for example) without having to drop the lock between
> pages. ITER_FOLIOQ is the iterator for a chain of folio_queue
> structs, where each folio_queue holds a small list of folios. A
> folio_queue struct is a simpler structure than xarray and is not
> subject to concurrent manipulation by the VM. folio_queue is used
> rather than a bvec[] as it can form lists of indefinite size,
> adding to one end and removing from the other on the fly.
<...>
> David Howells (24):
> cachefiles: Fix non-taking of sb_writers around set/removexattr
> netfs: Adjust labels in /proc/fs/netfs/stats
> netfs: Record contention stats for writeback lock
> netfs: Reduce number of conditional branches in netfs_perform_write()
> netfs, cifs: Move CIFS_INO_MODIFIED_ATTR to netfs_inode
> netfs: Move max_len/max_nr_segs from netfs_io_subrequest to netfs_io_stream
> netfs: Reserve netfs_sreq_source 0 as unset/unknown
> netfs: Remove NETFS_COPY_TO_CACHE
> netfs: Set the request work function upon allocation
> netfs: Use bh-disabling spinlocks for rreq->lock
> mm: Define struct folio_queue and ITER_FOLIOQ to handle a sequence of folios
> iov_iter: Provide copy_folio_from_iter()
> cifs: Provide the capability to extract from ITER_FOLIOQ to RDMA SGEs
> netfs: Use new folio_queue data type and iterator instead of xarray iter
> netfs: Provide an iterator-reset function
> netfs: Simplify the writeback code
> afs: Make read subreqs async
> netfs: Speed up buffered reading
> netfs: Remove fs/netfs/io.c
> cachefiles, netfs: Fix write to partial block at EOF
> netfs: Cancel dirty folios that have no storage destination
> cifs: Use iterate_and_advance*() routines directly for hashing
> cifs: Switch crypto buffer to use a folio_queue rather than an xarray
> cifs: Don't support ITER_XARRAY
Christian, David,
Do you have fixes for the following issues reported for series?
https://lore.kernel.org/all/20240923183432.1876750-1-chantr4@gmail.com/
https://lore.kernel.org/all/4b5621958a758da830c1cf09c6f6893aed371f9d.camel@gmail.com/
https://lore.kernel.org/all/20240924094809.GA1182241@unreal/
In my case, I don't have any other workaround but simply revert these commits:
"netfs: Use new folio_queue data type and iterator instead of xarray iter"
"netfs: Provide an iterator-reset function"
"netfs: Simplify the writeback code"
"afs: Make read subreqs async"
"netfs: Speed up buffered reading"
"netfs: Remove fs/netfs/io.c"
"cachefiles, netfs: Fix write to partial block at EOF"
"netfs: Cancel dirty folios that have no storage destination"
"cifs: Use iterate_and_advance*() routines directly for hashing"
"cifs: Switch crypto buffer to use a folio_queue rather than an xarray"
"cifs: Don't support ITER_XARRAY"
"cifs: Fix signature miscalculation"
"cifs: Fix cifs readv callback merge resolution issue"
"cifs: Remove redundant setting of NETFS_SREQ_HIT_EOF"
Thanks
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-13 16:56 Christian Brauner
` (3 preceding siblings ...)
2024-09-26 17:40 ` Leon Romanovsky
@ 2024-09-27 8:01 ` David Howells
2024-09-27 16:34 ` Leon Romanovsky
2024-09-27 20:31 ` David Howells
4 siblings, 2 replies; 21+ messages in thread
From: David Howells @ 2024-09-27 8:01 UTC (permalink / raw)
To: Leon Romanovsky
Cc: dhowells, Christian Brauner, Linus Torvalds, linux-fsdevel,
linux-kernel
Leon Romanovsky <leon@kernel.org> wrote:
> Do you have fixes for the following issues reported for series?
> https://lore.kernel.org/all/20240923183432.1876750-1-chantr4@gmail.com/
> https://lore.kernel.org/all/4b5621958a758da830c1cf09c6f6893aed371f9d.camel@gmail.com/
> https://lore.kernel.org/all/20240924094809.GA1182241@unreal/
I'm working on a fix for the third one at the moment, I think it's the read
version of the write fix I posted previously:
https://lore.kernel.org/linux-fsdevel/2050099.1727359110@warthog.procyon.org.uk/
I'm looking to see if I can make a general solution that abstracts out the
buffer handling for both as we're early in the cycle.
I haven't looked at the first two yet. I was in the middle of testing 9p when
I hit the write-side bug that cifs was also seeing (ie. the url above).
David
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-27 8:01 ` David Howells
@ 2024-09-27 16:34 ` Leon Romanovsky
2024-09-27 20:31 ` David Howells
1 sibling, 0 replies; 21+ messages in thread
From: Leon Romanovsky @ 2024-09-27 16:34 UTC (permalink / raw)
To: David Howells
Cc: Christian Brauner, Linus Torvalds, linux-fsdevel, linux-kernel
On Fri, Sep 27, 2024 at 09:01:19AM +0100, David Howells wrote:
> Leon Romanovsky <leon@kernel.org> wrote:
>
> > Do you have fixes for the following issues reported for series?
> > https://lore.kernel.org/all/20240923183432.1876750-1-chantr4@gmail.com/
> > https://lore.kernel.org/all/4b5621958a758da830c1cf09c6f6893aed371f9d.camel@gmail.com/
> > https://lore.kernel.org/all/20240924094809.GA1182241@unreal/
>
> I'm working on a fix for the third one at the moment, I think it's the read
> version of the write fix I posted previously:
>
> https://lore.kernel.org/linux-fsdevel/2050099.1727359110@warthog.procyon.org.uk/
>
> I'm looking to see if I can make a general solution that abstracts out the
> buffer handling for both as we're early in the cycle.
I hope that you mean that we have plenty of time before the merge window ends.
Otherwise, it will be very inconvenient to open official -next/-rc branches,
based on -rc1, remembering to revert so many commits.
It is better to have fast fixes and then work on improving them without
worrying about time frames.
Thanks
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-27 8:01 ` David Howells
2024-09-27 16:34 ` Leon Romanovsky
@ 2024-09-27 20:31 ` David Howells
2024-09-28 10:11 ` Leon Romanovsky
1 sibling, 1 reply; 21+ messages in thread
From: David Howells @ 2024-09-27 20:31 UTC (permalink / raw)
To: Leon Romanovsky
Cc: dhowells, Christian Brauner, Linus Torvalds, linux-fsdevel,
linux-kernel
Leon Romanovsky <leon@kernel.org> wrote:
> I hope that you mean that we have plenty of time before the merge window ends.
> Otherwise, it will be very inconvenient to open official -next/-rc branches,
> based on -rc1, remembering to revert so many commits.
Yes, I'm aware of the time, thank you.
Can you please try the branch at:
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes
see if it fixes your problem? It runs through -g quick with 9p over TCP for
me.
David
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-09-27 20:31 ` David Howells
@ 2024-09-28 10:11 ` Leon Romanovsky
0 siblings, 0 replies; 21+ messages in thread
From: Leon Romanovsky @ 2024-09-28 10:11 UTC (permalink / raw)
To: David Howells
Cc: Christian Brauner, Linus Torvalds, linux-fsdevel, linux-kernel
On Fri, Sep 27, 2024 at 09:31:28PM +0100, David Howells wrote:
> Leon Romanovsky <leon@kernel.org> wrote:
>
> > I hope that you mean that we have plenty of time before the merge window ends.
> > Otherwise, it will be very inconvenient to open official -next/-rc branches,
> > based on -rc1, remembering to revert so many commits.
>
> Yes, I'm aware of the time, thank you.
>
> Can you please try the branch at:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes
>
> see if it fixes your problem? It runs through -g quick with 9p over TCP for
> me.
I tried it now and it didn't fix my issue.
➜ kernel git:(netfs-fixes) git l
8e18fe180b0a netfs: Abstract out a rolling folio buffer implementation
[ 1.506633][ T1] Run /sbin/init as init process
[ 1.506800][ T1] with arguments:
[ 1.506895][ T1] /sbin/init
[ 1.507004][ T1] with environment:
[ 1.507104][ T1] HOME=/
[ 1.507201][ T1] TERM=linux
[ 1.512981][ T1] page: refcount:0 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x6ce48
[ 1.513934][ T1] flags: 0x4000000000000000(zone=1)
[ 1.514142][ T1] raw: 4000000000000000 ffffea0001b39248 ffffea00001583c8 0000000000000000
[ 1.514536][ T1] raw: 0000000000000000 0000000000000000 00000000ffffffff 0000000000000000
[ 1.514796][ T1] page dumped because: VM_BUG_ON_FOLIO(((unsigned int) folio_ref_count(folio) + 127u <= 127u))
[ 1.515087][ T1] ------------[ cut here ]------------
[ 1.515231][ T1] kernel BUG at include/linux/mm.h:1444!
[ 1.515375][ T1] Oops: invalid opcode: 0000 [#1] SMP DEBUG_PAGEALLOC KASAN
[ 1.515596][ T1] CPU: 4 UID: 0 PID: 1 Comm: swapper/0 Not tainted 6.11.0+ #2546
[ 1.515823][ T1] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.16.3-0-ga6ed6b701f0a-prebuilt.qemu.org 04/01/2014
[ 1.516153][ T1] RIP: 0010:__iov_iter_get_pages_alloc+0x16d4/0x2210
[ 1.516345][ T1] Code: 84 f2 fa ff ff 48 89 ef e8 c9 20 98 ff e9 e5 fa ff ff 48 8d 48 ff e9 2c fe ff ff 48 c7 c6 00 eb 21 83 48 89 cf e8 fc 25 8a ff <0f> 0b 48 b8 00 00 00 00 00 fc ff df 4c 8b 74 24 68 44 8b 5c 24 30
[ 1.516874][ T1] RSP: 0000:ffff8880060f6e40 EFLAGS: 00010286
[ 1.517126][ T1] RAX: 000000000000005c RBX: ffffea0001b39234 RCX: 0000000000000000
[ 1.517434][ T1] RDX: 000000000000005c RSI: 0000000000000004 RDI: ffffed1000c1edbb
[ 1.517676][ T1] RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff0718ce0
[ 1.517898][ T1] R10: 0000000000000003 R11: 0000000000000001 R12: ffff88800950f420
[ 1.518111][ T1] R13: ffff88800aba0c00 R14: 0000000000000002 R15: 0000000000001000
[ 1.518321][ T1] FS: 0000000000000000(0000) GS:ffff88806d000000(0000) knlGS:0000000000000000
[ 1.518587][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.518804][ T1] CR2: 0000000000000000 CR3: 0000000003881001 CR4: 0000000000370eb0
[ 1.519058][ T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1.519302][ T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1.519553][ T1] Call Trace:
[ 1.519687][ T1] <TASK>
[ 1.519790][ T1] ? __die+0x52/0x8f
[ 1.519947][ T1] ? die+0x2a/0x50
[ 1.520107][ T1] ? do_trap+0x1d9/0x2c0
[ 1.520227][ T1] ? __iov_iter_get_pages_alloc+0x16d4/0x2210
[ 1.520421][ T1] ? do_error_trap+0xa3/0x160
[ 1.520599][ T1] ? __iov_iter_get_pages_alloc+0x16d4/0x2210
[ 1.520813][ T1] ? handle_invalid_op+0x2c/0x30
[ 1.520991][ T1] ? __iov_iter_get_pages_alloc+0x16d4/0x2210
[ 1.521245][ T1] ? exc_invalid_op+0x29/0x40
[ 1.521438][ T1] ? asm_exc_invalid_op+0x16/0x20
[ 1.521601][ T1] ? __iov_iter_get_pages_alloc+0x16d4/0x2210
[ 1.521799][ T1] ? iov_iter_extract_pages+0x1ee0/0x1ee0
[ 1.521954][ T1] ? radix_tree_node_alloc.constprop.0+0x16a/0x2c0
[ 1.522148][ T1] ? lock_acquire+0xe2/0x500
[ 1.522308][ T1] ? mark_lock+0xfc/0x2dc0
[ 1.522462][ T1] iov_iter_get_pages_alloc2+0x3d/0xe0
[ 1.522624][ T1] ? print_usage_bug.part.0+0x600/0x600
[ 1.522795][ T1] p9_get_mapped_pages.part.0.constprop.0+0x3bf/0x6c0
[ 1.523025][ T1] ? p9pdu_vwritef+0x320/0x1f20
[ 1.523239][ T1] ? p9_virtio_request+0x550/0x550
[ 1.523427][ T1] ? pdu_read+0xc0/0xc0
[ 1.523551][ T1] ? lock_release+0x220/0x780
[ 1.523714][ T1] ? pdu_read+0xc0/0xc0
[ 1.523824][ T1] p9_virtio_zc_request+0x728/0x1020
[ 1.523975][ T1] ? p9pdu_vwritef+0x320/0x1f20
[ 1.524119][ T1] ? p9_virtio_probe+0xa20/0xa20
[ 1.524271][ T1] ? netfs_read_to_pagecache+0x600/0xd90
[ 1.524424][ T1] ? mark_lock+0xfc/0x2dc0
[ 1.524586][ T1] ? p9pdu_finalize+0xdc/0x1d0
[ 1.524762][ T1] ? p9_client_prepare_req+0x235/0x360
[ 1.524918][ T1] ? p9_tag_alloc+0x6e0/0x6e0
[ 1.525084][ T1] ? lock_release+0x220/0x780
[ 1.525241][ T1] p9_client_zc_rpc.constprop.0+0x236/0x7d0
[ 1.525434][ T1] ? __create_object+0x5e/0x80
[ 1.525595][ T1] ? p9_client_flush.isra.0+0x390/0x390
[ 1.525746][ T1] ? lockdep_hardirqs_on_prepare+0x268/0x3e0
[ 1.525911][ T1] ? __call_rcu_common.constprop.0+0x475/0xc80
[ 1.526092][ T1] ? p9_req_put+0x17a/0x200
[ 1.526226][ T1] p9_client_read_once+0x343/0x840
[ 1.526361][ T1] ? p9_client_getlock_dotl+0x3c0/0x3c0
[ 1.526501][ T1] p9_client_read+0xf1/0x150
[ 1.526649][ T1] v9fs_issue_read+0x107/0x300
[ 1.526788][ T1] ? v9fs_issue_write+0x140/0x140
[ 1.526934][ T1] ? __rwlock_init+0x150/0x150
[ 1.527073][ T1] ? lockdep_hardirqs_on_prepare+0x268/0x3e0
[ 1.527249][ T1] netfs_read_to_pagecache+0x600/0xd90
[ 1.527396][ T1] netfs_readahead+0x47a/0x960
[ 1.527552][ T1] read_pages+0x17b/0xaf0
[ 1.527676][ T1] ? lru_move_tail+0x8f0/0x8f0
[ 1.527842][ T1] ? file_ra_state_init+0xd0/0xd0
[ 1.528004][ T1] page_cache_ra_unbounded+0x324/0x5f0
[ 1.528167][ T1] filemap_get_pages+0x597/0x16b0
[ 1.528324][ T1] ? filemap_add_folio+0x140/0x140
[ 1.528476][ T1] ? lock_is_held_type+0x81/0xe0
[ 1.528637][ T1] filemap_read+0x2ec/0xa90
[ 1.528799][ T1] ? filemap_get_pages+0x16b0/0x16b0
[ 1.528969][ T1] ? 0xffffffff81000000
[ 1.529090][ T1] ? find_held_lock+0x2d/0x110
[ 1.529286][ T1] ? lock_is_held_type+0x81/0xe0
[ 1.529437][ T1] ? down_read_interruptible+0x1f6/0x490
[ 1.529601][ T1] ? down_read+0x450/0x450
[ 1.529748][ T1] ? lockdep_hardirqs_on_prepare+0x3e0/0x3e0
[ 1.529953][ T1] ? find_held_lock+0x2d/0x110
[ 1.530098][ T1] netfs_buffered_read_iter+0xe2/0x130
[ 1.530254][ T1] ? netfs_file_read_iter+0xb2/0x130
[ 1.530398][ T1] __kernel_read+0x2db/0x8a0
[ 1.530554][ T1] ? __x64_sys_lseek+0x1d0/0x1d0
[ 1.530700][ T1] bprm_execve+0x548/0x1410
[ 1.530864][ T1] ? setup_arg_pages+0xb40/0xb40
[ 1.531007][ T1] ? __cond_resched+0x17/0x70
[ 1.531152][ T1] kernel_execve+0x26a/0x2f0
[ 1.531296][ T1] try_to_run_init_process+0xf/0x30
[ 1.531445][ T1] ? rest_init+0x1b0/0x1b0
[ 1.531595][ T1] kernel_init+0xe2/0x140
[ 1.531704][ T1] ? _raw_spin_unlock_irq+0x24/0x30
[ 1.531862][ T1] ret_from_fork+0x2d/0x70
[ 1.532013][ T1] ? rest_init+0x1b0/0x1b0
[ 1.532162][ T1] ret_from_fork_asm+0x11/0x20
[ 1.532342][ T1] </TASK>
[ 1.532463][ T1] Modules linked in:
[ 1.532679][ T1] ---[ end trace 0000000000000000 ]---
[ 1.532827][ T1] RIP: 0010:__iov_iter_get_pages_alloc+0x16d4/0x2210
[ 1.533109][ T1] Code: 84 f2 fa ff ff 48 89 ef e8 c9 20 98 ff e9 e5 fa ff ff 48 8d 48 ff e9 2c fe ff ff 48 c7 c6 00 eb 21 83 48 89 cf e8 fc 25 8a ff <0f> 0b 48 b8 00 00 00 00 00 fc ff df 4c 8b 74 24 68 44 8b 5c 24 30
[ 1.533633][ T1] RSP: 0000:ffff8880060f6e40 EFLAGS: 00010286
[ 1.533847][ T1] RAX: 000000000000005c RBX: ffffea0001b39234 RCX: 0000000000000000
[ 1.534054][ T1] RDX: 000000000000005c RSI: 0000000000000004 RDI: ffffed1000c1edbb
[ 1.534261][ T1] RBP: dffffc0000000000 R08: 0000000000000000 R09: fffffbfff0718ce0
[ 1.534459][ T1] R10: 0000000000000003 R11: 0000000000000001 R12: ffff88800950f420
[ 1.534668][ T1] R13: ffff88800aba0c00 R14: 0000000000000002 R15: 0000000000001000
[ 1.534878][ T1] FS: 0000000000000000(0000) GS:ffff88806d000000(0000) knlGS:0000000000000000
[ 1.535129][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1.535309][ T1] CR2: 0000000000000000 CR3: 0000000003881001 CR4: 0000000000370eb0
[ 1.535517][ T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 1.535734][ T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 1.535953][ T1] ------------[ cut here ]------------
>
> David
>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [GIT PULL] vfs netfs
@ 2024-11-15 14:00 Christian Brauner
2024-11-18 18:29 ` Linus Torvalds
2024-11-18 19:49 ` pr-tracker-bot
0 siblings, 2 replies; 21+ messages in thread
From: Christian Brauner @ 2024-11-15 14:00 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
A pidfs patch ended up in the branch and I didn't notice it. I decided
to leave it in here instead of rebasing the whole branch.
/* Summary */
This contains various fixes for the netfs library and related
filesystems and infrastructure:
afs:
- Fix missing wire-up of afs_retry_request().
- Fix the setting of the server responding flag in afs.
- Fix possible infinite loop with unresponsive servers.
- Remove unused struct and function prototype.
cachefiles:
- Fix a dentry leak in cachefiles_open_file().
- Fix incorrect length return value in cachefiles_ondemand_fd_write_iter().
- Fix missing pos updates in cachefiles_ondemand_fd_write_iter().
- Clean up in cachefiles_commit_tmpfile().
- Fix NULL pointer dereference in object->file.
- Add a memory barrier for FSCACHE_VOLUME_CREATING.
netfs:
- Advance iterator correctly rather than jumping it.
- Add folio_queue API documentation.
- Fix the netfs_folio tracepoint to handle NULL mapping.
- Remove call to folio_index().
- Fix a few minor bugs in netfs_page_mkwrite().
- Remove unnecessary references to pages.
pidfs:
- Check for valid pid namespace.
/* Testing */
gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)
All patches are based on v6.12-rc1 and have been sitting in linux-next.
No build failures or warnings were observed.
/* Conflicts */
Merge conflicts with mainline
=============================
No known conflicts.
Merge conflicts with other trees
================================
No known conflicts.
The following changes since commit 9852d85ec9d492ebef56dc5f229416c925758edc:
Linux 6.12-rc1 (2024-09-29 15:06:19 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.netfs
for you to fetch changes up to a4b2923376be062a243ac38762212a38485cfab1:
Merge patch series "fscache/cachefiles: Some bugfixes" (2024-11-11 14:39:39 +0100)
Please consider pulling these changes from the signed vfs-6.13.netfs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.13.netfs
----------------------------------------------------------------
Baokun Li (1):
cachefiles: fix dentry leak in cachefiles_open_file()
Christian Brauner (3):
pidfs: check for valid pid namespace
Merge patch series "Random netfs folio fixes"
Merge patch series "fscache/cachefiles: Some bugfixes"
David Howells (5):
afs: Fix missing wire-up of afs_retry_request()
afs: Fix the setting of the server responding flag
netfs: Advance iterator correctly rather than jumping it
netfs: Add folio_queue API documentation
netfs: Fix the netfs_folio tracepoint to handle NULL mapping
Marc Dionne (1):
afs: Fix possible infinite loop with unresponsive servers
Matthew Wilcox (Oracle) (3):
netfs: Remove call to folio_index()
netfs: Fix a few minor bugs in netfs_page_mkwrite()
netfs: Remove unnecessary references to pages
Thorsten Blum (1):
afs: Remove unused struct and function prototype
Zizhi Wo (5):
cachefiles: Fix incorrect length return value in cachefiles_ondemand_fd_write_iter()
cachefiles: Fix missing pos updates in cachefiles_ondemand_fd_write_iter()
cachefiles: Clean up in cachefiles_commit_tmpfile()
cachefiles: Fix NULL pointer dereference in object->file
netfs/fscache: Add a memory barrier for FSCACHE_VOLUME_CREATING
Documentation/core-api/folio_queue.rst | 212 +++++++++++++++++++++++++++++++++
fs/afs/afs_vl.h | 9 --
fs/afs/file.c | 1 +
fs/afs/fs_operation.c | 2 +-
fs/afs/fs_probe.c | 4 +-
fs/afs/rotate.c | 11 +-
fs/cachefiles/interface.c | 14 ++-
fs/cachefiles/namei.c | 12 +-
fs/cachefiles/ondemand.c | 38 ++++--
fs/netfs/buffered_read.c | 8 +-
fs/netfs/buffered_write.c | 41 ++++---
fs/netfs/fscache_volume.c | 3 +-
fs/netfs/write_issue.c | 12 +-
fs/pidfs.c | 5 +-
include/linux/folio_queue.h | 168 ++++++++++++++++++++++++++
include/trace/events/netfs.h | 5 +-
16 files changed, 475 insertions(+), 70 deletions(-)
create mode 100644 Documentation/core-api/folio_queue.rst
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-11-15 14:00 Christian Brauner
@ 2024-11-18 18:29 ` Linus Torvalds
2024-11-20 8:49 ` Christian Brauner
2024-11-18 19:49 ` pr-tracker-bot
1 sibling, 1 reply; 21+ messages in thread
From: Linus Torvalds @ 2024-11-18 18:29 UTC (permalink / raw)
To: Christian Brauner; +Cc: linux-fsdevel, linux-kernel
On Fri, 15 Nov 2024 at 06:00, Christian Brauner <brauner@kernel.org> wrote:
>
> A pidfs patch ended up in the branch and I didn't notice it. I decided
> to leave it in here instead of rebasing the whole branch.
What happened here?
Not only isn't there a pidfs patch in here, it also doesn't have the
afs patches you claim it has, because all of those came in long ago in
commit a5f24c795513: "Pull vfs fixes from Christian Brauner".
So I've pulled this, but your pull request was all wonky because you
used some odd base commit.
Linus
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-11-15 14:00 Christian Brauner
2024-11-18 18:29 ` Linus Torvalds
@ 2024-11-18 19:49 ` pr-tracker-bot
1 sibling, 0 replies; 21+ messages in thread
From: pr-tracker-bot @ 2024-11-18 19:49 UTC (permalink / raw)
To: Christian Brauner
Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Fri, 15 Nov 2024 15:00:21 +0100:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.13.netfs
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/8dcf44fcad5ef5c1ff915628255c19cbe91f2588
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-11-18 18:29 ` Linus Torvalds
@ 2024-11-20 8:49 ` Christian Brauner
2024-11-20 17:09 ` Linus Torvalds
0 siblings, 1 reply; 21+ messages in thread
From: Christian Brauner @ 2024-11-20 8:49 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-fsdevel, linux-kernel
On Mon, Nov 18, 2024 at 10:29:42AM -0800, Linus Torvalds wrote:
> On Fri, 15 Nov 2024 at 06:00, Christian Brauner <brauner@kernel.org> wrote:
> >
> > A pidfs patch ended up in the branch and I didn't notice it. I decided
> > to leave it in here instead of rebasing the whole branch.
>
> What happened here?
The base of the branch is definitely v6.12-rc1. The branch is simply
vfs.netfs with vfs-6.13.netfs tag. And the branch looks perfectly fine.
I think the issue was that I sent you the fixes tag you mention below
that contained some fixes that were in vfs.netfs. So afterwards I just
didn't rebase vfs.netfs but merged two other series on top of it with
v6.12-rc1 as parent. And I think that might've somehow confused the git
request-pull call.
Rebasing would've been the cleaner thing here since I had a long time
until the merge window. But other than that it doesn't look like I did
something that was actively wrong? But I might just be missing
something.
>
> Not only isn't there a pidfs patch in here, it also doesn't have the
> afs patches you claim it has, because all of those came in long ago in
> commit a5f24c795513: "Pull vfs fixes from Christian Brauner".
>
> So I've pulled this, but your pull request was all wonky because you
> used some odd base commit.
>
> Linus
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-11-20 8:49 ` Christian Brauner
@ 2024-11-20 17:09 ` Linus Torvalds
2024-11-20 19:53 ` Christian Brauner
0 siblings, 1 reply; 21+ messages in thread
From: Linus Torvalds @ 2024-11-20 17:09 UTC (permalink / raw)
To: Christian Brauner; +Cc: linux-fsdevel, linux-kernel
On Wed, 20 Nov 2024 at 00:49, Christian Brauner <brauner@kernel.org> wrote:
>
> The base of the branch is definitely v6.12-rc1. The branch is simply
> vfs.netfs with vfs-6.13.netfs tag. And the branch looks perfectly fine.
The branch looks fine, it was just the pull request that contained old
stale commits that you had already sent me.
> I think the issue was that I sent you the fixes tag you mention below
> that contained some fixes that were in vfs.netfs. So afterwards I just
> didn't rebase vfs.netfs but merged two other series on top of it with
> v6.12-rc1 as parent. And I think that might've somehow confused the git
> request-pull call.
Oh, you shouldn't rebase. But it also sounds like you are actually
tracking the bases for your branches manually. You shouldn't do that
either.
All you need to do is fetch from upstream, so that git sees what I
have, and then when you do the pull request, you tell it not the base
of the branch, but just what upstream has. git will then figure out
the base from that.
Linus
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2024-11-20 17:09 ` Linus Torvalds
@ 2024-11-20 19:53 ` Christian Brauner
0 siblings, 0 replies; 21+ messages in thread
From: Christian Brauner @ 2024-11-20 19:53 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-fsdevel, linux-kernel
On Wed, Nov 20, 2024 at 09:09:44AM -0800, Linus Torvalds wrote:
> On Wed, 20 Nov 2024 at 00:49, Christian Brauner <brauner@kernel.org> wrote:
> >
> > The base of the branch is definitely v6.12-rc1. The branch is simply
> > vfs.netfs with vfs-6.13.netfs tag. And the branch looks perfectly fine.
>
> The branch looks fine, it was just the pull request that contained old
> stale commits that you had already sent me.
>
> > I think the issue was that I sent you the fixes tag you mention below
> > that contained some fixes that were in vfs.netfs. So afterwards I just
> > didn't rebase vfs.netfs but merged two other series on top of it with
> > v6.12-rc1 as parent. And I think that might've somehow confused the git
> > request-pull call.
>
> Oh, you shouldn't rebase. But it also sounds like you are actually
I don't as I'm well aware how much you dislike that. Here I had a bunch
of fixes and I usually carry them on a separate branch and have another
feature branch for new stuff. But in this case I ended up using the
branch for some hot fixes instead of carrying them on the separate
vfs.fixes branch. But when I pulled in the features I should have
reset/rebased the branch.
> tracking the bases for your branches manually. You shouldn't do that
> either.
>
> All you need to do is fetch from upstream, so that git sees what I
> have, and then when you do the pull request, you tell it not the base
> of the branch, but just what upstream has. git will then figure out
> the base from that.
Yeah, that's what I do. I do a git fetch upstream and then just point
git request-pull to that and then things work fine.
Anyway, thanks for pointing it out and sorry for the confusion.
^ permalink raw reply [flat|nested] 21+ messages in thread
* [GIT PULL] vfs netfs
@ 2025-01-18 12:55 Christian Brauner
2025-01-20 18:59 ` pr-tracker-bot
0 siblings, 1 reply; 21+ messages in thread
From: Christian Brauner @ 2025-01-18 12:55 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
/* Summary */
This contains read performance improvements and support for monolithic
single-blob objects that have to be read/written as such (e.g. AFS
directory contents). The implementation of the two parts is interwoven
as each makes the other possible.
- Read performance improvements
The read performance improvements are intended to speed up some loss
of performance detected in cifs and to a lesser extend in afs. The
problem is that we queue too many work items during the collection of
read results: each individual subrequest is collected by its own work
item, and then they have to interact with each other when a series of
subrequests don't exactly align with the pattern of folios that are
being read by the overall request.
Whilst the processing of the pages covered by individual subrequests
as they complete potentially allows folios to be woken in parallel and
with minimum delay, it can shuffle wakeups for sequential reads out of
order - and that is the most common I/O pattern.
The final assessment and cleanup of an operation is then held up until
the last I/O completes - and for a synchronous sequential operation,
this means the bouncing around of work items just adds latency.
Two changes have been made to make this work:
(1) All collection is now done in a single "work item" that works
progressively through the subrequests as they complete (and also
dispatches retries as necessary).
(2) For readahead and AIO, this work item be done on a workqueue and
can run in parallel with the ultimate consumer of the data; for
synchronous direct or unbuffered reads, the collection is run in
the application thread and not offloaded.
Functions such as smb2_readv_callback() then just tell netfslib that
the subrequest has terminated; netfslib does a minimal bit of
processing on the spot - stat counting and tracing mostly - and then
queues/wakes up the worker. This simplifies the logic as the
collector just walks sequentially through the subrequests as they
complete and walks through the folios, if buffered, unlocking them as
it goes. It also keeps to a minimum the amount of latency injected
into the filesystem's low-level I/O handling
The way netfs supports filesystems using the deprecated PG_private_2
flag is changed: folios are flagged and added to a write request as
they complete and that takes care of scheduling the writes to the
cache. The originating read request can then just unlock the pages
whatever happens.
- Single-blob object support
Single-blob objects are files for which the content of the file must
be read from or written to the server in a single operation because
reading them in parts may yield inconsistent results. AFS directories
are an example of this as there exists the possibility that the
contents are generated on the fly and would differ between reads or
might change due to third party interference.
Such objects will be written to and retrieved from the cache if one is
present, though we allow/may need to propose multiple subrequests to
do so. The important part is that read from/write to the *server* is
monolithic.
Single blob reading is, for the moment, fully synchronous and does
result collection in the application thread and, also for the moment,
the API is supplied the buffer in the form of a folio_queue chain
rather than using the pagecache.
- Related afs changes
This series makes a number of changes to the kafs filesystem,
primarily in the area of directory handling:
- AFS's FetchData RPC reply processing is made partially asynchronous
which allows the netfs_io_request's outstanding operation counter to
be removed as part of reducing the collection to a single work item.
- Directory and symlink reading are plumbed through netfslib using the
single-blob object API and are now cacheable with fscache. This also
allows the afs_read struct to be eliminated and netfs_io_subrequest
to be used directly instead.
- Directory and symlink content are now stored in a folio_queue buffer
rather than in the pagecache. This means we don't require the RCU
read lock and xarray iteration to access it, and folios won't
randomly disappear under us because the VM wants them back.
- The vnode operation lock is changed from a mutex struct to a private
lock implementation. The problem is that the lock now needs to be
dropped in a separate thread and mutexes don't permit that.
- When a new directory or symlink is created, we now initialise it
locally and mark it valid rather than downloading it (we know what
it's likely to look like).
- We now use the in-directory hashtable to reduce the number of
entries we need to scan when doing a lookup. The edit routines have
to maintain the hash chains.
- Cancellation (e.g. by signal) of an async call after the rxrpc_call
has been set up is now offloaded to the worker thread as there will
be a notification from rxrpc upon completion. This avoids a double
cleanup.
- A "rolling buffer" implementation is created to abstract out the two
separate folio_queue chaining implementations I had (one for read and
one for write).
- Functions are provided to create/extend a buffer in a folio_queue
chain and tear it down again. This is used to handle AFS directories,
but could also be used to create bounce buffers for content crypto and
transport crypto.
- The was_async argument is dropped from netfs_read_subreq_terminated().
Instead we wake the read collection work item by either queuing it or
waking up the app thread.
- We don't need to use BH-excluding locks when communicating between the
issuing thread and the collection thread as neither of them now run in
BH context.
- Also included are a number of new tracepoints; a split of the netfslib
write collection code to put retrying into its own file (it gets more
complicated with content encryption).
- There are also some minor fixes AFS included, including fixing the AFS
directory format struct layout, reducing some directory
over-invalidation and making afs_mkdir() translate EEXIST to ENOTEMPY
(which is not available on all systems the servers support).
- Finally, there's a patch to try and detect entry into the folio unlock
function with no folio_queue structs in the buffer (which isn't
allowed in the cases that can get there). This is a debugging patch,
but should be minimal overhead.
/* Testing */
gcc version 14.2.0 (Debian 14.2.0-6)
Debian clang version 16.0.6 (27+b1)
No build failures or warnings were observed.
/* Conflicts */
Merge conflicts with mainline
=============================
There's a merge conflict that can be resolved as follows:
diff --cc fs/netfs/direct_write.c
index f9421f3e6d37,eded8afaa60b..000000000000
--- a/fs/netfs/direct_write.c
+++ b/fs/netfs/direct_write.c
@@@ -67,8 -67,8 +67,8 @@@ ssize_t netfs_unbuffered_write_iter_loc
* allocate a sufficiently large bvec array and may shorten the
* request.
*/
- if (async || user_backed_iter(iter)) {
+ if (user_backed_iter(iter)) {
- n = netfs_extract_user_iter(iter, len, &wreq->iter, 0);
+ n = netfs_extract_user_iter(iter, len, &wreq->buffer.iter, 0);
if (n < 0) {
ret = n;
goto out;
@@@ -77,15 -77,8 +77,13 @@@
wreq->direct_bv_count = n;
wreq->direct_bv_unpin = iov_iter_extract_will_pin(iter);
} else {
+ /* If this is a kernel-generated async DIO request,
+ * assume that any resources the iterator points to
+ * (eg. a bio_vec array) will persist till the end of
+ * the op.
+ */
- wreq->iter = *iter;
+ wreq->buffer.iter = *iter;
}
-
- wreq->io_iter = wreq->iter;
}
__set_bit(NETFS_RREQ_USE_IO_ITER, &wreq->flags);
diff --cc fs/netfs/read_retry.c
index 16b676c68dcd,bf6f26525b0d..000000000000
--- a/fs/netfs/read_retry.c
+++ b/fs/netfs/read_retry.c
@@@ -142,25 -125,19 +125,20 @@@ static void netfs_retry_read_subrequest
__clear_bit(NETFS_SREQ_MADE_PROGRESS, &subreq->flags);
subreq->retry_count++;
- spin_lock_bh(&rreq->lock);
- list_add_tail(&subreq->rreq_link, &rreq->subrequests);
- subreq->prev_donated += rreq->prev_donated;
- rreq->prev_donated = 0;
trace_netfs_sreq(subreq, netfs_sreq_trace_retry);
- spin_unlock_bh(&rreq->lock);
-
- BUG_ON(!len);
/* Renegotiate max_len (rsize) */
+ stream->sreq_max_len = subreq->len;
- if (rreq->netfs_ops->prepare_read(subreq) < 0) {
+ if (rreq->netfs_ops->prepare_read &&
+ rreq->netfs_ops->prepare_read(subreq) < 0) {
trace_netfs_sreq(subreq, netfs_sreq_trace_reprep_failed);
__set_bit(NETFS_SREQ_FAILED, &subreq->flags);
+ goto abandon;
}
- part = umin(len, stream0->sreq_max_len);
- if (unlikely(rreq->io_streams[0].sreq_max_segs))
- part = netfs_limit_iter(&source, 0, part, stream0->sreq_max_segs);
+ part = umin(len, stream->sreq_max_len);
+ if (unlikely(stream->sreq_max_segs))
+ part = netfs_limit_iter(&source, 0, part, stream->sreq_max_segs);
subreq->len = subreq->transferred + part;
subreq->io_iter = source;
iov_iter_truncate(&subreq->io_iter, part);
Merge conflicts with other trees
================================
No known conflicts.
The following changes since commit 5fe85a5c513344161cde33b79f8badc81b8aa8d3:
Merge patch series "netfs, ceph, nfs, cachefiles: Miscellaneous fixes/changes" (2024-12-20 22:08:16 +0100)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.14-rc1.netfs
for you to fetch changes up to 7a47db23a9f003614e15c687d2a5425c175a9ca8:
Merge patch series "netfs: Read performance improvements and "single-blob" support" (2024-12-20 22:34:18 +0100)
Please consider pulling these changes from the signed vfs-6.14-rc1.netfs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.14-rc1.netfs
----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "netfs: Read performance improvements and "single-blob" support"
David Howells (31):
netfs: Clean up some whitespace in trace header
cachefiles: Clean up some whitespace in trace header
netfs: Use a folio_queue allocation and free functions
netfs: Add a tracepoint to log the lifespan of folio_queue structs
netfs: Abstract out a rolling folio buffer implementation
netfs: Make netfs_advance_write() return size_t
netfs: Split retry code out of fs/netfs/write_collect.c
netfs: Drop the error arg from netfs_read_subreq_terminated()
netfs: Drop the was_async arg from netfs_read_subreq_terminated()
netfs: Don't use bh spinlock
afs: Don't use mutex for I/O operation lock
afs: Fix EEXIST error returned from afs_rmdir() to be ENOTEMPTY
afs: Fix directory format encoding struct
netfs: Remove some extraneous directory invalidations
cachefiles: Add some subrequest tracepoints
cachefiles: Add auxiliary data trace
afs: Add more tracepoints to do with tracking validity
netfs: Add functions to build/clean a buffer in a folio_queue
netfs: Add support for caching single monolithic objects such as AFS dirs
afs: Make afs_init_request() get a key if not given a file
afs: Use netfslib for directories
afs: Use netfslib for symlinks, allowing them to be cached
afs: Eliminate afs_read
afs: Fix cleanup of immediately failed async calls
afs: Make {Y,}FS.FetchData an asynchronous operation
netfs: Change the read result collector to only use one work item
afs: Make afs_mkdir() locally initialise a new directory's content
afs: Use the contained hashtable to search a directory
afs: Locally initialise the contents of a new symlink on creation
afs: Add a tracepoint for afs_read_receive()
netfs: Report on NULL folioq in netfs_writeback_unlock_folios()
fs/9p/vfs_addr.c | 6 +-
fs/afs/Makefile | 1 +
fs/afs/callback.c | 4 +-
fs/afs/dir.c | 809 ++++++++++++++++++++------------------
fs/afs/dir_edit.c | 383 ++++++++++--------
fs/afs/dir_search.c | 227 +++++++++++
fs/afs/file.c | 260 ++++++------
fs/afs/fs_operation.c | 113 +++++-
fs/afs/fsclient.c | 62 +--
fs/afs/inode.c | 140 ++++++-
fs/afs/internal.h | 143 +++++--
fs/afs/main.c | 2 +-
fs/afs/mntpt.c | 22 +-
fs/afs/rotate.c | 4 +-
fs/afs/rxrpc.c | 37 +-
fs/afs/super.c | 4 +-
fs/afs/validation.c | 31 +-
fs/afs/vlclient.c | 1 +
fs/afs/write.c | 16 +-
fs/afs/xdr_fs.h | 2 +-
fs/afs/yfsclient.c | 49 +--
fs/cachefiles/io.c | 4 +
fs/cachefiles/xattr.c | 9 +-
fs/ceph/addr.c | 22 +-
fs/netfs/Makefile | 5 +-
fs/netfs/buffered_read.c | 290 +++++---------
fs/netfs/direct_read.c | 78 ++--
fs/netfs/direct_write.c | 10 +-
fs/netfs/internal.h | 41 +-
fs/netfs/main.c | 6 +-
fs/netfs/misc.c | 164 ++++----
fs/netfs/objects.c | 21 +-
fs/netfs/read_collect.c | 761 +++++++++++++++++++++--------------
fs/netfs/read_pgpriv2.c | 207 ++++------
fs/netfs/read_retry.c | 209 +++++-----
fs/netfs/read_single.c | 195 +++++++++
fs/netfs/rolling_buffer.c | 226 +++++++++++
fs/netfs/stats.c | 4 +-
fs/netfs/write_collect.c | 281 +++----------
fs/netfs/write_issue.c | 241 +++++++++++-
fs/netfs/write_retry.c | 232 +++++++++++
fs/nfs/fscache.c | 6 +-
fs/nfs/fscache.h | 3 +-
fs/smb/client/cifssmb.c | 12 +-
fs/smb/client/file.c | 3 +-
fs/smb/client/smb2ops.c | 2 +-
fs/smb/client/smb2pdu.c | 15 +-
include/linux/folio_queue.h | 12 +-
include/linux/netfs.h | 54 ++-
include/linux/rolling_buffer.h | 61 +++
include/trace/events/afs.h | 210 +++++++++-
include/trace/events/cachefiles.h | 185 ++++-----
include/trace/events/netfs.h | 229 +++++------
lib/kunit_iov_iter.c | 4 +-
54 files changed, 3911 insertions(+), 2207 deletions(-)
create mode 100644 fs/afs/dir_search.c
create mode 100644 fs/netfs/read_single.c
create mode 100644 fs/netfs/rolling_buffer.c
create mode 100644 fs/netfs/write_retry.c
create mode 100644 include/linux/rolling_buffer.h
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2025-01-18 12:55 Christian Brauner
@ 2025-01-20 18:59 ` pr-tracker-bot
0 siblings, 0 replies; 21+ messages in thread
From: pr-tracker-bot @ 2025-01-20 18:59 UTC (permalink / raw)
To: Christian Brauner
Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Sat, 18 Jan 2025 13:55:28 +0100:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.14-rc1.netfs
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/ca56a74a31e26d81a481304ed2f631e65883372b
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 21+ messages in thread
* [GIT PULL] vfs netfs
@ 2025-06-02 10:11 Christian Brauner
2025-06-02 22:58 ` pr-tracker-bot
0 siblings, 1 reply; 21+ messages in thread
From: Christian Brauner @ 2025-06-02 10:11 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Christian Brauner, linux-fsdevel, linux-kernel
Hey Linus,
A quick word on the general timing for netfs pull requests going
forward. In contrast to most of the other work I tend to send the netfs
updates a little later and will probably continue to do so in the
future. In the past we had some issues with late-stage fixes or there
were complicated merge conflicts with other trees or mainline that were
a little unusal. So since there's more jitter in how consistently this
tree can be carried through a cycle I'm letting this reflect in the pull
request timing as well.
/* Summary */
This contains the netfs updates for this cycle:
- The main API document has been extensively updated/rewritten.
- Fix an oops in write-retry due to mis-resetting the I/O iterator.
- Fix the recording of transferred bytes for short DIO reads.
- Fix a request's work item to not require a reference, thereby avoiding
the need to get rid of it in BH/IRQ context.
- Fix waiting and waking to be consistent about the waitqueue used.
- Remove NETFS_SREQ_SEEK_DATA_READ.
- Remove NETFS_INVALID_WRITE.
- Remove NETFS_ICTX_WRITETHROUGH.
- Remove NETFS_READ_HOLE_CLEAR.
- Reorder structs to eliminate holes.
- Remove netfs_io_request::ractl.
- Only provide proc_link field if CONFIG_PROC_FS=y.
- Remove folio_queue::marks3.
- Remove NETFS_RREQ_DONT_UNLOCK_FOLIOS.
- Remove NETFS_RREQ_BLOCKED.
- Fix undifferentiation of DIO reads from unbuffered reads.
generally sent
after vfs-6.16-rc1.misc
/* Testing */
gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3)
No build failures or warnings were observed.
/* Conflicts */
Merge conflicts with mainline
=============================
No known conflicts.
Merge conflicts with other trees
================================
No known conflicts.
The following changes since commit f1745496d3fba34a2e16ef47d78903d7208c1214:
netfs: Update main API document (2025-04-11 15:23:50 +0200)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.16-rc1.netfs
for you to fetch changes up to db26d62d79e4068934ad0dccdb92715df36352b9:
netfs: Fix undifferentiation of DIO reads from unbuffered reads (2025-05-23 10:35:03 +0200)
Please consider pulling these changes from the signed vfs-6.16-rc1.netfs tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.16-rc1.netfs
----------------------------------------------------------------
Christian Brauner (3):
Merge netfs API documentation updates
Merge patch series "netfs: Miscellaneous cleanups"
Merge patch series "netfs: Miscellaneous fixes"
David Howells (4):
netfs: Fix oops in write-retry from mis-resetting the subreq iterator
netfs: Fix the request's work item to not require a ref
netfs: Fix wait/wake to be consistent about the waitqueue used
netfs: Fix undifferentiation of DIO reads from unbuffered reads
Max Kellermann (10):
fs/netfs: remove unused flag NETFS_SREQ_SEEK_DATA_READ
fs/netfs: remove unused source NETFS_INVALID_WRITE
fs/netfs: remove unused flag NETFS_ICTX_WRITETHROUGH
fs/netfs: remove unused enum choice NETFS_READ_HOLE_CLEAR
fs/netfs: reorder struct fields to eliminate holes
fs/netfs: remove `netfs_io_request.ractl`
fs/netfs: declare field `proc_link` only if CONFIG_PROC_FS=y
folio_queue: remove unused field `marks3`
fs/netfs: remove unused flag NETFS_RREQ_DONT_UNLOCK_FOLIOS
fs/netfs: remove unused flag NETFS_RREQ_BLOCKED
Paulo Alcantara (1):
netfs: Fix setting of transferred bytes with short DIO reads
Documentation/core-api/folio_queue.rst | 3 -
Documentation/filesystems/netfs_library.rst | 5 -
fs/9p/vfs_addr.c | 5 +-
fs/afs/write.c | 9 +-
fs/cachefiles/io.c | 16 +-
fs/ceph/addr.c | 6 +-
fs/erofs/fscache.c | 6 +-
fs/netfs/buffered_read.c | 56 ++++---
fs/netfs/buffered_write.c | 5 +-
fs/netfs/direct_read.c | 16 +-
fs/netfs/direct_write.c | 12 +-
fs/netfs/fscache_io.c | 10 +-
fs/netfs/internal.h | 42 ++++--
fs/netfs/main.c | 1 +
fs/netfs/misc.c | 219 ++++++++++++++++++++++++++++
fs/netfs/objects.c | 48 +++---
fs/netfs/read_collect.c | 199 +++++--------------------
fs/netfs/read_pgpriv2.c | 4 +-
fs/netfs/read_retry.c | 26 +---
fs/netfs/read_single.c | 6 +-
fs/netfs/write_collect.c | 83 ++++-------
fs/netfs/write_issue.c | 38 ++---
fs/netfs/write_retry.c | 19 +--
fs/nfs/fscache.c | 1 +
fs/smb/client/cifsproto.h | 3 +-
fs/smb/client/cifssmb.c | 4 +-
fs/smb/client/file.c | 10 +-
fs/smb/client/smb2pdu.c | 4 +-
include/linux/folio_queue.h | 42 ------
include/linux/fscache.h | 5 +-
include/linux/netfs.h | 45 +++---
include/trace/events/netfs.h | 11 +-
net/9p/client.c | 6 +-
33 files changed, 478 insertions(+), 487 deletions(-)
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [GIT PULL] vfs netfs
2025-06-02 10:11 [GIT PULL] vfs netfs Christian Brauner
@ 2025-06-02 22:58 ` pr-tracker-bot
0 siblings, 0 replies; 21+ messages in thread
From: pr-tracker-bot @ 2025-06-02 22:58 UTC (permalink / raw)
To: Christian Brauner
Cc: Linus Torvalds, Christian Brauner, linux-fsdevel, linux-kernel
The pull request you sent on Mon, 2 Jun 2025 12:11:31 +0200:
> git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.16-rc1.netfs
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/0fb34422b5c2237e0de41980628b023252912108
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2025-06-02 22:57 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-02 10:11 [GIT PULL] vfs netfs Christian Brauner
2025-06-02 22:58 ` pr-tracker-bot
-- strict thread matches above, loose matches on Subject: below --
2025-01-18 12:55 Christian Brauner
2025-01-20 18:59 ` pr-tracker-bot
2024-11-15 14:00 Christian Brauner
2024-11-18 18:29 ` Linus Torvalds
2024-11-20 8:49 ` Christian Brauner
2024-11-20 17:09 ` Linus Torvalds
2024-11-20 19:53 ` Christian Brauner
2024-11-18 19:49 ` pr-tracker-bot
2024-09-13 16:56 Christian Brauner
2024-09-16 10:28 ` Linus Torvalds
2024-09-16 11:09 ` pr-tracker-bot
2024-09-16 12:58 ` David Howells
2024-09-26 17:40 ` Leon Romanovsky
2024-09-27 8:01 ` David Howells
2024-09-27 16:34 ` Leon Romanovsky
2024-09-27 20:31 ` David Howells
2024-09-28 10:11 ` Leon Romanovsky
2024-05-10 11:47 Christian Brauner
2024-05-13 19:38 ` pr-tracker-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).