]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix elevator init check
authorChristoph Hellwig <hch@lst.de>
Wed, 25 Jan 2017 10:17:11 +0000 (11:17 +0100)
committerJens Axboe <axboe@fb.com>
Fri, 27 Jan 2017 22:08:35 +0000 (15:08 -0700)
commit1588d742c2b366f6596cb9cc63606aa637fa369b
tree613eaa03a0b573ca8f0ef82d148bf1303c025d3d
parent448841231c24f879bc7058e7e1b6e355c11fed22
block: fix elevator init check

We can't initalize the elevator fields for flushes as flush share space
in struct request with the elevator data.  But currently we can't
communicate that a request is a flush through blk_get_request as we
can only pass READ or WRITE, and the low-level code looks at the
possible NULL bio to check for a flush.

Fix this by allowing to pass any block op and flags, and by checking for
the flush flags in __get_request.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-core.c