diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 4 | ||||
-rw-r--r-- | block/blk-flush.c | 1 | ||||
-rw-r--r-- | block/blk.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 4ce953f1b390..fc7d8ad76f44 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->flush_rq != rq) { | 139 | if (!(rq->cmd_flags & REQ_FLUSH_SEQ)) { |
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)) |
@@ -1789,7 +1789,7 @@ static void blk_account_io_done(struct request *req) | |||
1789 | * normal IO on queueing nor completion. Accounting the | 1789 | * normal IO on queueing nor completion. Accounting the |
1790 | * containing request is enough. | 1790 | * containing request is enough. |
1791 | */ | 1791 | */ |
1792 | if (blk_do_io_stat(req) && req != &req->q->flush_rq) { | 1792 | if (blk_do_io_stat(req) && !(req->cmd_flags & REQ_FLUSH_SEQ)) { |
1793 | unsigned long duration = jiffies - req->start_time; | 1793 | unsigned long duration = jiffies - req->start_time; |
1794 | const int rw = rq_data_dir(req); | 1794 | const int rw = rq_data_dir(req); |
1795 | struct hd_struct *part; | 1795 | struct hd_struct *part; |
diff --git a/block/blk-flush.c b/block/blk-flush.c index 54b123d6563e..8592869bcbe7 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c | |||
@@ -130,6 +130,7 @@ static struct request *queue_next_fseq(struct request_queue *q) | |||
130 | BUG(); | 130 | BUG(); |
131 | } | 131 | } |
132 | 132 | ||
133 | rq->cmd_flags |= REQ_FLUSH_SEQ; | ||
133 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); | 134 | elv_insert(q, rq, ELEVATOR_INSERT_FRONT); |
134 | return rq; | 135 | return rq; |
135 | } | 136 | } |
diff --git a/block/blk.h b/block/blk.h index 2db8f32838e7..9d2ee8f4d9af 100644 --- a/block/blk.h +++ b/block/blk.h | |||
@@ -61,7 +61,7 @@ static inline struct request *__elv_next_request(struct request_queue *q) | |||
61 | while (!list_empty(&q->queue_head)) { | 61 | while (!list_empty(&q->queue_head)) { |
62 | rq = list_entry_rq(q->queue_head.next); | 62 | rq = list_entry_rq(q->queue_head.next); |
63 | if (!(rq->cmd_flags & (REQ_FLUSH | REQ_FUA)) || | 63 | if (!(rq->cmd_flags & (REQ_FLUSH | REQ_FUA)) || |
64 | rq == &q->flush_rq) | 64 | (rq->cmd_flags & REQ_FLUSH_SEQ)) |
65 | return rq; | 65 | return rq; |
66 | rq = blk_do_flush(q, rq); | 66 | rq = blk_do_flush(q, rq); |
67 | if (rq) | 67 | if (rq) |