diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/aio.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h index 615d55a5d0be..7b1eb234e0ab 100644 --- a/include/linux/aio.h +++ b/include/linux/aio.h | |||
| @@ -103,67 +103,6 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) | |||
| 103 | }; | 103 | }; |
| 104 | } | 104 | } |
| 105 | 105 | ||
| 106 | #define AIO_RING_MAGIC 0xa10a10a1 | ||
| 107 | #define AIO_RING_COMPAT_FEATURES 1 | ||
| 108 | #define AIO_RING_INCOMPAT_FEATURES 0 | ||
| 109 | struct aio_ring { | ||
| 110 | unsigned id; /* kernel internal index number */ | ||
| 111 | unsigned nr; /* number of io_events */ | ||
| 112 | unsigned head; | ||
| 113 | unsigned tail; | ||
| 114 | |||
| 115 | unsigned magic; | ||
| 116 | unsigned compat_features; | ||
| 117 | unsigned incompat_features; | ||
| 118 | unsigned header_length; /* size of aio_ring */ | ||
| 119 | |||
| 120 | |||
| 121 | struct io_event io_events[0]; | ||
| 122 | }; /* 128 bytes + ring size */ | ||
| 123 | |||
| 124 | #define AIO_RING_PAGES 8 | ||
| 125 | struct aio_ring_info { | ||
| 126 | unsigned long mmap_base; | ||
| 127 | unsigned long mmap_size; | ||
| 128 | |||
| 129 | struct page **ring_pages; | ||
| 130 | spinlock_t ring_lock; | ||
| 131 | long nr_pages; | ||
| 132 | |||
| 133 | unsigned nr, tail; | ||
| 134 | |||
| 135 | struct page *internal_pages[AIO_RING_PAGES]; | ||
| 136 | }; | ||
| 137 | |||
| 138 | static inline unsigned aio_ring_avail(struct aio_ring_info *info, | ||
| 139 | struct aio_ring *ring) | ||
| 140 | { | ||
| 141 | return (ring->head + info->nr - 1 - ring->tail) % info->nr; | ||
| 142 | } | ||
| 143 | |||
| 144 | struct kioctx { | ||
| 145 | atomic_t users; | ||
| 146 | int dead; | ||
| 147 | |||
| 148 | /* This needs improving */ | ||
| 149 | unsigned long user_id; | ||
| 150 | struct hlist_node list; | ||
| 151 | |||
| 152 | wait_queue_head_t wait; | ||
| 153 | |||
| 154 | spinlock_t ctx_lock; | ||
| 155 | |||
| 156 | int reqs_active; | ||
| 157 | struct list_head active_reqs; /* used for cancellation */ | ||
| 158 | |||
| 159 | /* sys_io_setup currently limits this to an unsigned int */ | ||
| 160 | unsigned max_reqs; | ||
| 161 | |||
| 162 | struct aio_ring_info ring_info; | ||
| 163 | |||
| 164 | struct rcu_head rcu_head; | ||
| 165 | }; | ||
| 166 | |||
| 167 | /* prototypes */ | 106 | /* prototypes */ |
| 168 | #ifdef CONFIG_AIO | 107 | #ifdef CONFIG_AIO |
| 169 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); | 108 | extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); |
