public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Page based O_DIRECT and O_DIRECT loop
@ 2009-08-17 10:34 Jens Axboe
  2009-08-17 10:34 ` [PATCH 1/3] direct-io: make O_DIRECT IO path be page based Jens Axboe
  2009-08-17 22:00 ` [PATCH 0/3] Page based O_DIRECT and O_DIRECT loop Christoph Hellwig
  0 siblings, 2 replies; 8+ messages in thread
From: Jens Axboe @ 2009-08-17 10:34 UTC (permalink / raw)
  To: linux-kernel; +Cc: zach.brown

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-08-20 13:08 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-17 10:34 [PATCH 0/3] Page based O_DIRECT and O_DIRECT loop Jens Axboe
2009-08-17 10:34 ` [PATCH 1/3] direct-io: make O_DIRECT IO path be page based Jens Axboe
2009-08-17 10:34   ` [PATCH 2/3] direct-io: add a "IO for kernel" flag to kiocb Jens Axboe
2009-08-17 10:34     ` [PATCH 3/3] loop: support O_DIRECT transfer mode Jens Axboe
2009-08-17 12:11   ` [PATCH 1/3] direct-io: make O_DIRECT IO path be page based Jens Axboe
2009-08-20 13:08     ` Trond Myklebust
2009-08-17 22:00 ` [PATCH 0/3] Page based O_DIRECT and O_DIRECT loop Christoph Hellwig
2009-08-18  6:40   ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox