public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* a small fix for the reflink tree
@ 2016-02-09 16:32 Christoph Hellwig
  2016-02-09 16:32 ` [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2016-02-09 16:32 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs

Otherwise xfstests is rather unhappy.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool
  2016-02-09 16:32 a small fix for the reflink tree Christoph Hellwig
@ 2016-02-09 16:32 ` Christoph Hellwig
  2016-02-10  1:38   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2016-02-09 16:32 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: xfs

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool
  2016-02-09 16:32 ` [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool Christoph Hellwig
@ 2016-02-10  1:38   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2016-02-10  1:38 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs

On Tue, Feb 09, 2016 at 05:32:19PM +0100, Christoph Hellwig wrote:
> See http://www.infradead.org/rpr.html
> 
> Without this xfstests starts crashing and burning in generic/003.

Good catch, thanks.  Will apply.

--D

> 
> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-10  1:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-09 16:32 a small fix for the reflink tree Christoph Hellwig
2016-02-09 16:32 ` [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool Christoph Hellwig
2016-02-10  1:38   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox