]> git.hungrycats.org Git - linux/commit
[PATCH] direct-io support for XFS unwritten extents
authorAndrew Morton <akpm@osdl.org>
Fri, 1 Aug 2003 03:09:08 +0000 (20:09 -0700)
committerLinus Torvalds <torvalds@home.osdl.org>
Fri, 1 Aug 2003 03:09:08 +0000 (20:09 -0700)
commit359a5de19d26843837d7230bcd9bd1aee1252ad8
treef0b520eb033405221d8dba4ad6c4c7786e2f89e9
parent14d927a3f1d043b00bc7bf31e1f04778c3ac093b
[PATCH] direct-io support for XFS unwritten extents

From: Nathan Scott <nathans@sgi.com>

This patch adds a mechanism by which a filesystem can register an interest in
the completion of direct I/O.  The completion routine will be given the
inode, an offset and a length, and an optional filesystem-private field.

We have extended the use of the buffer_head-based interface (i.e.
get_block_t) for direct I/O such that the b_private field is now utilised.
It is defined to be initially zero at the start of I/O, and will be passed
into the filesystem unmodified by the VFS with each map request, while
setting up the direct I/O.  Once I/O has completed the final value of this
pointer will be passed into a filesystems I/O completion handler.  This
mechanism can be used to keep track of all of the mapping requests which
encompass an individual direct I/O request.

This has been implemented specifically for XFS, but is done so as to be as
generic as possible.  XFS uses this mechanism to provide support for
unwritten extents - these are file extents which have been pre-allocated
on-disk, but not yet written to (once written, these become regular file
extents, but only once I/O is complete).
fs/block_dev.c
fs/direct-io.c
fs/ext2/inode.c
fs/ext3/inode.c
fs/jfs/inode.c
fs/xfs/linux/xfs_aops.c
include/linux/fs.h