Re: [PATCH v2 3/3] Btrfs: remove no longer necessary chunk mutex locking cases

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 01, 2020 at 07:12:27PM +0100, fdmanana@xxxxxxxxxx wrote:
> From: Filipe Manana <fdmanana@xxxxxxxx>
> 
> Initially when the 'removed' flag was added to a block group to avoid
> races between block group removal and fitrim, by commit 04216820fe83d5
> ("Btrfs: fix race between fs trimming and block group remove/allocation"),
> we had to lock the chunks mutex because we could be moving the block
> group from its current list, the pending chunks list, into the pinned
> chunks list, or we could just be adding it to the pinned chunks if it was
> not in the pending chunks list. Both lists were protected by the chunk
> mutex.
> 
> However we no longer have those lists since commit 1c11b63eff2a67
> ("btrfs: replace pending/pinned chunks lists with io tree"), and locking
> the chunk mutex is no longer necessary because of that. The same happens
> at btrfs_unfreeze_block_group(), we lock the chunk mutex because the block
> group's extent map could be part of the pinned chunks list and the call
> to remove_extent_mapping() could be deleting it from that list, which
> used to be protected by that mutex.
> 
> So just remove those lock and unlock calls as they are not needed anymore.
> 
> Signed-off-by: Filipe Manana <fdmanana@xxxxxxxx>
> ---
> 
> V2: Rebased on 5.8 changes, since the previous patch had to be rebased too.

2 and 3 in misc next, thanks.



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux