linux-next: manual merge of the vfs-brauner tree with the cifs tree
Subsystems (3)
Hi all,
Today's linux-next merge of the vfs-brauner tree got a conflict in:
fs/smb/client/cifssmb.c
between commit:
a68c74865f51 ("cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3")
from the cifs tree and commit:
0fda1f8c6bf8 ("netfs: Speed up buffered reading")
from the vfs-brauner tree.
I fixed it up (I used the former as it is (supposedly) a much newer patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 13 lines · On Fri, 6 Sep 2024 08:46:37 +1000 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the vfs-brauner tree got a conflict in:
fs/smb/client/cifssmb.cbetween commit:
a68c74865f51("cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3")from the cifs tree and commit:
0fda1f8c6bf8("netfs: Speed up buffered reading")
Quoted 8 lines
from the vfs-brauner tree.
I fixed it up (I used the former as it is (supposedly) a much newer patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
The fixup ended up being as below.
Signature · 26 lines
Cheers,
Stephen Rothwell
diff --cc fs/smb/client/cifssmb.c
index cfae2e918209,04f2a5441a89..790b3f5ea64b
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@@ -1261,16 -1261,6 +1261,15 @@@ 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);
++ rdata->subreq.transferred += rdata->got_bytes;
++ netfs_read_subreq_terminated(&rdata->subreq, rdata->result, true);
+}
+
static void
cifs_readv_callback(struct mid_q_entry *mid)
{Hi all,
Quoted 43 lines · On Fri, 6 Sep 2024 09:38:21 +1000 Stephen Rothwell <[email protected]> wrote:
Quoted 13 lines · On Fri, 6 Sep 2024 08:46:37 +1000 Stephen Rothwell <[email protected]> wrote:
Today's linux-next merge of the vfs-brauner tree got a conflict in:
fs/smb/client/cifssmb.cbetween commit:
a68c74865f51("cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3")from the cifs tree and commit:
0fda1f8c6bf8("netfs: Speed up buffered reading")Quoted 8 lines
from the vfs-brauner tree.
I fixed it up (I used the former as it is (supposedly) a much newer patch) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
The fixup ended up being as below.
Signature · 2 lines
Cheers, Stephen Rothwellfs/smb/client/cifssmb.c +0
-0@@@ -1261,16 -1261,6 +1261,15 @@@ openRetryreturn rc; } +static void cifs_readv_worker(struct work_struct *work) +{ + struct cifs_io_subrequest *rdata = + container_of(work, struct cifs_io_subrequest, subreq.work); +
fs/smb/client/cifssmb.c
Quoted 10 lines
fs/smb/client/cifssmb.c +2
-3-netfs_subreq_terminated (&rdata->subreq, - (rdata->result ==0 || rdata->result == -EAGAIN ) ? - rdata->got_bytes : rdata->result, true); ++ rdata->subreq.transferred += rdata->got_bytes; ++netfs_read_subreq_terminated (&rdata->subreq, rdata->result, true); +} + static voidcifs_readv_callback (struct mid_q_entry *mid) {
Also this (which I will roll into the above merge resolution tomorrow):
From: Stephen Rothwell <[email protected]>
Date: Fri, 6 Sep 2024 11:39:25 +1000
Subject: [PATCH] fix up for "netfs: Speed up buffered reading"
interacting with "cifs: Fix SMB1 readv/writev callback in the same way as SMB2/3"
--- fs/smb/client/cifssmb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
fs/smb/client/cifssmb.c +3 -3
@@ -1326,9 +1326,9 @@ cifs_readv_callback(struct mid_q_entry *mid)__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 ; }
Signature · 5 lines
2.45.2 -- Cheers, Stephen Rothwell