* [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc @ 2016-11-23 6:59 Darrick J. Wong 2016-11-23 6:59 ` [PATCH 2/2] docs: update refcount btree to reflect new cow staging extent policy Darrick J. Wong 2016-11-29 20:13 ` [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc Christoph Hellwig 0 siblings, 2 replies; 4+ messages in thread From: Darrick J. Wong @ 2016-11-23 6:59 UTC (permalink / raw) To: david, darrick.wong; +Cc: linux-xfs Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- .../allocation_groups.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/XFS_Filesystem_Structure/allocation_groups.asciidoc b/design/XFS_Filesystem_Structure/allocation_groups.asciidoc index 38d7357..51ca57d 100644 --- a/design/XFS_Filesystem_Structure/allocation_groups.asciidoc +++ b/design/XFS_Filesystem_Structure/allocation_groups.asciidoc @@ -636,7 +636,7 @@ The size of the reference count B+tree in this allocation group, in blocks. *agf_refcount_root*:: Block number for the root of the reference count B+tree, if enabled. -*agf_refcount_root*:: +*agf_refcount_level*:: Depth of the reference count B+tree, if enabled. *agf_spare64*:: ^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] docs: update refcount btree to reflect new cow staging extent policy 2016-11-23 6:59 [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc Darrick J. Wong @ 2016-11-23 6:59 ` Darrick J. Wong 2016-11-29 20:13 ` Christoph Hellwig 2016-11-29 20:13 ` [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc Christoph Hellwig 1 sibling, 1 reply; 4+ messages in thread From: Darrick J. Wong @ 2016-11-23 6:59 UTC (permalink / raw) To: david, darrick.wong; +Cc: linux-xfs We now record the extents being used to stage a copy on write operation in the refcount btree with the high bit of rc_startblock set and a reference count of 1. Setting the high bit helps us reduce CoW GC time at mount by moving all the records to the right side of the tree. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- .../XFS_Filesystem_Structure/refcountbt.asciidoc | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/design/XFS_Filesystem_Structure/refcountbt.asciidoc b/design/XFS_Filesystem_Structure/refcountbt.asciidoc index dbbb98e..508a9dd 100644 --- a/design/XFS_Filesystem_Structure/refcountbt.asciidoc +++ b/design/XFS_Filesystem_Structure/refcountbt.asciidoc @@ -25,7 +25,10 @@ struct xfs_refcount_rec { ---- *rc_startblock*:: -AG block number of this record. +AG block number of this record. The high bit is set for all records +referring to an extent that is being used to stage a copy on write +operation. This reduces recovery time during mount operations. The +reference count of these staging events must only be 1. *rc_blockcount*:: The length of this extent. @@ -81,12 +84,18 @@ lsn = 0x200004ec2 uuid = f1f89746-e00b-49c9-96b3-ecef0f2f14ae owner = 0 crc = 0xc3962813 (correct) -recs[1-80] = [startblock,blockcount,refcount] - 1:[65780,1,2] 2:[65781,1,3] 3:[65785,2,2] 4:[66640,1,2] - 5:[69602,4,2] 6:[72256,16,2] 7:[72871,4,2] 8:[72879,20,2] - 9:[73395,4,2] 10:[75063,4,2] 11:[79093,4,2] 12:[86344,16,2] +recs[1-80] = [startblock,blockcount,refcount,cowflag] + 1:[65780,1,2,0] 2:[65781,1,3,0] 3:[65785,2,2,0] 4:[66640,1,2,0] + 5:[69602,4,2,0] 6:[72256,16,2,0] 7:[72871,4,2,0] 8:[72879,20,2,0] + 9:[73395,4,2,0] 10:[75063,4,2,0] 11:[79093,4,2,0] 12:[86344,16,2,0] + ... + 80:[35235,10,1,1] ---- +Notice record 80. The copy on write flag is set and the reference count is +1, which indicates that the extent 35,235 - 35,244 are being used to stage a +copy on write activity. The "cowflag" field is the high bit of rc_startblock. + Record 6 in the reference count B+tree for AG 0 indicates that the AG extent starting at block 72,256 and running for 16 blocks has a reference count of 2. This means that there are two files sharing the block: ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] docs: update refcount btree to reflect new cow staging extent policy 2016-11-23 6:59 ` [PATCH 2/2] docs: update refcount btree to reflect new cow staging extent policy Darrick J. Wong @ 2016-11-29 20:13 ` Christoph Hellwig 0 siblings, 0 replies; 4+ messages in thread From: Christoph Hellwig @ 2016-11-29 20:13 UTC (permalink / raw) To: Darrick J. Wong; +Cc: david, linux-xfs Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc 2016-11-23 6:59 [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc Darrick J. Wong 2016-11-23 6:59 ` [PATCH 2/2] docs: update refcount btree to reflect new cow staging extent policy Darrick J. Wong @ 2016-11-29 20:13 ` Christoph Hellwig 1 sibling, 0 replies; 4+ messages in thread From: Christoph Hellwig @ 2016-11-29 20:13 UTC (permalink / raw) To: Darrick J. Wong; +Cc: david, linux-xfs Looks good, Reviewed-by: Christoph Hellwig <hch@lst.de> ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-11-29 20:13 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-11-23 6:59 [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc Darrick J. Wong 2016-11-23 6:59 ` [PATCH 2/2] docs: update refcount btree to reflect new cow staging extent policy Darrick J. Wong 2016-11-29 20:13 ` Christoph Hellwig 2016-11-29 20:13 ` [PATCH 1/2] docs: fix a typo in the AGF section of the disk format doc Christoph Hellwig
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).