From: Carey Underwood <carey@scaletech.ca>
To: linux-btrfs@vger.kernel.org
Cc: jbacik@fusionio.com, idryomov@gmail.com, cwillu@cwillu.com
Subject: [RFC][PATCH] Btrfs: Release uuid_mutex for shrink during device delete
Date: Mon, 04 Mar 2013 16:37:06 -0600 [thread overview]
Message-ID: <1362436626.26135.16.camel@applicati> (raw)
Device scanning waits on the uuid_mutex, which can result in a very long
wait if dev delete is shrinking the device.
Signed-off-by: Carey Underwood <cwillu@cwillu.com>
---
fs/btrfs/volumes.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 5cce6aa..996af00 100644
--- a/fs/btrfs/volumes.c
+++ b/fs/btrfs/volumes.c
@@ -1468,7 +1468,9 @@ int btrfs_rm_device(struct btrfs_root *root, char *device_path)
clear_super = true;
}
+ mutex_unlock(&uuid_mutex);
ret = btrfs_shrink_device(device, 0);
+ mutex_lock(&uuid_mutex);
if (ret)
goto error_undo;
--
1.7.0.4
next reply other threads:[~2013-03-04 23:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-04 22:37 Carey Underwood [this message]
2013-03-20 15:41 ` [RFC][PATCH] Btrfs: Release uuid_mutex for shrink during device delete David Sterba
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=1362436626.26135.16.camel@applicati \
--to=carey@scaletech.ca \
--cc=cwillu@cwillu.com \
--cc=idryomov@gmail.com \
--cc=jbacik@fusionio.com \
--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.