diff options
author | Tejun Heo <tj@kernel.org> | 2010-09-03 05:56:16 -0400 |
---|---|---|
committer | Jens Axboe <jaxboe@fusionio.com> | 2010-09-10 06:35:36 -0400 |
commit | dd4c133f387c48f526022860ad70354637a80f4c (patch) | |
tree | 7b741150d37d327b69e483468278d9de3a43a4e1 /block/blk-core.c | |
parent | 8839a0e055d9abd6c011d533373a8dd266cad011 (diff) |
block: rename barrier/ordered to flush
With ordering requirements dropped, barrier and ordered are misnomers.
Now all block layer does is sequencing FLUSH and FUA. Rename them to
flush.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index d316662682c8..8870ae40179d 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -136,7 +136,7 @@ static void req_bio_endio(struct request *rq, struct bio *bio, | |||
136 | { | 136 | { |
137 | struct request_queue *q = rq->q; | 137 | struct request_queue *q = rq->q; |
138 | 138 | ||
139 | if (&q->bar_rq != rq) { | 139 | if (&q->flush_rq != rq) { |
140 | if (error) | 140 | if (error) |
141 | clear_bit(BIO_UPTODATE, &bio->bi_flags); | 141 | clear_bit(BIO_UPTODATE, &bio->bi_flags); |
142 | else if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) | 142 | else if (!test_bit(BIO_UPTODATE, &bio->bi_flags)) |
@@ -160,13 +160,12 @@ static void req_bio_endio(struct request *rq, struct bio *bio, | |||
160 | if (bio->bi_size == 0) | 160 | if (bio->bi_size == 0) |
161 | bio_endio(bio, error); | 161 | bio_endio(bio, error); |
162 | } else { | 162 | } else { |
163 | |||
164 | /* | 163 | /* |
165 | * Okay, this is the barrier request in progress, just | 164 | * Okay, this is the sequenced flush request in |
166 | * record the error; | 165 | * progress, just record the error; |
167 | */ | 166 | */ |
168 | if (error && !q->orderr) | 167 | if (error && !q->flush_err) |
169 | q->orderr = error; | 168 | q->flush_err = error; |
170 | } | 169 | } |
171 | } | 170 | } |
172 | 171 | ||
@@ -520,7 +519,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id) | |||
520 | init_timer(&q->unplug_timer); | 519 | init_timer(&q->unplug_timer); |
521 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); | 520 | setup_timer(&q->timeout, blk_rq_timed_out_timer, (unsigned long) q); |
522 | INIT_LIST_HEAD(&q->timeout_list); | 521 | INIT_LIST_HEAD(&q->timeout_list); |
523 | INIT_LIST_HEAD(&q->pending_barriers); | 522 | INIT_LIST_HEAD(&q->pending_flushes); |
524 | INIT_WORK(&q->unplug_work, blk_unplug_work); | 523 | INIT_WORK(&q->unplug_work, blk_unplug_work); |
525 | 524 | ||
526 | kobject_init(&q->kobj, &blk_queue_ktype); | 525 | kobject_init(&q->kobj, &blk_queue_ktype); |
@@ -1764,11 +1763,11 @@ static void blk_account_io_completion(struct request *req, unsigned int bytes) | |||
1764 | static void blk_account_io_done(struct request *req) | 1763 | static void blk_account_io_done(struct request *req) |
1765 | { | 1764 | { |
1766 | /* | 1765 | /* |
1767 | * Account IO completion. bar_rq isn't accounted as a normal | 1766 | * Account IO completion. flush_rq isn't accounted as a |
1768 | * IO on queueing nor completion. Accounting the containing | 1767 | * normal IO on queueing nor completion. Accounting the |
1769 | * request is enough. | 1768 | * containing request is enough. |
1770 | */ | 1769 | */ |
1771 | if (blk_do_io_stat(req) && req != &req->q->bar_rq) { | 1770 | if (blk_do_io_stat(req) && req != &req->q->flush_rq) { |
1772 | unsigned long duration = jiffies - req->start_time; | 1771 | unsigned long duration = jiffies - req->start_time; |
1773 | const int rw = rq_data_dir(req); | 1772 | const int rw = rq_data_dir(req); |
1774 | struct hd_struct *part; | 1773 | struct hd_struct *part; |