diff options
author | NeilBrown <neilb@suse.com> | 2016-06-02 16:19:52 +1000 |
---|---|---|
committer | Shaohua Li <shli@fb.com> | 2016-06-13 11:54:13 -0700 |
commit | 414e6b9a7032a6c2f5ddf018fdb199190b075170 (patch) | |
tree | c9876ef9b5a3b111ee93d0215bb27190f5cb6505 /kernel | |
parent | 8430e7e0af9a15063b90343e3beebc164c8e90f3 (diff) | |
download | linux-414e6b9a7032a6c2f5ddf018fdb199190b075170.tar.bz2 |
md/raid1, raid10: don't recheck "Faulty" flag in read-balance.
Re-checking the faulty flag here brings no value.
The comment about "risk" refers to the risk that the device could
be in the process of being removed by ->hot_remove_disk().
However providing that the ->nr_pending count is incremented inside
an rcu_read_locked() region, there is no risk of that happening.
This is because the rdev pointer (in the personalities array) is set
to NULL before synchronize_rcu(), and ->nr_pending is tested
afterwards. If the rcu_read_locked region happens before the
synchronize_rcu(), the test will see that nr_pending has been incremented.
If it happens afterwards, the rdev pointer will be NULL so there is nothing
to increment.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions