fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / include / linux / aio.h
index 00c8efa..a30ef13 100644 (file)
@@ -4,8 +4,10 @@
 #include <linux/list.h>
 #include <linux/workqueue.h>
 #include <linux/aio_abi.h>
+#include <linux/uio.h>
 
 #include <asm/atomic.h>
+#include <linux/uio.h>
 
 #define AIO_MAXSEGS            4
 #define AIO_KIOGRP_NR_ATOMIC   8
@@ -103,15 +105,17 @@ struct kiocb {
        wait_queue_t            ki_wait;
        loff_t                  ki_pos;
 
+       atomic_t                ki_bio_count;   /* num bio used for this iocb */
        void                    *private;
        /* State that we remember to be able to restart/retry  */
        unsigned short          ki_opcode;
        size_t                  ki_nbytes;      /* copy of iocb->aio_nbytes */
        char                    __user *ki_buf; /* remaining iocb->aio_buf */
        size_t                  ki_left;        /* remaining bytes */
-       long                    ki_retried;     /* just for testing */
-       long                    ki_kicked;      /* just for testing */
-       long                    ki_queued;      /* just for testing */
+       struct iovec            ki_inline_vec;  /* inline vector */
+       struct iovec            *ki_iovec;
+       unsigned long           ki_nr_segs;
+       unsigned long           ki_cur_seg;
 
        struct list_head        ki_list;        /* the aio core uses this
                                                 * for cancellation */
@@ -190,7 +194,7 @@ struct kioctx {
 
        struct aio_ring_info    ring_info;
 
-       struct work_struct      wq;
+       struct delayed_work     wq;
 };
 
 /* prototypes */
@@ -213,11 +217,11 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
                                  struct iocb *iocb));
 
 #define get_ioctx(kioctx) do {                                         \
-       BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0));           \
+       BUG_ON(atomic_read(&(kioctx)->users) <= 0);                     \
        atomic_inc(&(kioctx)->users);                                   \
 } while (0)
 #define put_ioctx(kioctx) do {                                         \
-       BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0));           \
+       BUG_ON(atomic_read(&(kioctx)->users) <= 0);                     \
        if (unlikely(atomic_dec_and_test(&(kioctx)->users)))            \
                __put_ioctx(kioctx);                                    \
 } while (0)
@@ -234,7 +238,6 @@ do {                                                                        \
 } while (0)
 
 #define io_wait_to_kiocb(wait) container_of(wait, struct kiocb, ki_wait)
-#define is_retried_kiocb(iocb) ((iocb)->ki_retried > 1)
 
 #include <linux/aio_abi.h>