xfs
[Top] [All Lists]

[PATCH 3/3] xfs: allow appending aio writes

To: xfs@xxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Subject: [PATCH 3/3] xfs: allow appending aio writes
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 04 Feb 2014 09:24:05 -0800
Cc: Sergey Meirovich <rathamahata@xxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
References: <20140204172402.380571745@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.60-1
XFS can easily support appending aio writes by ensuring we always allocate
blocks as unwritten extents when performing direct I/O writes and only
converting them to written extents at I/O completion.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 fs/xfs/xfs_aops.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index a267394..a4278e4 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -1441,7 +1441,8 @@ xfs_vm_direct_IO(
                ret = __blockdev_direct_IO(rw, iocb, inode, bdev, iov,
                                            offset, nr_segs,
                                            xfs_get_blocks_direct,
-                                           xfs_end_io_direct_write, NULL, 0);
+                                           xfs_end_io_direct_write, NULL,
+                                           DIO_ASYNC_EXTEND);
                if (ret != -EIOCBQUEUED && iocb->private)
                        goto out_destroy_ioend;
        } else {
-- 
1.7.10.4


<Prev in Thread] Current Thread [Next in Thread>