linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 3/4] Btrfs: do not reset the eb ref count to 1 when aborting the transaction
Date: Thu, 31 May 2012 16:04:15 -0400	[thread overview]
Message-ID: <1338494656-12232-3-git-send-email-josef@redhat.com> (raw)
In-Reply-To: <1338494656-12232-1-git-send-email-josef@redhat.com>

This screws lots of things up and is just plain unnecessary, everything will
get cleaned up properly on it's own.  Most notably this was causing root
eb's to be evicted forcefully which meant that any readers still doing
anything would block trying to grab the root eb since it had a ref count of
0.  Thanks,

Signed-off-by: Josef Bacik <josef@redhat.com>
---
 fs/btrfs/disk-io.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 050db9b..b147a86 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -3519,11 +3519,9 @@ static int btrfs_destroy_marked_extents(struct btrfs_root *root,
 			     &(&BTRFS_I(page->mapping->host)->io_tree)->buffer,
 					       offset >> PAGE_CACHE_SHIFT);
 			spin_unlock(&dirty_pages->buffer_lock);
-			if (eb) {
+			if (eb)
 				ret = test_and_clear_bit(EXTENT_BUFFER_DIRTY,
 							 &eb->bflags);
-				atomic_set(&eb->refs, 1);
-			}
 			if (PageWriteback(page))
 				end_page_writeback(page);
 
-- 
1.7.7.6


  parent reply	other threads:[~2012-05-31 20:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-31 20:04 [PATCH 1/4] Btrfs: wake up transaction waiters when aborting a transaction Josef Bacik
2012-05-31 20:04 ` [PATCH 2/4] Btrfs: track transaction aborted across the fs_info Josef Bacik
2012-06-01  1:22   ` Liu Bo
2012-06-01 12:46     ` Josef Bacik
2012-05-31 20:04 ` Josef Bacik [this message]
2012-05-31 20:04 ` [PATCH 4/4] Btrfs: unlock everything properly in the error case for nocow Josef Bacik

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=1338494656-12232-3-git-send-email-josef@redhat.com \
    --to=josef@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).