Re: [PATCH 0/4] Misc cleanups around device addition

David Sterba
2020-08-28T15:50:04Z

On Wed, Jul 22, 2020 at 11:09:21AM +0300, Nikolay Borisov wrote:
> Here are 4 minor cleanups around btrfs_init_new_device. First one converts
> a readonly usage of device_lists to using RCU. Second patch slightly simplifies
> the logic around locking when seed device is used. Third one removes a leftover
> from rewrite of btrfs_free_stale_devices. And the final one replaces an
> opencoded filemap_write_and_wait on the bdev inode with the more consistent
> sync_blockdev.
>
> All these have passed xfstest and don't constitute functional changes.
>
> Nikolay Borisov (4):
> btrfs: Use rcu when iterating devices in btrfs_init_new_device
> btrfs: Refactor locked condition in btrfs_init_new_device
> btrfs: Remove redundant code from btrfs_free_stale_devices
> btrfs: Don't opencode sync_blockdev

Added to for-next, thanks. I've updated patch 1 with explanation why RCU
is safe.