On 1.04.19 г. 20:07 ч., David Sterba wrote: > On Wed, Mar 27, 2019 at 02:24:11PM +0200, Nikolay Borisov wrote: >> btrfs_device structs are freed from RCU context since device iteration >> is protected by RCU. Currently this is achieved by using call_rcu since >> no blocking functions are called within btrfs_free_device. Future >> refactoring of pending/pinned chunks will require calling sleeping >> functions. This patch is in preparation for these changes by simply >> switching from RCU callbacks to explicit calls of synchronize_rcu and >> calling btrfs_free_device directly. > > A paragraph why this transition is correct would be good. It looks > correct to me, so this is a matter of documentation. > Well call_rcu and synchronize_rcu() are functionally equivalent in that they run the code that follows them after a grace period has expired.
- Re: [PATCH v4 13/15] btrfs: Optimize unallocated chun... David Sterba
- Re: [PATCH v4 13/15] btrfs: Optimize unallocated ... Nikolay Borisov
- [PATCH v4 09/15] btrfs: replace pending/pinned chunks list... Nikolay Borisov
- [PATCH v4 03/15] btrfs: Handle pending/pinned chunks befor... Nikolay Borisov
- Re: [PATCH v4 03/15] btrfs: Handle pending/pinned chu... David Sterba
- Re: [PATCH v4 03/15] btrfs: Handle pending/pinned... Nikolay Borisov
- Re: [PATCH v4 03/15] btrfs: Handle pending/pi... David Sterba
- [PATCH v4 04/15] btrfs: Rename and export clear_btree_io_t... Nikolay Borisov
- [PATCH v4 08/15] btrfs: Stop using call_rcu for device fre... Nikolay Borisov
- Re: [PATCH v4 08/15] btrfs: Stop using call_rcu for d... David Sterba
- Re: [PATCH v4 08/15] btrfs: Stop using call_rcu f... Nikolay Borisov
- Re: [PATCH v4 08/15] btrfs: Stop using call_r... David Sterba
- [PATCH v4 11/15] btrfs: Remove 'trans' argument from find_... Nikolay Borisov
- [PATCH v4 14/15] btrfs: Implement find_first_clear_extent_... Nikolay Borisov
- Re: [PATCH v4 00/15] FITRIM improvement David Sterba
- Re: [PATCH v4 00/15] FITRIM improvement Nikolay Borisov
- Re: [PATCH v4 00/15] FITRIM improvement Qu Wenruo
- Re: [PATCH v4 00/15] FITRIM improvement David Sterba