* [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs
@ 2025-02-25 22:25 David Howells
2025-02-25 22:35 ` Paulo Alcantara
2025-02-25 22:38 ` Pali Rohár
0 siblings, 2 replies; 4+ messages in thread
From: David Howells @ 2025-02-25 22:25 UTC (permalink / raw)
To: Steve French, Jean-Christophe Guillain
Cc: dhowells, Pali Rohár, Paulo Alcantara, Jeff Layton,
Christian Brauner, linux-cifs, netfs, linux-fsdevel, linux-kernel
Fix cifs_readv_callback() to call netfs_read_subreq_terminated() rather
than queuing the subrequest work item (which is unset). Also call the
I/O progress tracepoint.
Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
Reported-by: Jean-Christophe Guillain <jean-christophe@guillain.net>
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219793
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Steve French <stfrench@microsoft.com>
cc: Pali Rohár <pali@kernel.org>
cc: Paulo Alcantara <pc@manguebit.com>
cc: Jeff Layton <jlayton@kernel.org>
cc: linux-cifs@vger.kernel.org
cc: netfs@lists.linux.dev
cc: linux-fsdevel@vger.kernel.org
---
fs/smb/client/cifssmb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
index 6a3e287eabfa..bf9acea53ccb 100644
--- a/fs/smb/client/cifssmb.c
+++ b/fs/smb/client/cifssmb.c
@@ -1338,7 +1338,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
rdata->credits.value = 0;
rdata->subreq.error = rdata->result;
rdata->subreq.transferred += rdata->got_bytes;
- queue_work(cifsiod_wq, &rdata->subreq.work);
+ trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
+ netfs_read_subreq_terminated(&rdata->subreq);
release_mid(mid);
add_credits(server, &credits, 0);
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs
2025-02-25 22:25 [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs David Howells
@ 2025-02-25 22:35 ` Paulo Alcantara
2025-02-25 22:38 ` Pali Rohár
1 sibling, 0 replies; 4+ messages in thread
From: Paulo Alcantara @ 2025-02-25 22:35 UTC (permalink / raw)
To: David Howells, Steve French, Jean-Christophe Guillain
Cc: dhowells, Pali Rohár, Jeff Layton, Christian Brauner,
linux-cifs, netfs, linux-fsdevel, linux-kernel
David Howells <dhowells@redhat.com> writes:
>
> Fix cifs_readv_callback() to call netfs_read_subreq_terminated() rather
> than queuing the subrequest work item (which is unset). Also call the
> I/O progress tracepoint.
>
> Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
> Reported-by: Jean-Christophe Guillain <jean-christophe@guillain.net>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219793
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Steve French <stfrench@microsoft.com>
> cc: Pali Rohár <pali@kernel.org>
> cc: Paulo Alcantara <pc@manguebit.com>
> cc: Jeff Layton <jlayton@kernel.org>
> cc: linux-cifs@vger.kernel.org
> cc: netfs@lists.linux.dev
> cc: linux-fsdevel@vger.kernel.org
> ---
> fs/smb/client/cifssmb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Paulo Alcantara (Red Hat) <pc@manguebit.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs
2025-02-25 22:25 [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs David Howells
2025-02-25 22:35 ` Paulo Alcantara
@ 2025-02-25 22:38 ` Pali Rohár
2025-02-25 22:55 ` Steve French
1 sibling, 1 reply; 4+ messages in thread
From: Pali Rohár @ 2025-02-25 22:38 UTC (permalink / raw)
To: David Howells
Cc: Steve French, Jean-Christophe Guillain, Paulo Alcantara,
Jeff Layton, Christian Brauner, linux-cifs, netfs, linux-fsdevel,
linux-kernel
On Tuesday 25 February 2025 22:25:00 David Howells wrote:
>
> Fix cifs_readv_callback() to call netfs_read_subreq_terminated() rather
> than queuing the subrequest work item (which is unset). Also call the
> I/O progress tracepoint.
>
> Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
> Reported-by: Jean-Christophe Guillain <jean-christophe@guillain.net>
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219793
> Signed-off-by: David Howells <dhowells@redhat.com>
> cc: Steve French <stfrench@microsoft.com>
> cc: Pali Rohár <pali@kernel.org>
> cc: Paulo Alcantara <pc@manguebit.com>
> cc: Jeff Layton <jlayton@kernel.org>
> cc: linux-cifs@vger.kernel.org
> cc: netfs@lists.linux.dev
> cc: linux-fsdevel@vger.kernel.org
Thanks! With this change, I cannot reproduce crash anymore.
Tested-by: Pali Rohár <pali@kernel.org>
Steve, could you please include this fix into some queue? This should be
merged into next -rc.
> ---
> fs/smb/client/cifssmb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
> index 6a3e287eabfa..bf9acea53ccb 100644
> --- a/fs/smb/client/cifssmb.c
> +++ b/fs/smb/client/cifssmb.c
> @@ -1338,7 +1338,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
> rdata->credits.value = 0;
> rdata->subreq.error = rdata->result;
> rdata->subreq.transferred += rdata->got_bytes;
> - queue_work(cifsiod_wq, &rdata->subreq.work);
> + trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
> + netfs_read_subreq_terminated(&rdata->subreq);
> release_mid(mid);
> add_credits(server, &credits, 0);
> }
>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs
2025-02-25 22:38 ` Pali Rohár
@ 2025-02-25 22:55 ` Steve French
0 siblings, 0 replies; 4+ messages in thread
From: Steve French @ 2025-02-25 22:55 UTC (permalink / raw)
To: Pali Rohár
Cc: David Howells, Steve French, Jean-Christophe Guillain,
Paulo Alcantara, Jeff Layton, Christian Brauner, linux-cifs,
netfs, linux-fsdevel, linux-kernel
Thanks for the quick fix and reviews/testing. Merged into
cifs-2.6.git for-next. Will run some additional tests on it tonight
On Tue, Feb 25, 2025 at 4:38 PM Pali Rohár <pali@kernel.org> wrote:
>
> On Tuesday 25 February 2025 22:25:00 David Howells wrote:
> >
> > Fix cifs_readv_callback() to call netfs_read_subreq_terminated() rather
> > than queuing the subrequest work item (which is unset). Also call the
> > I/O progress tracepoint.
> >
> > Fixes: e2d46f2ec332 ("netfs: Change the read result collector to only use one work item")
> > Reported-by: Jean-Christophe Guillain <jean-christophe@guillain.net>
> > Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219793
> > Signed-off-by: David Howells <dhowells@redhat.com>
> > cc: Steve French <stfrench@microsoft.com>
> > cc: Pali Rohár <pali@kernel.org>
> > cc: Paulo Alcantara <pc@manguebit.com>
> > cc: Jeff Layton <jlayton@kernel.org>
> > cc: linux-cifs@vger.kernel.org
> > cc: netfs@lists.linux.dev
> > cc: linux-fsdevel@vger.kernel.org
>
> Thanks! With this change, I cannot reproduce crash anymore.
>
> Tested-by: Pali Rohár <pali@kernel.org>
>
> Steve, could you please include this fix into some queue? This should be
> merged into next -rc.
>
> > ---
> > fs/smb/client/cifssmb.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/fs/smb/client/cifssmb.c b/fs/smb/client/cifssmb.c
> > index 6a3e287eabfa..bf9acea53ccb 100644
> > --- a/fs/smb/client/cifssmb.c
> > +++ b/fs/smb/client/cifssmb.c
> > @@ -1338,7 +1338,8 @@ cifs_readv_callback(struct mid_q_entry *mid)
> > rdata->credits.value = 0;
> > rdata->subreq.error = rdata->result;
> > rdata->subreq.transferred += rdata->got_bytes;
> > - queue_work(cifsiod_wq, &rdata->subreq.work);
> > + trace_netfs_sreq(&rdata->subreq, netfs_sreq_trace_io_progress);
> > + netfs_read_subreq_terminated(&rdata->subreq);
> > release_mid(mid);
> > add_credits(server, &credits, 0);
> > }
> >
>
--
Thanks,
Steve
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-25 22:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25 22:25 [PATCH] cifs: Fix the smb1 readv callback to correctly call netfs David Howells
2025-02-25 22:35 ` Paulo Alcantara
2025-02-25 22:38 ` Pali Rohár
2025-02-25 22:55 ` Steve French
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.