ext4: Add support for blocksize < pagesize in dioread_nolock

This patch adds the support for blocksize < pagesize for
dioread_nolock feature.

Since in case of blocksize < pagesize, we can have multiple
small buffers of page as unwritten extents, we need to
maintain a vector of these unwritten extents which needs
the conversion after the IO is complete. Thus, we maintain
a list of tuple <offset, size> pair (io_end_vec) for this &
traverse this list to do the unwritten to written conversion.

Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com>
Link: https://lore.kernel.org/r/20191016073711.4141-5-riteshh@linux.ibm.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
BUG=b:144741353
TEST=xfstests/smoke, no new failures introduced
SOURCE=UPSTREAM(c8cc88163f40df39e50cda63ac361631864b453e)
Change-Id: I52caee29fe7949298f9b7fcdc2dd48cd1b09a9db
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/lakitu-kernel/+/2113634
Commit-Queue: Vaibhav Rustagi <vaibhavrustagi@google.com>
Commit-Queue: Harshad Shirwadkar <harshads@google.com>
Tested-by: Vaibhav Rustagi <vaibhavrustagi@google.com>
Reviewed-by: Roy Yang <royyang@google.com>
4 files changed