md/raid5: Refactor add_stripe_bio()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:41 +0000 (13:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:42 +0000 (17:14 -0600)
commit4ad1d9849ffa8738b5e9b3f8bda5f17d3b31dfcd
treeee5505d7e0357c6a7b540c120bd685016dba3395
parent3312e6c887fe7539f0adb5756ab9020282aaa3d4
md/raid5: Refactor add_stripe_bio()

Factor out two helper functions from add_stripe_bio(): one to check for
overlap (stripe_bio_overlaps()), and one to actually add the bio to the
stripe (__add_stripe_bio()). The latter function will always succeed.

This will be useful in the next patch so that overlap can be checked for
multiple disks before adding any

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Song Liu <song@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/raid5.c