diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2009-01-06 03:16:05 -0500 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2009-01-30 06:34:37 -0500 |
commit | 213d9417fec62ef4c3675621b9364a667954d4dd (patch) | |
tree | d115a92085288d2d9c2ba0e8cbc573cccdcd8e46 /block | |
parent | 1308835ffffe6d61ad1f48c5c381c9cc47f683ec (diff) |
block: seperate bio/request unplug and sync bits
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index a824e49c0d0a..9e2e86fb78b8 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -1125,6 +1125,8 @@ void init_request_from_bio(struct request *req, struct bio *bio) | |||
1125 | 1125 | ||
1126 | if (bio_sync(bio)) | 1126 | if (bio_sync(bio)) |
1127 | req->cmd_flags |= REQ_RW_SYNC; | 1127 | req->cmd_flags |= REQ_RW_SYNC; |
1128 | if (bio_unplug(bio)) | ||
1129 | req->cmd_flags |= REQ_UNPLUG; | ||
1128 | if (bio_rw_meta(bio)) | 1130 | if (bio_rw_meta(bio)) |
1129 | req->cmd_flags |= REQ_RW_META; | 1131 | req->cmd_flags |= REQ_RW_META; |
1130 | 1132 | ||
@@ -1141,6 +1143,7 @@ static int __make_request(struct request_queue *q, struct bio *bio) | |||
1141 | int el_ret, nr_sectors; | 1143 | int el_ret, nr_sectors; |
1142 | const unsigned short prio = bio_prio(bio); | 1144 | const unsigned short prio = bio_prio(bio); |
1143 | const int sync = bio_sync(bio); | 1145 | const int sync = bio_sync(bio); |
1146 | const int unplug = bio_unplug(bio); | ||
1144 | int rw_flags; | 1147 | int rw_flags; |
1145 | 1148 | ||
1146 | nr_sectors = bio_sectors(bio); | 1149 | nr_sectors = bio_sectors(bio); |
@@ -1244,7 +1247,7 @@ get_rq: | |||
1244 | blk_plug_device(q); | 1247 | blk_plug_device(q); |
1245 | add_request(q, req); | 1248 | add_request(q, req); |
1246 | out: | 1249 | out: |
1247 | if (sync || blk_queue_nonrot(q)) | 1250 | if (unplug || blk_queue_nonrot(q)) |
1248 | __generic_unplug_device(q); | 1251 | __generic_unplug_device(q); |
1249 | spin_unlock_irq(q->queue_lock); | 1252 | spin_unlock_irq(q->queue_lock); |
1250 | return 0; | 1253 | return 0; |