xfs
[Top] [All Lists]

[PATCH 6/9] gfs2: Use generic handlers of O_SYNC AIO DIO

To: axboe@xxxxxxxxx, tytso@xxxxxxx, david@xxxxxxxxxxxxx, jmoyer@xxxxxxxxxx, bpm@xxxxxxx, viro@xxxxxxxxxxxxxxxxxx, jack@xxxxxxx
Subject: [PATCH 6/9] gfs2: Use generic handlers of O_SYNC AIO DIO
From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Date: Mon, 19 Nov 2012 23:51:14 -0800
Cc: linux-fsdevel@xxxxxxxxxxxxxxx, hch@xxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx
In-reply-to: <20121120074116.24645.36369.stgit@xxxxxxxxxxxxxxxxxxx>
References: <20121120074116.24645.36369.stgit@xxxxxxxxxxxxxxxxxxx>
User-agent: StGit/0.15
Use generic handlers to queue fsync() when AIO DIO is completed for O_SYNC
file.

From: Jan Kara <jack@xxxxxxx>
Signed-off-by: Jan Kara <jack@xxxxxxx>
Signed-off-by: Jeff Moyer <jmoyer@xxxxxxxxxx>
---
 fs/gfs2/aops.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c
index 01c4975..8b1d0f7 100644
--- a/fs/gfs2/aops.c
+++ b/fs/gfs2/aops.c
@@ -1022,7 +1022,7 @@ static ssize_t gfs2_direct_IO(int rw, struct kiocb *iocb,
 
        rv = __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev, iov,
                                  offset, nr_segs, gfs2_get_block_direct,
-                                 NULL, NULL, 0);
+                                 NULL, NULL, DIO_SYNC_WRITES);
 out:
        gfs2_glock_dq(&gh);
        gfs2_holder_uninit(&gh);


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