[LU-13846] move iov iter forward by ourself Created: 01/Aug/20 Updated: 28/Sep/20 Resolved: 19/Sep/20 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.14.0 |
| Type: | Bug | Priority: | Major |
| Reporter: | Wang Shilong (Inactive) | Assignee: | Wang Shilong (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Severity: | 3 | ||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||
| Description |
|
Newer kernel will reward iov iter back to original
iov_iter_revert(from, write_len -iov_iter_count(from));--------->here
out:
return written;
}
EXPORT_SYMBOL(generic_file_direct_write);
This break assumptions from Lustre and caused problem Since generic kernel varies from different kernel versions, |
| Comments |
| Comment by Wang Shilong (Inactive) [ 01/Aug/20 ] |
|
Patch is here: |
| Comment by Wang Shilong (Inactive) [ 04/Aug/20 ] |
|
A bit deep look when we will have this bug: The problem existed since kernel v3.16 from following upstream linux commit: commit 26978b8b4d83c46f4310b253db70fa9e65149e7c
Author: Al Viro <viro@zeniv.linux.org.uk>
Date: Mon Mar 10 14:08:45 2014 -0400
give ->direct_IO() a copy of iov_iter
the thing is, we want to advance what's given to ->direct_IO() as we
are forming the request; however, the callers care about the amount
of data actually transferred, not the amount we tried to transfer.
It's more convenient to allow ->direct_IO() instances do use
iov_iter_advance() on the copy of iov_iter, leaving the actual
advancing of the original to caller.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
|
| Comment by Gerrit Updater [ 01/Sep/20 ] |
|
Oleg Drokin (green@whamcloud.com) merged in patch https://review.whamcloud.com/39565/ |
| Comment by James A Simmons [ 19/Sep/20 ] |
|
Patch has landed. If more work is needed please reopen |