On 8/9/21 12:01 PM, Xiao Ni wrote:
In the first loop of function raid10_handle_discard. It already determines which disk need to handle discard request and add the rdev reference count. So the conf->mirrors will not change until all bios come back from underlayer disks. It doesn't need to use rcu_dereference to get rdev.
Can rdev be removed between the first loop and the second loop? Thanks, Guoqing