block: fix DISCARD_BARRIER requests
authorChristoph Hellwig <hch@lst.de>
Thu, 17 Jun 2010 07:54:32 +0000 (09:54 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Thu, 17 Jun 2010 08:10:53 +0000 (10:10 +0200)
commitfbbf055692aeb25c54c49d9ca84532de836fbba0
treedf058ee803db2b5c8362fd2f2e8f60eacbd9138a
parent79600aadcf35dd31ec284928cf45296fea98db61
block: fix DISCARD_BARRIER requests

Filesystems assume that DISCARD_BARRIER are full barriers, so that they
don't have to track in-progress discard operation when submitting new I/O.
But currently we only treat them as elevator barriers, which don't
actually do the nessecary queue drains.

Also remove the unlikely around both the DISCARD and BARRIER requests -
the happen far too often for a static mispredict.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
block/blk-core.c