]> git.baikalelectronics.ru Git - kernel.git/commit
md: raid10 add nowait support
authorVishal Verma <vverma@digitalocean.com>
Tue, 21 Dec 2021 20:06:21 +0000 (20:06 +0000)
committerSong Liu <song@kernel.org>
Thu, 6 Jan 2022 16:37:02 +0000 (08:37 -0800)
commit5593d1e6270ecb7b898e3083f412e3928c0095af
tree242a0831e41175c95cc68f966ebb2fc474e99c60
parent94e15c1fe0f9c9ea072c83d06cf3585ee3443819
md: raid10 add nowait support

This adds nowait support to the RAID10 driver. Very similar to
raid1 driver changes. It makes RAID10 driver return with EAGAIN
for situations where it could wait for eg:

  - Waiting for the barrier,
  - Reshape operation,
  - Discard operation.

wait_barrier() and regular_request_wait() fn are modified to return bool
to support error for wait barriers. They returns true in case of wait
or if wait is not required and returns false if wait was required
but not performed to support nowait.

Reviewed-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Vishal Verma <vverma@digitalocean.com>
Signed-off-by: Song Liu <song@kernel.org>
drivers/md/raid10.c