suspend: simplify block I/O handling

Stop abusing struct page functionality and the swap end_io handler, and
instead add a modified version of the blk-lib.c bio_batch helpers.

Also move the block I/O code into swap.c as they are directly tied into
each other.

Signed-off-by: Christoph Hellwig <>
Tested-by: Pavel Machek <>
Tested-by: Ming Lin <>
Acked-by: Pavel Machek <>
Acked-by: Rafael J. Wysocki <>
Signed-off-by: Jens Axboe <>
6 files changed