Thread (17 messages) 17 messages, 2 authors, 2022-06-03

Re: [PATCH v3 05/11] md/raid5-cache: Drop RCU usage of conf->log

From: Christoph Hellwig <hch@infradead.org>
Date: 2022-06-03 06:43:16
Also in: lkml

On Thu, Jun 02, 2022 at 12:18:11PM -0600, Logan Gunthorpe wrote:
The only place that uses RCU to access conf->log is in
r5l_log_disk_error(). This function is mostly used in the IO path
and once with mddev_lock() held in raid5_change_consistency_policy().

It is known that the IO will be suspended before the log is freed and
r5l_log_exit() is called with the mddev_lock() held.

This should mean that conf->log can not be freed while the function is
being called, so the RCU protection is not necessary. Drop the
rcu_read_lock() as well as the synchronize_rcu() and
rcu_assign_pointer() usage.
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help