aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/aio.h24
1 files changed, 0 insertions, 24 deletions
diff --git a/include/linux/aio.h b/include/linux/aio.h
index 31ff6dba4872..b46a09f73f1d 100644
--- a/include/linux/aio.h
+++ b/include/linux/aio.h
@@ -9,44 +9,22 @@
9 9
10#include <linux/atomic.h> 10#include <linux/atomic.h>
11 11
12#define AIO_MAXSEGS 4
13#define AIO_KIOGRP_NR_ATOMIC 8
14
15struct kioctx; 12struct kioctx;
16 13
17/* Notes on cancelling a kiocb:
18 * If a kiocb is cancelled, aio_complete may return 0 to indicate
19 * that cancel has not yet disposed of the kiocb. All cancel
20 * operations *must* call aio_put_req to dispose of the kiocb
21 * to guard against races with the completion code.
22 */
23#define KIOCB_C_CANCELLED 0x01
24#define KIOCB_C_COMPLETE 0x02
25
26#define KIOCB_SYNC_KEY (~0U) 14#define KIOCB_SYNC_KEY (~0U)
27 15
28/* ki_flags bits */ 16/* ki_flags bits */
29/*
30 * This may be used for cancel/retry serialization in the future, but
31 * for now it's unused and we probably don't want modules to even
32 * think they can use it.
33 */
34/* #define KIF_LOCKED 0 */
35#define KIF_KICKED 1 17#define KIF_KICKED 1
36#define KIF_CANCELLED 2 18#define KIF_CANCELLED 2
37 19
38#define kiocbTryLock(iocb) test_and_set_bit(KIF_LOCKED, &(iocb)->ki_flags)
39#define kiocbTryKick(iocb) test_and_set_bit(KIF_KICKED, &(iocb)->ki_flags) 20#define kiocbTryKick(iocb) test_and_set_bit(KIF_KICKED, &(iocb)->ki_flags)
40 21
41#define kiocbSetLocked(iocb) set_bit(KIF_LOCKED, &(iocb)->ki_flags)
42#define kiocbSetKicked(iocb) set_bit(KIF_KICKED, &(iocb)->ki_flags) 22#define kiocbSetKicked(iocb) set_bit(KIF_KICKED, &(iocb)->ki_flags)
43#define kiocbSetCancelled(iocb) set_bit(KIF_CANCELLED, &(iocb)->ki_flags) 23#define kiocbSetCancelled(iocb) set_bit(KIF_CANCELLED, &(iocb)->ki_flags)
44 24
45#define kiocbClearLocked(iocb) clear_bit(KIF_LOCKED, &(iocb)->ki_flags)
46#define kiocbClearKicked(iocb) clear_bit(KIF_KICKED, &(iocb)->ki_flags) 25#define kiocbClearKicked(iocb) clear_bit(KIF_KICKED, &(iocb)->ki_flags)
47#define kiocbClearCancelled(iocb) clear_bit(KIF_CANCELLED, &(iocb)->ki_flags) 26#define kiocbClearCancelled(iocb) clear_bit(KIF_CANCELLED, &(iocb)->ki_flags)
48 27
49#define kiocbIsLocked(iocb) test_bit(KIF_LOCKED, &(iocb)->ki_flags)
50#define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags) 28#define kiocbIsKicked(iocb) test_bit(KIF_KICKED, &(iocb)->ki_flags)
51#define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags) 29#define kiocbIsCancelled(iocb) test_bit(KIF_CANCELLED, &(iocb)->ki_flags)
52 30
@@ -207,8 +185,6 @@ struct kioctx {
207}; 185};
208 186
209/* prototypes */ 187/* prototypes */
210extern unsigned aio_max_size;
211
212#ifdef CONFIG_AIO 188#ifdef CONFIG_AIO
213extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb); 189extern ssize_t wait_on_sync_kiocb(struct kiocb *iocb);
214extern int aio_put_req(struct kiocb *iocb); 190extern int aio_put_req(struct kiocb *iocb);