aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 17:51:22 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-20 17:51:22 -0400
commit2edc322d420a4cec8dbc184a1220ecd7fa9f8ae6 (patch)
treee7be2cf442626316b6b6fb212960fe1f77ff2725 /block
parentbe967b7e2f7747a5ebf2a07ee627d9338491e784 (diff)
parent2f3243aebd8df4d9eecaeca04bbff6c7dbfb2142 (diff)
Merge git://git.infradead.org/~dwmw2/rbtree-2.6
* git://git.infradead.org/~dwmw2/rbtree-2.6: [RBTREE] Switch rb_colour() et al to en_US spelling of 'color' for consistency Update UML kernel/physmem.c to use rb_parent() accessor macro [RBTREE] Update hrtimers to use rb_parent() accessor macro. [RBTREE] Add explicit alignment to sizeof(long) for struct rb_node. [RBTREE] Merge colour and parent fields of struct rb_node. [RBTREE] Remove dead code in rb_erase() [RBTREE] Update JFFS2 to use rb_parent() accessor macro. [RBTREE] Update eventpoll.c to use rb_parent() accessor macro. [RBTREE] Update key.c to use rb_parent() accessor macro. [RBTREE] Update ext3 to use rb_parent() accessor macro. [RBTREE] Change rbtree off-tree marking in I/O schedulers. [RBTREE] Add accessor macros for colour and parent fields of rb_node
Diffstat (limited to 'block')
-rw-r--r--block/as-iosched.c5
-rw-r--r--block/cfq-iosched.c8
-rw-r--r--block/deadline-iosched.c5
3 files changed, 5 insertions, 13 deletions
diff --git a/block/as-iosched.c b/block/as-iosched.c
index a7caf35ca0c..0c750393be4 100644
--- a/block/as-iosched.c
+++ b/block/as-iosched.c
@@ -353,10 +353,9 @@ static struct request *as_find_arq_hash(struct as_data *ad, sector_t offset)
353/* 353/*
354 * rb tree support functions 354 * rb tree support functions
355 */ 355 */
356#define RB_NONE (2)
357#define RB_EMPTY(root) ((root)->rb_node == NULL) 356#define RB_EMPTY(root) ((root)->rb_node == NULL)
358#define ON_RB(node) ((node)->rb_color != RB_NONE) 357#define ON_RB(node) (rb_parent(node) != node)
359#define RB_CLEAR(node) ((node)->rb_color = RB_NONE) 358#define RB_CLEAR(node) (rb_set_parent(node, node))
360#define rb_entry_arq(node) rb_entry((node), struct as_rq, rb_node) 359#define rb_entry_arq(node) rb_entry((node), struct as_rq, rb_node)
361#define ARQ_RB_ROOT(ad, arq) (&(ad)->sort_list[(arq)->is_sync]) 360#define ARQ_RB_ROOT(ad, arq) (&(ad)->sort_list[(arq)->is_sync])
362#define rq_rb_key(rq) (rq)->sector 361#define rq_rb_key(rq) (rq)->sector
diff --git a/block/cfq-iosched.c b/block/cfq-iosched.c
index 052b1748762..6200d9b9af2 100644
--- a/block/cfq-iosched.c
+++ b/block/cfq-iosched.c
@@ -60,14 +60,9 @@ static DEFINE_SPINLOCK(cfq_exit_lock);
60/* 60/*
61 * rb-tree defines 61 * rb-tree defines
62 */ 62 */
63#define RB_NONE (2)
64#define RB_EMPTY(node) ((node)->rb_node == NULL) 63#define RB_EMPTY(node) ((node)->rb_node == NULL)
65#define RB_CLEAR_COLOR(node) (node)->rb_color = RB_NONE
66#define RB_CLEAR(node) do { \ 64#define RB_CLEAR(node) do { \
67 (node)->rb_parent = NULL; \ 65 memset(node, 0, sizeof(*node)); \
68 RB_CLEAR_COLOR((node)); \
69 (node)->rb_right = NULL; \
70 (node)->rb_left = NULL; \
71} while (0) 66} while (0)
72#define RB_CLEAR_ROOT(root) ((root)->rb_node = NULL) 67#define RB_CLEAR_ROOT(root) ((root)->rb_node = NULL)
73#define rb_entry_crq(node) rb_entry((node), struct cfq_rq, rb_node) 68#define rb_entry_crq(node) rb_entry((node), struct cfq_rq, rb_node)
@@ -567,7 +562,6 @@ static inline void cfq_del_crq_rb(struct cfq_rq *crq)
567 cfq_update_next_crq(crq); 562 cfq_update_next_crq(crq);
568 563
569 rb_erase(&crq->rb_node, &cfqq->sort_list); 564 rb_erase(&crq->rb_node, &cfqq->sort_list);
570 RB_CLEAR_COLOR(&crq->rb_node);
571 565
572 if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY(&cfqq->sort_list)) 566 if (cfq_cfqq_on_rr(cfqq) && RB_EMPTY(&cfqq->sort_list))
573 cfq_del_cfqq_rr(cfqd, cfqq); 567 cfq_del_cfqq_rr(cfqd, cfqq);
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 3bd0415a982..c94de8e12fb 100644
--- a/block/deadline-iosched.c
+++ b/block/deadline-iosched.c
@@ -165,10 +165,9 @@ deadline_find_drq_hash(struct deadline_data *dd, sector_t offset)
165/* 165/*
166 * rb tree support functions 166 * rb tree support functions
167 */ 167 */
168#define RB_NONE (2)
169#define RB_EMPTY(root) ((root)->rb_node == NULL) 168#define RB_EMPTY(root) ((root)->rb_node == NULL)
170#define ON_RB(node) ((node)->rb_color != RB_NONE) 169#define ON_RB(node) (rb_parent(node) != node)
171#define RB_CLEAR(node) ((node)->rb_color = RB_NONE) 170#define RB_CLEAR(node) (rb_set_parent(node, node))
172#define rb_entry_drq(node) rb_entry((node), struct deadline_rq, rb_node) 171#define rb_entry_drq(node) rb_entry((node), struct deadline_rq, rb_node)
173#define DRQ_RB_ROOT(dd, drq) (&(dd)->sort_list[rq_data_dir((drq)->request)]) 172#define DRQ_RB_ROOT(dd, drq) (&(dd)->sort_list[rq_data_dir((drq)->request)])
174#define rq_rb_key(rq) (rq)->sector 173#define rq_rb_key(rq) (rq)->sector