All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Jain <anand.jain@oracle.com>
To: linux-btrfs@vger.kernel.org
Cc: dsterba@suse.com, l@damenly.su
Subject: [PATCH 1/3] btrfs: fix comment about the btrfs_show_devname
Date: Fri, 20 Aug 2021 02:18:12 +0800	[thread overview]
Message-ID: <26445e25588c8216cd5b7dcc453bf42dd4707739.1629396187.git.anand.jain@oracle.com> (raw)
In-Reply-To: <cover.1629396187.git.anand.jain@oracle.com>

There were few lock dep warnings because btrfs_show_devname() was using
device_list_mutex as recorded in the commits
  ccd05285e7f (btrfs: fix a possible umount deadlock)
  779bf3fefa8 (btrfs: fix lock dep warning, move scratch dev out of
  device_list_mutex and uuid_mutex)

And finally, commit 88c14590cdd6 (btrfs: use RCU in btrfs_show_devname
for device list traversal) removed the device_list_mutex from
btrfs_show_devname for performance reasons.

This patch fixes a stale comment about the function btrfs_show_devname.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/volumes.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 9cb4ed90888d..91b8422b3f67 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -2278,10 +2278,7 @@ void btrfs_destroy_dev_replace_tgtdev(struct btrfs_device *tgtdev)
 
 	/*
 	 * The update_dev_time() with in btrfs_scratch_superblocks()
-	 * may lead to a call to btrfs_show_devname() which will try
-	 * to hold device_list_mutex. And here this device
-	 * is already out of device list, so we don't have to hold
-	 * the device_list_mutex lock.
+	 * may lead to a call to btrfs_show_devname().
 	 */
 	btrfs_scratch_superblocks(tgtdev->fs_info, tgtdev->bdev,
 				  tgtdev->name->str);
-- 
2.31.1


  reply	other threads:[~2021-08-19 18:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-19 18:18 [PATCH 0/3] btrf_show_devname related fixes Anand Jain
2021-08-19 18:18 ` Anand Jain [this message]
2021-08-19 18:18 ` [PATCH RFC 2/3] btrfs: consolidate device_list_mutex in prepare_sprout to its parent Anand Jain
2021-08-20  7:51   ` Su Yue
2021-08-20  8:53     ` Anand Jain
2021-08-21 14:57       ` Su Yue
2021-08-21 15:00         ` Su Yue
2021-08-23 10:34           ` Anand Jain
2021-08-23 10:54             ` Anand Jain
2021-08-23 12:20               ` David Sterba
2021-08-19 18:18 ` [PATCH RFC 3/3] btrfs: use latest_bdev in btrfs_show_devname Anand Jain
2021-08-20  7:31   ` Su Yue
2021-08-20  9:13     ` Anand Jain
2021-08-20 10:57   ` David Sterba
2021-08-20 11:03     ` Anand Jain

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=26445e25588c8216cd5b7dcc453bf42dd4707739.1629396187.git.anand.jain@oracle.com \
    --to=anand.jain@oracle.com \
    --cc=dsterba@suse.com \
    --cc=l@damenly.su \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.