Re: [PATCH 1/3] btrfs: use ->devices list instead of ->alloc_list in btrfs_trim_fs

2018-09-14 Thread David Sterba
On Thu, Sep 06, 2018 at 05:18:14PM -0400, je...@suse.com wrote: > From: Jeff Mahoney > > btrfs_trim_fs iterates over the fs_devices->alloc_list while holding > the device_list_mutex. The problem is that ->alloc_list is protected > by the chunk mutex. We don't want to hold the chunk mutex over

[PATCH 1/3] btrfs: use ->devices list instead of ->alloc_list in btrfs_trim_fs

2018-09-06 Thread jeffm
From: Jeff Mahoney btrfs_trim_fs iterates over the fs_devices->alloc_list while holding the device_list_mutex. The problem is that ->alloc_list is protected by the chunk mutex. We don't want to hold the chunk mutex over the trim of the entire file system. Fortunately, the ->dev_list list is