Skip to contentSkip to conversation

a small fix for the reflink tree

PATCH In review Christoph Hellwig 2 participants 3 messages Feb 9, 2016 – Feb 10, 2016 XFS filesystem

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool

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

---
 fs/xfs/libxfs/xfs_refcount_btree.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/xfs/libxfs/xfs_refcount_btree.c +4 -0
index 31e1b2d..f78041c 100644
@@ -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;
Signature · 6 lines
2.1.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw

Re: [PATCH] xfs: handle AGs without reservation in xfs_refcountbt_free_reserve_pool

Quoted 3 lines · Christoph Hellwig

See http://www.infradead.org/rpr.html

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

Good catch, thanks. Will apply.

--D

Quoted 24 lines
---
 fs/xfs/libxfs/xfs_refcount_btree.c | 4 ++++
 1 file changed, 4 insertions(+)
fs/xfs/libxfs/xfs_refcount_btree.c +4 -0
index 31e1b2d..f78041c 100644
@@ -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;
Signature · 1 line
2.1.4

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs