public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: xfs@oss.sgi.com
Subject: [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool
Date: Tue,  9 Feb 2016 17:32:19 +0100	[thread overview]
Message-ID: <1455035539-24535-2-git-send-email-hch@lst.de> (raw)
In-Reply-To: <1455035539-24535-1-git-send-email-hch@lst.de>

Without this xfstests starts crashing and burning in generic/003.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/libxfs/xfs_refcount_btree.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/fs/xfs/libxfs/xfs_refcount_btree.c b/fs/xfs/libxfs/xfs_refcount_btree.c
index 31e1b2d..f78041c 100644
--- a/fs/xfs/libxfs/xfs_refcount_btree.c
+++ b/fs/xfs/libxfs/xfs_refcount_btree.c
@@ -539,6 +539,10 @@ xfs_refcountbt_free_reserve_pool(
 	pool_len = 0;
 	for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) {
 		pag = xfs_perag_get(mp, agno);
+		if (!pag->pagf_refcountbt_resv) {
+			xfs_perag_put(pag);
+			continue;
+		}
 		i = xfs_ag_resv_blocks(pag->pagf_refcountbt_resv);
 		if (pool_len < i)
 			pool_len = i;
-- 
2.1.4

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2016-02-09 16:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 16:32 a small fix for the reflink tree Christoph Hellwig
2016-02-09 16:32 ` Christoph Hellwig [this message]
2016-02-10  1:38   ` [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool Darrick J. Wong

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=1455035539-24535-2-git-send-email-hch@lst.de \
    --to=hch@lst.de \
    --cc=darrick.wong@oracle.com \
    --cc=xfs@oss.sgi.com \
    /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