From: Dan Carpenter <dan.carpenter@oracle.com>
To: jeffm@suse.com
Cc: linux-btrfs@vger.kernel.org
Subject: re: btrfs: enhance transaction abort infrastructure
Date: Mon, 2 Apr 2012 12:08:54 +0300 [thread overview]
Message-ID: <20120402090854.GA9939@elgon.mountain> (raw)
Hi Jeff,
The patch 49b25e054090: "btrfs: enhance transaction abort
infrastructure" from Mar 1, 2012, leads to the following warning:
fs/btrfs/transaction.c:137 join_transaction()
warn: inconsistent returns spin_lock:&root->fs_info->trans_lock:
locked (77) unlocked (64,70,82,88,137)
fs/btrfs/transaction.c
74 cur_trans = root->fs_info->running_transaction;
75 if (cur_trans) {
76 if (cur_trans->aborted)
77 return cur_trans->aborted;
^^^^^^^^^^^^^^^^^^^^^^^^^^
Should we do a spin_unlock(&root->fs_info->trans_lock); here before
returning?
78 atomic_inc(&cur_trans->use_count);
79 atomic_inc(&cur_trans->num_writers);
80 cur_trans->num_joined++;
81 spin_unlock(&root->fs_info->trans_lock);
82 return 0;
83 }
84 spin_unlock(&root->fs_info->trans_lock);
Also later on:
1399 ret = commit_fs_roots(trans, root);
1400 if (ret) {
1401 mutex_unlock(&root->fs_info->tree_log_mutex);
1402 goto cleanup_transaction;
^^^^^^^^^^^^^^^^^^^^^^^^^
1403 }
1404
1405 /* commit_fs_roots gets rid of all the tree log roots, it is now
1406 * safe to free the root of tree log roots
1407 */
1408 btrfs_free_log_root_tree(trans, root->fs_info);
1409
1410 ret = commit_cowonly_roots(trans, root);
1411 if (ret) {
1412 mutex_unlock(&root->fs_info->tree_log_mutex);
1413 goto cleanup_transaction;
^^^^^^^^^^^^^^^^^^^^^^^^^
Should we do an mutex_unlock(&root->fs_info->reloc_mutex); before these
two gotos?
1414 }
regards,
dan carpenter
next reply other threads:[~2012-04-02 9:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 9:08 Dan Carpenter [this message]
2012-04-02 10:46 ` btrfs: enhance transaction abort infrastructure David Sterba
2012-04-02 12:48 ` Dan Carpenter
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=20120402090854.GA9939@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=jeffm@suse.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.