Logo Search packages:      
Sourcecode: linux-fsl-imx51 version File versions  Download package

Public Attributes

kiocb Struct Reference

#include <aio.h>

Collaboration diagram for kiocb:
Collaboration graph
[legend]

List of all members.

Public Attributes

char __user * ki_buf
int(* ki_cancel )(struct kiocb *, struct io_event *)
struct kioctxki_ctx
unsigned long ki_cur_seg
void(* ki_dtor )(struct kiocb *)
struct eventfd_ctxki_eventfd
struct fileki_filp
unsigned long ki_flags
struct iovec ki_inline_vec
struct iovecki_iovec
unsigned ki_key
size_t ki_left
struct list_head ki_list
size_t ki_nbytes
unsigned long ki_nr_segs
union {
   struct task_struct *   tsk
   void __user *   user
ki_obj
unsigned short ki_opcode
loff_t ki_pos
ssize_t(* ki_retry )(struct kiocb *)
struct list_head ki_run_list
__u64 ki_user_data
int ki_users
wait_queue_t ki_wait
void * private

Detailed Description

ki_retry - iocb forward progress callback : The kiocb struct to advance by performing an operation.

This callback is called when the AIO core wants a given AIO operation to make forward progress. The kiocb argument describes the operation that is to be performed. As the operation proceeds, perhaps partially, ki_retry is expected to update the kiocb with progress made. Typically ki_retry is set in the AIO core and it itself calls file_operations helpers.

ki_retry's return value determines when the AIO operation is completed and an event is generated in the AIO event ring. Except the special return values described below, the value that is returned from ki_retry is transferred directly into the completion ring as the operation's resulting status. Once this has happened ki_retry *MUST NOT* reference the kiocb pointer again.

If ki_retry returns -EIOCBQUEUED it has made a promise that aio_complete() will be called on the kiocb pointer in the future. The AIO core will not ask the method again -- ki_retry must ensure forward progress. aio_complete() must be called once and only once in the future, multiple calls may result in undefined behaviour.

If ki_retry returns -EIOCBRETRY it has made a promise that kick_iocb() will be called on the kiocb pointer in the future. This may happen through generic helpers that associate kiocb->ki_wait with a wait queue head that ki_retry uses via current->io_wait. It can also happen with custom tracking and manual calls to kick_iocb(), though that is discouraged. In either case, kick_iocb() must be called once and only once. ki_retry must ensure forward progress, the AIO core will wait indefinitely for kick_iocb() to be called.

Definition at line 87 of file aio.h.


The documentation for this struct was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index