block: add a lower-level bio_add_page interface
authorChristoph Hellwig <hch@lst.de>
Fri, 1 Jun 2018 16:03:05 +0000 (09:03 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 2 Jun 2018 01:37:32 +0000 (18:37 -0700)
commit0aa69fd32a5f766e997ca8ab4723c5a1146efa8b
treeb86c0cb774082d38cb98b791a4d18b8efc4360b7
parent16858f7c21156e676c98a5f6532f68cacbde3784
block: add a lower-level bio_add_page interface

For the upcoming removal of buffer heads in XFS we need to keep track of
the number of outstanding writeback requests per page.  For this we need
to know if bio_add_page merged a region with the previous bvec or not.
Instead of adding additional arguments this refactors bio_add_page to
be implemented using three lower level helpers which users like XFS can
use directly if they care about the merge decisions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
block/bio.c
include/linux/bio.h