diff options
author | 2017-03-15 14:05:14 +1100 | |
---|---|---|
committer | 2017-03-22 19:18:18 -0700 | |
commit | 6497709b5d1bccce7de1df678d5f147d614551d1 (patch) | |
tree | fd6e21252c7bed7702f560cc1419b37d8bf5c0fd /tools/perf/scripts/python | |
parent | md/raid5: don't test ->writes_pending in raid5_remove_disk (diff) | |
download | wireguard-linux-6497709b5d1bccce7de1df678d5f147d614551d1.tar.xz wireguard-linux-6497709b5d1bccce7de1df678d5f147d614551d1.zip |
md: factor out set_in_sync()
Three separate places in md.c check if the number of active
writes is zero and, if so, sets mddev->in_sync.
There are a few differences, but there shouldn't be:
- it is always appropriate to notify the change in
sysfs_state, and there is no need to do this outside a
spin-locked region.
- we never need to check ->recovery_cp. The state of resync
is not relevant for whether there are any pending writes
or not (which is what ->in_sync reports).
So create set_in_sync() which does the correct tests and
makes the correct changes, and call this in all three
places.
Any behaviour changes here a minor and cosmetic.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions