diff options
Diffstat (limited to 'include/linux/aio.h')
-rw-r--r-- | include/linux/aio.h | 26 |
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 | ||
30 | typedef int (kiocb_cancel_fn)(struct kiocb *, struct io_event *); | 30 | typedef 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 | */ | ||
57 | struct kiocb { | 32 | struct 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 { |