]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid5: Make logic blocking check consistent with logic that blocks
authorLogan Gunthorpe <logang@deltatee.com>
Thu, 16 Jun 2022 19:19:31 +0000 (13:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Tue, 2 Aug 2022 23:14:40 +0000 (17:14 -0600)
commitb07f2e50e075ceb285fac7558d8354043a50071f
tree19e1e5e4c27cda3fc3052a85c545749673a43e43
parent7b9e9fbf7082b39a8aee4c3ab140374feae56603
md/raid5: Make logic blocking check consistent with logic that blocks

The check in raid5_make_request differs very slightly from the logic
that causes it to block lower down. This likely does not cause a bug
as the check is fuzzy anyway (as reshape may move on between the first
check and the subsequent check). However, make it consistent so it can
be cleaned up in a subsequent patch.

The condition which causes the schedule is:

 !(mddev->reshape_backwards ? logical_sector < conf->reshape_progress :
   logical_sector >= conf->reshape_progress) &&
  (mddev->reshape_backwards ? logical_sector < conf->reshape_safe :
   logical_sector >= conf->reshape_safe)

The condition that causes the early bailout is made to match this.

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