]> git.baikalelectronics.ru Git - kernel.git/commit
block: refactor the bounce buffering code
authorChristoph Hellwig <hch@lst.de>
Wed, 31 Mar 2021 07:30:00 +0000 (09:30 +0200)
committerJens Axboe <axboe@kernel.dk>
Tue, 6 Apr 2021 15:28:17 +0000 (09:28 -0600)
commit0e66eb546c8d6365febd08d81e7d8cb6e31c3dc0
tree7c503535797f615db7360dc4aa9081c68bffbded
parent6a16c0deca93c40edb494ad318cda8a54faeac48
block: refactor the bounce buffering code

Get rid of all the PFN arithmetics and just use an enum for the two
remaining options, and use PageHighMem for the actual bounce decision.

Add a fast path to entirely avoid the call for the common case of a queue
not using the legacy bouncing code.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Link: https://lore.kernel.org/r/20210331073001.46776-8-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-core.c
block/blk-settings.c
block/blk.h
block/bounce.c
include/linux/blkdev.h