md/raid5: Refactor add_stripe_bio()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:41 +0000 (13:19 -0600)
committerSong Liu <song@kernel.org>
Sun, 3 Jul 2022 14:55:42 +0000 (07:55 -0700)
commitb16d91f9b7ea286cff87173a3c4284a61f12f096
tree4693b8a5b8fd81d15f4da6ddb05a4b143c5bebf8
parent4fcbd9abb6f2a13017b5125539fb79b6b63fb570
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>
drivers/md/raid5.c