init_waitqueue_head(&new_op->waitq);
init_waitqueue_head(&new_op->io_completion_waitq);
- atomic_set(&new_op->aio_ref_count, 0);
+ atomic_set(&new_op->ref_count, 0);
orangefs_op_initialize(new_op);
#define get_op(op) \
do { \
- atomic_inc(&(op)->aio_ref_count); \
+ atomic_inc(&(op)->ref_count); \
gossip_debug(GOSSIP_DEV_DEBUG, \
"(get) Alloced OP (%p:%llu)\n", \
op, \
#define put_op(op) \
do { \
- if (atomic_sub_and_test(1, &(op)->aio_ref_count) == 1) { \
+ if (atomic_sub_and_test(1, &(op)->ref_count) == 1) { \
gossip_debug(GOSSIP_DEV_DEBUG, \
"(put) Releasing OP (%p:%llu)\n", \
op, \
} \
} while (0)
-#define op_wait(op) (atomic_read(&(op)->aio_ref_count) <= 2 ? 0 : 1)
+#define op_wait(op) (atomic_read(&(op)->ref_count) <= 2 ? 0 : 1)
/*
* Defines for controlling whether I/O upcalls are for async or sync operations
int io_completed;
wait_queue_head_t io_completion_waitq;
+ atomic_t ref_count;
+
/* VFS aio fields */
/* used by the async I/O code to stash the orangefs_kiocb_s structure */
void *priv;
- /* used again for the async I/O code for deallocation */
- atomic_t aio_ref_count;
-
int attempts;
struct list_head list;