aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
authorSébastien Dugu <sebastien.dugue@bull.net>2005-06-28 23:44:59 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-29 00:20:32 -0400
commitc016e2257acd00a7ffd87fa1eec896138563d1aa (patch)
treeaa22df355afe2be5b5476c1c6d26da99e47836fc /fs/aio.c
parent334a13ec3d01a1a4b4f2249735b793105cb4a519 (diff)
[PATCH] aio-retry-fix: fix aio retry work queueing
In the case of buffered AIO, in the aio retry path (aio_run_iocb), when the retry method returns EIOCBRETRY the kicked iocb is added to the context run list but is never queued onto the work queue. The request therefore is never completed. This patch fixes that by adding the appropriate call to aio_queue_work in aio_run_aiocb so that subsequent retries will be handled by the aio worker thread. Signed-off-by: Sébastien Dugué <sebastien.dugue@bull.net> Acked-by: Benjamin LaHaise <benjamin.c.lahaise@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/aio.c b/fs/aio.c
index 7afa222f6802..06d7d4390fe7 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -58,6 +58,7 @@ static DEFINE_SPINLOCK(fput_lock);
58static LIST_HEAD(fput_head); 58static LIST_HEAD(fput_head);
59 59
60static void aio_kick_handler(void *); 60static void aio_kick_handler(void *);
61static void aio_queue_work(struct kioctx *);
61 62
62/* aio_setup 63/* aio_setup
63 * Creates the slab caches used by the aio routines, panic on 64 * Creates the slab caches used by the aio routines, panic on
@@ -747,6 +748,14 @@ out:
747 * has already been kicked */ 748 * has already been kicked */
748 if (kiocbIsKicked(iocb)) { 749 if (kiocbIsKicked(iocb)) {
749 __queue_kicked_iocb(iocb); 750 __queue_kicked_iocb(iocb);
751
752 /*
753 * __queue_kicked_iocb will always return 1 here, because
754 * iocb->ki_run_list is empty at this point so it should
755 * be safe to unconditionally queue the context into the
756 * work queue.
757 */
758 aio_queue_work(ctx);
750 } 759 }
751 } 760 }
752 return ret; 761 return ret;