From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: xfs@oss.sgi.com
Subject: Re: block allocations for the refcount btree
Date: Wed, 2 Mar 2016 13:21:01 -0800 [thread overview]
Message-ID: <20160302212101.GF27973@birch.djwong.org> (raw)
In-Reply-To: <20160302165704.GA31438@infradead.org>
On Wed, Mar 02, 2016 at 08:57:04AM -0800, Christoph Hellwig wrote:
> On Wed, Mar 02, 2016 at 08:41:02AM -0800, Darrick J. Wong wrote:
> > Hmm, I'll give it a spin when I get in later. Can you send me xfs_info
> > output so I can try to construct an equivalent reproducer setup?
>
> root@vm:~/xfstests# xfs_info /mnt/scratch/
> meta-data=/dev/vdc isize=512 agcount=320, agsize=8192 blks
> = sectsz=512 attr=2, projid32bit=1
> = crc=1 finobt=1 spinodes=0 rmapbt=0
> = reflink=1
> data = bsize=4096 blocks=2621440, imaxpct=25
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0 ftype=1
> log =internal bsize=4096 blocks=2560, version=2
> = sectsz=512 sunit=0 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
Ok. I think the problem is that making changes to the refcount btree eats
up our entire reservation in certain cases. Can you try the following bandaid?
This should give us enough room to handle splitting the btree at both ends
of a range that we're refcount-changing.
Come to think of it, this might not be enough -- if we want to change the
refcount of an n-block extent, can we end up changing n/i_refc_mnr[0] blocks?
I suspect yes, but I'll think about that some more.
diff --git a/fs/xfs/libxfs/xfs_trans_resv.c b/fs/xfs/libxfs/xfs_trans_resv.c
index cfd8a3c..54c5c22 100644
--- a/fs/xfs/libxfs/xfs_trans_resv.c
+++ b/fs/xfs/libxfs/xfs_trans_resv.c
@@ -86,7 +86,7 @@ xfs_allocfree_log_count(
if (xfs_sb_version_hasrmapbt(&mp->m_sb))
blocks += num_ops * (2 * mp->m_rmap_maxlevels - 1);
if (xfs_sb_version_hasreflink(&mp->m_sb))
- blocks += num_ops * (2 * mp->m_refc_maxlevels - 1);
+ blocks += 2 * num_ops * (2 * mp->m_refc_maxlevels - 1);
return blocks;
}
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2016-03-02 21:21 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-10 9:30 block allocations for the refcount btree Christoph Hellwig
2016-02-10 9:50 ` Darrick J. Wong
2016-02-10 19:07 ` Christoph Hellwig
2016-02-10 21:40 ` Dave Chinner
2016-02-11 14:09 ` Brian Foster
2016-02-11 20:21 ` Dave Chinner
2016-02-12 19:10 ` Christoph Hellwig
2016-02-13 2:33 ` Dave Chinner
2016-02-13 4:44 ` Darrick J. Wong
2016-02-13 8:02 ` Christoph Hellwig
2016-02-13 7:48 ` Christoph Hellwig
2016-02-14 0:21 ` Dave Chinner
2016-03-01 18:18 ` Darrick J. Wong
2016-03-01 20:40 ` Christoph Hellwig
2016-03-02 5:24 ` Darrick J. Wong
2016-03-02 9:59 ` Christoph Hellwig
2016-03-02 16:41 ` Darrick J. Wong
2016-03-02 16:57 ` Christoph Hellwig
2016-03-02 21:21 ` Darrick J. Wong [this message]
2016-03-03 14:05 ` Christoph Hellwig
2016-03-04 1:36 ` 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=20160302212101.GF27973@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=hch@infradead.org \
--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