diff options
author | NeilBrown <neilb@suse.com> | 2016-11-09 10:21:32 +1100 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-11-09 12:53:24 -0800 |
commit | f2c771a655046f21bb70d5813aa94979d2bd49c9 (patch) | |
tree | 16a0829775a7042fc72fd7bf2fd8d368ee251dc2 /drivers/md/raid1.h | |
parent | 85c9ccd4f026aad8e91ec1c182206e807cff932d (diff) | |
download | linux-f2c771a655046f21bb70d5813aa94979d2bd49c9.tar.bz2 |
md/raid1: fix: IO can block resync indefinitely
While performing a resync/recovery, raid1 divides the
array space into three regions:
- before the resync
- at or shortly after the resync point
- much further ahead of the resync point.
Write requests to the first or third do not need to wait. Write
requests to the middle region do need to wait if resync requests are
pending.
If there are any active write requests in the middle region, resync
will wait for them.
Due to an accounting error, there is a small range of addresses,
between conf->next_resync and conf->start_next_window, where write
requests will *not* be blocked, but *will* be counted in the middle
region. This can effectively block resync indefinitely if filesystem
writes happen repeatedly to this region.
As ->next_window_requests is incremented when the sector is after
conf->start_next_window + NEXT_NORMALIO_DISTANCE
the same boundary should be used for determining when write requests
should wait.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'drivers/md/raid1.h')
0 files changed, 0 insertions, 0 deletions