-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove iov_iter_advance() for iter_write #12155
Conversation
Testing applied against zfs-2.0.5-staging, can confirm no more "Attempted to advance past end of bvec iter" message. |
Yes, yes it should have. @siebenmann's #12041 (comment) does a nice job explaining the issue and that the code is incorrectly advancing the iov_iter twice. The https://lwn.net/Articles/625077/
So I agree the right thing to do here is to just remove this unneeded iov advance, as was already done for the read case. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code change itself looks good, but I'd suggest we update the commit message to make it clear that the advance isn't needed because it's handled by copy_from_iter()
.
This includes two further approved backport PRs for the zfs-2.0.5-staging branch (openzfs/zfs#12139, openzfs/zfs#12141) and switches compat patches from 12009 to the merged commits. It also includes bugfix openzfs/zfs#12155 .
It seems like this should have gone with openzfs#11378. The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. Closes: openzfs#12041 Suggested-by: @siebenmann Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
There; is something like that what you had in mind? |
That works for me. |
This includes two further approved backport PRs for the zfs-2.0.5-staging branch (openzfs/zfs#12139, openzfs/zfs#12141) and switches compat patches from 12009 to the merged commits. It also includes bugfix openzfs/zfs#12155 .
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with #11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue #11378 Closes #12041 Closes #12155 (cherry picked from commit 3f81aba) Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with openzfs#11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue openzfs#11378 Closes openzfs#12041 Closes openzfs#12155 (cherry picked from commit 3f81aba) Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with openzfs#11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue openzfs#11378 Closes openzfs#12041 Closes openzfs#12155
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with openzfs#11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue openzfs#11378 Closes openzfs#12041 Closes openzfs#12155
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with openzfs#11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue openzfs#11378 Closes openzfs#12041 Closes openzfs#12155
The additional iter advance is incorrect, as copy_from_iter() has already done the right thing. This will result in the following warning being printed to the console as of the 5.12 kernel. Attempted to advance past end of bvec iter This change should have been included with #11378 when a similar change was made on the read side. Suggested-by: @siebenmann Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Issue #11378 Closes #12041 Closes #12155 (cherry picked from commit 3f81aba) Signed-off-by: Jonathon Fernyhough <jonathon@m2x.dev>
Motivation and Context
#12041
Description
Someone in #12041 credibly said they thought this problem might be a flip side to #11378. So I tried it.
How Has This Been Tested?
The
xfs_io
testcase in #12041 no longer reproduces with this patch.(I tried comparing ZTS before and after the patch, but after the second test case with unmodified git master hung forever, I gave up and decided I'd let the buildbots deal with it.)
Types of changes
Checklist:
Signed-off-by
.