| To: | axboe@xxxxxxxxx, tytso@xxxxxxx, david@xxxxxxxxxxxxx, jmoyer@xxxxxxxxxx, bpm@xxxxxxx, viro@xxxxxxxxxxxxxxxxxx, jack@xxxxxxx |
|---|---|
| Subject: | [PATCH 7/9] ocfs2: 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/ocfs2/aops.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/ocfs2/aops.c b/fs/ocfs2/aops.c
index 6577432..60457cc 100644
--- a/fs/ocfs2/aops.c
+++ b/fs/ocfs2/aops.c
@@ -593,9 +593,7 @@ static void ocfs2_dio_end_io(struct kiocb *iocb,
level = ocfs2_iocb_rw_locked_level(iocb);
ocfs2_rw_unlock(inode, level);
- if (is_async)
- aio_complete(iocb, ret, 0);
- inode_dio_done(inode);
+ generic_dio_end_io(iocb, offset, bytes, private, ret, is_async);
}
/*
@@ -642,7 +640,7 @@ static ssize_t ocfs2_direct_IO(int rw,
return __blockdev_direct_IO(rw, iocb, inode, inode->i_sb->s_bdev,
iov, offset, nr_segs,
ocfs2_direct_IO_get_blocks,
- ocfs2_dio_end_io, NULL, 0);
+ ocfs2_dio_end_io, NULL, DIO_SYNC_WRITES);
}
static void ocfs2_figure_cluster_boundaries(struct ocfs2_super *osb,
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH 6/9] gfs2: Use generic handlers of O_SYNC AIO DIO, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 8/9] filemap: don't call generic_write_sync for -EIOCBQUEUED, Darrick J. Wong |
| Previous by Thread: | [PATCH 6/9] gfs2: Use generic handlers of O_SYNC AIO DIO, Darrick J. Wong |
| Next by Thread: | Re: [PATCH 7/9] ocfs2: Use generic handlers of O_SYNC AIO DIO, Joel Becker |
| Indexes: | [Date] [Thread] [Top] [All Lists] |