aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorKent Overstreet <koverstreet@google.com>2013-05-07 19:19:11 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-05-07 22:46:02 -0400
commit41ef4eb8eef8d06bc1399e7b00c940d771554711 (patch)
tree3b8194de916d638f73394ed4b9c8910bbab04feb /include/linux
parent8a6608907cf165b3ae658c9de2efe6af4be68bff (diff)
aio: kill ki_retry
Thanks to Zach Brown's work to rip out the retry infrastructure, we don't need this anymore - ki_retry was only called right after the kiocb was initialized. This also refactors and trims some duplicated code, as well as cleaning up the refcounting/error handling a bit. [akpm@linux-foundation.org: use fmode_t in aio_run_iocb()] [akpm@linux-foundation.org: fix file_start_write/file_end_write tests] [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Kent Overstreet <koverstreet@google.com> Cc: Zach Brown <zab@redhat.com> Cc: Felipe Balbi <balbi@ti.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Rusty Russell <rusty@rustcorp.com.au> Cc: Jens Axboe <axboe@kernel.dk> Cc: Asai Thambi S P <asamymuthupa@micron.com> Cc: Selvan Mani <smani@micron.com> Cc: Sam Bradshaw <sbradshaw@micron.com> Cc: Jeff Moyer <jmoyer@redhat.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Benjamin LaHaise <bcrl@kvack.org> Reviewed-by: "Theodore Ts'o" <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/aio.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 7308836dd045..1bdf965339f9 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -29,38 +29,12 @@ struct kiocb;
29 29
30typedef int (kiocb_cancel_fn)(struct kiocb *, struct io_event *); 30typedef int (kiocb_cancel_fn)(struct kiocb *, struct io_event *);
31 31
32/* is there a better place to document function pointer methods? */
33/**
34 * ki_retry - iocb forward progress callback
35 * @kiocb: The kiocb struct to advance by performing an operation.
36 *
37 * This callback is called when the AIO core wants a given AIO operation
38 * to make forward progress. The kiocb argument describes the operation
39 * that is to be performed. As the operation proceeds, perhaps partially,
40 * ki_retry is expected to update the kiocb with progress made. Typically
41 * ki_retry is set in the AIO core and it itself calls file_operations
42 * helpers.
43 *
44 * ki_retry's return value determines when the AIO operation is completed
45 * and an event is generated in the AIO event ring. Except the special
46 * return values described below, the value that is returned from ki_retry
47 * is transferred directly into the completion ring as the operation's
48 * resulting status. Once this has happened ki_retry *MUST NOT* reference
49 * the kiocb pointer again.
50 *
51 * If ki_retry returns -EIOCBQUEUED it has made a promise that aio_complete()
52 * will be called on the kiocb pointer in the future. The AIO core will
53 * not ask the method again -- ki_retry must ensure forward progress.
54 * aio_complete() must be called once and only once in the future, multiple
55 * calls may result in undefined behaviour.
56 */
57struct kiocb { 32struct kiocb {
58 atomic_t ki_users; 33 atomic_t ki_users;
59 34
60 struct file *ki_filp; 35 struct file *ki_filp;
61 struct kioctx *ki_ctx; /* NULL for sync ops */ 36 struct kioctx *ki_ctx; /* NULL for sync ops */
62 kiocb_cancel_fn *ki_cancel; 37 kiocb_cancel_fn *ki_cancel;
63 ssize_t (*ki_retry)(struct kiocb *);
64 void (*ki_dtor)(struct kiocb *); 38 void (*ki_dtor)(struct kiocb *);
65 39
66 union { 40 union {