* [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean
@ 2024-10-27 11:43 Christian Ebner
2024-11-06 5:59 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Christian Ebner @ 2024-10-27 11:43 UTC (permalink / raw)
To: dhowells, jlayton, stable
Cc: netfs, linux-fsdevel, linux-kernel, Christian Ebner
Fixes file corruption issues when reading contents via ceph client.
Call netfs_reset_subreq_iter() to align subreq->io_iter before
calling netfs_clear_unread() to clear tail, as subreq->io_iter count
and subreq->transferred might not be aligned after incomplete I/O,
having the subreq's NETFS_SREQ_CLEAR_TAIL set.
Based on ee4cdf7b ("netfs: Speed up buffered reading"), which
introduces a fix for the issue in mainline.
Fixes: 92b6cc5d ("netfs: Add iov_iters to (sub)requests to describe various buffers")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219237
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
Sending this patch in an attempt to backport the fix introduced by
commit ee4cdf7b ("netfs: Speed up buffered reading"), which however
can not be cherry picked for older kernels, as the patch is not
independent from other commits and touches a lot of unrelated (to
the fix) code.
fs/netfs/io.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/netfs/io.c b/fs/netfs/io.c
index d6ada4eba744..500119285346 100644
--- a/fs/netfs/io.c
+++ b/fs/netfs/io.c
@@ -528,6 +528,7 @@ void netfs_subreq_terminated(struct netfs_io_subrequest *subreq,
incomplete:
if (test_bit(NETFS_SREQ_CLEAR_TAIL, &subreq->flags)) {
+ netfs_reset_subreq_iter(rreq, subreq);
netfs_clear_unread(subreq);
subreq->transferred = subreq->len;
goto complete;
--
2.39.5
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean
2024-10-27 11:43 [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean Christian Ebner
@ 2024-11-06 5:59 ` Greg KH
2024-11-06 8:26 ` Christian Ebner
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2024-11-06 5:59 UTC (permalink / raw)
To: Christian Ebner
Cc: dhowells, jlayton, stable, netfs, linux-fsdevel, linux-kernel
On Sun, Oct 27, 2024 at 12:43:15PM +0100, Christian Ebner wrote:
> Fixes file corruption issues when reading contents via ceph client.
>
> Call netfs_reset_subreq_iter() to align subreq->io_iter before
> calling netfs_clear_unread() to clear tail, as subreq->io_iter count
> and subreq->transferred might not be aligned after incomplete I/O,
> having the subreq's NETFS_SREQ_CLEAR_TAIL set.
>
> Based on ee4cdf7b ("netfs: Speed up buffered reading"), which
> introduces a fix for the issue in mainline.
>
> Fixes: 92b6cc5d ("netfs: Add iov_iters to (sub)requests to describe various buffers")
> Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219237
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> ---
> Sending this patch in an attempt to backport the fix introduced by
> commit ee4cdf7b ("netfs: Speed up buffered reading"), which however
> can not be cherry picked for older kernels, as the patch is not
> independent from other commits and touches a lot of unrelated (to
> the fix) code.
We would much rather take the original series of commits, what exactly
are they here?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean
2024-11-06 5:59 ` Greg KH
@ 2024-11-06 8:26 ` Christian Ebner
2024-11-06 8:35 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Christian Ebner @ 2024-11-06 8:26 UTC (permalink / raw)
To: Greg KH; +Cc: dhowells, jlayton, stable, netfs, linux-fsdevel, linux-kernel
On 11/6/24 06:59, Greg KH wrote:
> We would much rather take the original series of commits, what exactly
> are they here?
>
> thanks,
>
> greg k-h
Hello Greg,
thank you for your reply.
AFAIK the relevant patches for this series are commits
80887f31..ee4cdf7b, although the last patch containing the fix does not
apply cleanly on the current 6.11.y branch.
Please note, I am not very familiar with the code so unsure if all of
the patches in the series are required for the fix. Maybe David Howells
as author of the series can provide some more insights?
The patch series introducing the fix is
https://lore.kernel.org/all/20240814203850.2240469-1-dhowells@redhat.com/
Please let me know how to proceed, thanks!
Best regards,
Christian Ebner
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean
2024-11-06 8:26 ` Christian Ebner
@ 2024-11-06 8:35 ` Greg KH
2024-11-07 11:51 ` Christian Ebner
0 siblings, 1 reply; 6+ messages in thread
From: Greg KH @ 2024-11-06 8:35 UTC (permalink / raw)
To: Christian Ebner
Cc: dhowells, jlayton, stable, netfs, linux-fsdevel, linux-kernel
On Wed, Nov 06, 2024 at 09:26:46AM +0100, Christian Ebner wrote:
> On 11/6/24 06:59, Greg KH wrote:
> > We would much rather take the original series of commits, what exactly
> > are they here?
> >
> > thanks,
> >
> > greg k-h
>
> Hello Greg,
> thank you for your reply.
>
> AFAIK the relevant patches for this series are commits 80887f31..ee4cdf7b,
> although the last patch containing the fix does not apply cleanly on the
> current 6.11.y branch.
>
> Please note, I am not very familiar with the code so unsure if all of the
> patches in the series are required for the fix. Maybe David Howells as
> author of the series can provide some more insights?
>
> The patch series introducing the fix is
> https://lore.kernel.org/all/20240814203850.2240469-1-dhowells@redhat.com/
>
> Please let me know how to proceed, thanks!
Please try testing the original fixes and providing them as a patch
series and send them for us to review.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean
2024-11-06 8:35 ` Greg KH
@ 2024-11-07 11:51 ` Christian Ebner
2024-11-10 5:08 ` Greg KH
0 siblings, 1 reply; 6+ messages in thread
From: Christian Ebner @ 2024-11-07 11:51 UTC (permalink / raw)
To: Greg KH; +Cc: dhowells, jlayton, stable, netfs, linux-fsdevel, linux-kernel
On 11/6/24 09:35, Greg KH wrote:
> On Wed, Nov 06, 2024 at 09:26:46AM +0100, Christian Ebner wrote:
>
> Please try testing the original fixes and providing them as a patch
> series and send them for us to review.
>
> thanks,
>
> greg k-h
Hi Greg,
as mentioned, the original series does not apply on stable-6.11.y and
securely and correctly back-porting this is out of scope for us, given
resource and time constraints.
The main intend was to contribute back a patch which is also
back-portable to older kernels. This seems unfeasible with the huge
original patch series. The submitted patch has successfully been tested
on our side and fixes the issue for affected customers which were
willing to test the patch.
Thanks for your time.
Best regards,
Christian Ebner
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean
2024-11-07 11:51 ` Christian Ebner
@ 2024-11-10 5:08 ` Greg KH
0 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2024-11-10 5:08 UTC (permalink / raw)
To: Christian Ebner
Cc: dhowells, jlayton, stable, netfs, linux-fsdevel, linux-kernel
On Thu, Nov 07, 2024 at 12:51:14PM +0100, Christian Ebner wrote:
> On 11/6/24 09:35, Greg KH wrote:
> > On Wed, Nov 06, 2024 at 09:26:46AM +0100, Christian Ebner wrote:
> >
> > Please try testing the original fixes and providing them as a patch
> > series and send them for us to review.
> >
> > thanks,
> >
> > greg k-h
>
> Hi Greg,
>
> as mentioned, the original series does not apply on stable-6.11.y and
> securely and correctly back-porting this is out of scope for us, given
> resource and time constraints.
Please note that taking one-off backports to stable trees, increases our
workload over time and almost always is not the correct thing to do as
it diverges code streams. So while this seems simpler "up front", from
a maintaince point of view, is almost always the wrong thing.
> The main intend was to contribute back a patch which is also back-portable
> to older kernels. This seems unfeasible with the huge original patch series.
> The submitted patch has successfully been tested on our side and fixes the
> issue for affected customers which were willing to test the patch.
That's great, but we really would want the original commits here, OR
approval from the relevant maintainers that "yes, this is really the
only way this can be done for stable trees".
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-10 5:09 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-27 11:43 [PATCH stable 6.11.y] netfs: reset subreq->iov_iter before netfs_clear_unread() tail clean Christian Ebner
2024-11-06 5:59 ` Greg KH
2024-11-06 8:26 ` Christian Ebner
2024-11-06 8:35 ` Greg KH
2024-11-07 11:51 ` Christian Ebner
2024-11-10 5:08 ` Greg KH
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).