struct bio *biotail;
struct hlist_node hash; /* merge hash */
+ struct rb_node rb_node; /* sort/lookup */
+ /*
+ * two pointers are available for the IO schedulers, if they need
+ * more they have to dynamically allocate it.
+ */
void *elevator_private;
+ void *elevator_private2;
+
void *completion_data;
int rq_status; /* should split this into a few status bits */
request_queue_t *q;
struct request_list *rl;
- struct completion *waiting;
void *special;
char *buffer;
int retries;
/*
- * completion callback. end_io_data should be folded in with waiting
+ * completion callback.
*/
rq_end_io_fn *end_io;
void *end_io_data;
#define rq_data_dir(rq) ((rq)->cmd_flags & 1)
+/*
+ * We regard a request as sync, if it's a READ or a SYNC write.
+ */
+#define rq_is_sync(rq) (rq_data_dir((rq)) == READ || (rq)->cmd_flags & REQ_RW_SYNC)
+
static inline int blk_queue_full(struct request_queue *q, int rw)
{
if (rw == READ)