Messages in this thread | | | From | Jens Axboe <> | Subject | [PATCH 0/3] Page based O_DIRECT and O_DIRECT loop | Date | Mon, 17 Aug 2009 12:34:31 +0200 |
| |
Hi,
Currently it's not feasible to use loop for O_DIRECT workloads that expect some sort of data integrity, since loop always uses page cache IO. Some time ago, I posted a variant of loop that used remapping to function like a proper disk, but that patch was a bit fragile in that it relied loop maintaining a fs block remapping tree. This time I wanted to take a different approach.
The first two patches in this series convert the O_DIRECT IO path to be page based instead of passing down the iovecs. This is basically a first version so don't expect too much of it, but it does seem to work fine for me. Most O_DIRECT users were one-liner conversions, NFS required a bit more effort (and that effort has, btw, not been tested at all yet). At least the diffstat for the core bits don't look too bad:
fs/block_dev.c | 5 fs/btrfs/inode.c | 3 fs/direct-io.c | 347 ++++++++++++++++-------------------- fs/ext2/inode.c | 8 fs/ext3/inode.c | 13 - fs/ext4/inode.c | 13 - fs/fat/inode.c | 10 - fs/gfs2/aops.c | 9 fs/hfs/inode.c | 7 fs/hfsplus/inode.c | 6 fs/jfs/inode.c | 7 fs/nfs/direct.c | 171 ++++++----------- fs/nfs/file.c | 8 fs/nilfs2/inode.c | 7 fs/ocfs2/aops.c | 7 fs/reiserfs/inode.c | 6 fs/xfs/linux-2.6/xfs_aops.c | 12 - include/linux/aio.h | 3 include/linux/fs.h | 61 ++++-- include/linux/nfs_fs.h | 10 - mm/filemap.c | 9 21 files changed, 323 insertions(+), 399 deletions(-)
So just consider this an RFC, comments?
-- Jens Axboe
| |