Thread (39 messages) 39 messages, 5 authors, 2021-09-28

Re: [PATCH v2 2/7] btrfs: do not take the uuid_mutex in btrfs_rm_device

From: Anand Jain <hidden>
Date: 2021-09-20 09:42:01


On 20/09/2021 16:26, David Sterba wrote:
On Mon, Sep 20, 2021 at 03:45:14PM +0800, Anand Jain wrote:
quoted
This patch is causing btrfs/225 to fail [here].

------
static void close_fs_devices(struct btrfs_fs_devices *fs_devices)
{
          struct btrfs_device *device, *tmp;

          lockdep_assert_held(&uuid_mutex);  <--- here
-------

as this patch removed mutex_lock(&uuid_mutex) in btrfs_rm_device().


commit 425c6ed6486f (btrfs: do not hold device_list_mutex when closing
devices) added lockdep_assert_held(&uuid_mutex) in close_fs_devices().


But mutex_lock(&uuid_mutex) in btrfs_rm_device() is not essential as we
discussed/proved earlier.

Remove lockdep_assert_held(&uuid_mutex) in close_fs_devices() is a
better choice.
This is the other patch that's still not in misc-next. I merged the
branch partially and in a different order so that causes the lockdep
warning. I can remove the patch "btrfs: do not take the uuid_mutex in
btrfs_rm_device" from misc-next for now and merge the whole series in
the order as sent but there were comments so I'm waiting for an update.
Ha ha. I think you are confused, even I was. The problem assert is at 
close_fs_devices() not clone_fs_devices() (as in 7/7). They are 
similarly named.

A variant of 7/7 is already merged.
c124706900c2 btrfs: fix lockdep warning while mounting sprout fs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help