diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-19 10:47:07 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-08-19 10:47:07 -0700 |
commit | 5ccc38740a283aba81a00e92941310d0c1aeb2ee (patch) | |
tree | ba7d725947975a9391e085bd1d5958b004bfdc3e /block/blk-core.c | |
parent | 0c3bef612881ee6216a36952ffaabfc35b83545c (diff) | |
parent | b53d1ed734a2b9af8da115b836b658daa7d47a48 (diff) | |
download | linux-5ccc38740a283aba81a00e92941310d0c1aeb2ee.tar.gz linux-5ccc38740a283aba81a00e92941310d0c1aeb2ee.tar.bz2 linux-5ccc38740a283aba81a00e92941310d0c1aeb2ee.zip |
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
* 'for-linus' of git://git.kernel.dk/linux-block: (23 commits)
Revert "cfq: Remove special treatment for metadata rqs."
block: fix flush machinery for stacking drivers with differring flush flags
block: improve rq_affinity placement
blktrace: add FLUSH/FUA support
Move some REQ flags to the common bio/request area
allow blk_flush_policy to return REQ_FSEQ_DATA independent of *FLUSH
xen/blkback: Make description more obvious.
cfq-iosched: Add documentation about idling
block: Make rq_affinity = 1 work as expected
block: swim3: fix unterminated of_device_id table
block/genhd.c: remove useless cast in diskstats_show()
drivers/cdrom/cdrom.c: relax check on dvd manufacturer value
drivers/block/drbd/drbd_nl.c: use bitmap_parse instead of __bitmap_parse
bsg-lib: add module.h include
cfq-iosched: Reduce linked group count upon group destruction
blk-throttle: correctly determine sync bio
loop: fix deadlock when sysfs and LOOP_CLR_FD race against each other
loop: add BLK_DEV_LOOP_MIN_COUNT=%i to allow distros 0 pre-allocated loop devices
loop: add management interface for on-demand device allocation
loop: replace linked list of allocated devices with an idr index
...
Diffstat (limited to 'block/blk-core.c')
-rw-r--r-- | block/blk-core.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b627558c461f..90e1ffdeb415 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1702,6 +1702,7 @@ EXPORT_SYMBOL_GPL(blk_rq_check_limits); int blk_insert_cloned_request(struct request_queue *q, struct request *rq) { unsigned long flags; + int where = ELEVATOR_INSERT_BACK; if (blk_rq_check_limits(q, rq)) return -EIO; @@ -1718,7 +1719,10 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq) */ BUG_ON(blk_queued_rq(rq)); - add_acct_request(q, rq, ELEVATOR_INSERT_BACK); + if (rq->cmd_flags & (REQ_FLUSH|REQ_FUA)) + where = ELEVATOR_INSERT_FLUSH; + + add_acct_request(q, rq, where); spin_unlock_irqrestore(q->queue_lock, flags); return 0; @@ -2275,7 +2279,7 @@ static bool blk_end_bidi_request(struct request *rq, int error, * %false - we are done with this request * %true - still buffers pending for this request **/ -static bool __blk_end_bidi_request(struct request *rq, int error, +bool __blk_end_bidi_request(struct request *rq, int error, unsigned int nr_bytes, unsigned int bidi_bytes) { if (blk_update_bidi_request(rq, error, nr_bytes, bidi_bytes)) |