Re: [PATCH 1/1] md/raid10: Remove rcu_dereference when it doesn't need rcu lock to protect

From
Guoqing Jiang <hidden>
Date
2021-08-16 06:36:07
Reply to
Xiao Ni, 2021-08-09

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
Thread (6 messages) 6 messages, 3 authors, last reply 2021-08-16
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help