[Devel] [PATCH RHEL7 COMMIT] mm: Kill unused ->direct_IO_page

Konstantin Khorenko khorenko at virtuozzo.com
Mon May 25 17:52:07 MSK 2020


The commit is pushed to "branch-rh7-3.10.0-1127.8.2.vz7.161.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1127.8.2.vz7.161.1
------>
commit d6e03062496a1779026309128c53370978a47c39
Author: Kirill Tkhai <ktkhai at virtuozzo.com>
Date:   Mon May 25 17:52:07 2020 +0300

    mm: Kill unused ->direct_IO_page
    
    Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
    
    =====================
    Patchset description:
    [00/30] fs,direct_IO: Switch to iov_iter and allow bio_vec for ext4
    
    This patchset transforms direct_IO callbacks, blockdev_direct_IO
    and its underlining functions to iov_iter, and introduces complete
    support of iov_iter for ext4.
    
    Supported iov_iter subtypes for ext4 is iovec and bio_vec. The first
    is for traditional user-submitted aio, while bio_vec is the type,
    which is important for us, since we use it in ploop.
    
    bio_vec operates with pages instead of user addresses (like iovec
    does), so it requires specific callbacks in do_blockdev_direct_IO()
    and in the functions it calls.
    
    The patchset reworks do_blockdev_direct_IO() in the same manner
    as in mainstrean. The most of rest patches are prepared manually,
    since we have significant differences to ms (RHEL7 patches, our
    direct IO patches for FUSE; all they have changed many functions).
    At the end, kaio engine (resulting in direct_IO) became possible
    to be enabled for ext4.
    
    https://jira.sw.ru/browse/PSBM-99793
---
 include/linux/fs.h | 2 --
 mm/filemap.c       | 3 ---
 2 files changed, 5 deletions(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 20b5b53ec04e8..979cee411bfda 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -578,8 +578,6 @@ struct address_space_operations {
 			loff_t offset, unsigned long nr_segs);
 	ssize_t (*direct_IO_bvec)(int, struct kiocb *, struct bio_vec *bvec,
 			loff_t offset, unsigned long bvec_len);
-	ssize_t (*direct_IO_page)(int, struct kiocb *, struct page *page,
-			loff_t offset);
 	int (*get_xip_mem)(struct address_space *, pgoff_t, int,
 						void **, unsigned long *);
 	RH_KABI_DEPRECATE_FN(int, get_xip_mem, struct address_space *, pgoff_t,
diff --git a/mm/filemap.c b/mm/filemap.c
index cd72517769f4c..3fe13fbb85760 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -1998,9 +1998,6 @@ static ssize_t mapping_direct_IO(struct address_space *mapping, int rw,
 		return mapping->a_ops->direct_IO_bvec(rw, iocb,
 						      iov_iter_bvec(iter), pos,
 						      iter->nr_segs);
-	else if (iov_iter_has_page(iter))
-		return mapping->a_ops->direct_IO_page(rw, iocb,
-						      iov_iter_page(iter), pos);
 	else
 		BUG();
 }


More information about the Devel mailing list