From: Josef Bacik <josef@redhat.com>
To: Jim Schutt <jaschut@sandia.gov>
Cc: linux-btrfs@vger.kernel.org, ceph-devel@vger.kernel.org
Subject: Re: stalls with latest btrfs merge into 3.0-rc2
Date: Mon, 13 Jun 2011 21:01:53 -0400 [thread overview]
Message-ID: <4DF6B301.90904@redhat.com> (raw)
In-Reply-To: <4DF67C06.4000307@sandia.gov>
[-- Attachment #1: Type: text/plain, Size: 449 bytes --]
On 06/13/2011 05:07 PM, Jim Schutt wrote:
> Hi,
>
> On a system under a heavy write load from multiple ceph OSDs,
> I'm running into the following hung tasks where btrfs is implicated.
> I'm running commit 3c25fa740e2 from Linus' tree merged with
> commit cb9b41c92fa from git://ceph.newdream.net/git/ceph-client.git.
>
Please try this patch and verify it fixes the problem. If it does I'll
make it less crappy and send it along. Thanks,
Josef
[-- Attachment #2: test-fix.patch --]
[-- Type: text/plain, Size: 818 bytes --]
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c
index 7a9f517..532139e 100644
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@ -1236,12 +1236,16 @@ int btrfs_commit_transaction(struct btrfs_trans_handle *trans,
schedule_timeout(1);
finish_wait(&cur_trans->writer_wait, &wait);
- spin_lock(&root->fs_info->trans_lock);
- root->fs_info->trans_no_join = 1;
- spin_unlock(&root->fs_info->trans_lock);
} while (atomic_read(&cur_trans->num_writers) > 1 ||
(should_grow && cur_trans->num_joined != joined));
+ spin_lock(&root->fs_info->trans_lock);
+ root->fs_info->trans_no_join = 1;
+ spin_unlock(&root->fs_info->trans_lock);
+
+ while (atomic_read(&cur_trans->num_writers) > 1)
+ schedule_timeout(1);
+
ret = create_pending_snapshots(trans, root->fs_info);
BUG_ON(ret);
next prev parent reply other threads:[~2011-06-14 1:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-13 21:07 stalls with latest btrfs merge into 3.0-rc2 Jim Schutt
2011-06-13 23:51 ` Chris Samuel
2011-06-14 0:47 ` Josef Bacik
2011-06-14 1:01 ` Josef Bacik [this message]
2011-06-14 15:13 ` Jim Schutt
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=4DF6B301.90904@redhat.com \
--to=josef@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=jaschut@sandia.gov \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox