md/raid5: Move stripe_add_to_batch_list() call out of add_stripe_bio()
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:34 +0000 (13:19 -0600)
committerSong Liu <song@kernel.org>
Sun, 3 Jul 2022 14:55:40 +0000 (07:55 -0700)
commitec877594ad5775c0fed459e15f43907e37fcf1e5
tree7d2f8737f871e53a61d22267b4e4c8078ed43a25
parente07b250b9da96faf1c4a4b06b786c16243d2436e
md/raid5: Move stripe_add_to_batch_list() call out of add_stripe_bio()

stripe_add_to_batch_list() is better done in the loop in make_request
instead of inside add_stripe_bio(). This is clearer and allows for
storing the batch_head state outside the loop in a subsequent patch.

The call to add_stripe_bio() in retry_aligned_read() is for read
and batching only applies to write. So it's impossible for batching
to happen at that call site.

No functional changes intended.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Guoqing Jiang <guoqing.jiang@linux.dev>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid5.c