public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* question about one example in section 3.2.3 of "XFS Filesystem Structure"
@ 2015-01-29 10:39 Wang Sheng-Hui
  2015-01-29 13:20 ` Brian Foster
  0 siblings, 1 reply; 3+ messages in thread
From: Wang Sheng-Hui @ 2015-01-29 10:39 UTC (permalink / raw)
  To: xfs

Dear,

I'm reading "XFS Filesystem Structure" from the link 
             http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/index.html
and confused by one example in section 3.2.3:
             http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/AG_Free_List.html
---------------------------------------------------------------------------
xfs_db> fsblock 7
xfs_db> type bnobt
xfs_db> p
magic = 0x41425442
level = 1
numrecs = 4
leftsib = null
rightsib = null
keys[1-4] = [startblock,blockcount]
           1:[12,16] 2:[184586,3] 3:[225579,1] 4:[511629,1]
ptrs[1-4] = 1:2 2:83347 3:6 4:4

Blocks 2, 83347, 6 and 4 contain the leaves for the free space B+tree by starting block. Block 2 would contain offsets 16 up to but not including 184586 while block 4 would have all offsets from 511629 to the end of the AG. 
---------------------------------------------------------------------------

I have thought block 2 contains offsets start from 12, and it will cover 16 free blocks.
I wonder why block 2 contains offsets start at 16, instead of 12 here?

Anyone help give out some explanation, please?

Regards,
Wang Sheng-Hui
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: question about one example in section 3.2.3 of "XFS Filesystem Structure"
  2015-01-29 10:39 question about one example in section 3.2.3 of "XFS Filesystem Structure" Wang Sheng-Hui
@ 2015-01-29 13:20 ` Brian Foster
  2015-01-29 22:32   ` Dave Chinner
  0 siblings, 1 reply; 3+ messages in thread
From: Brian Foster @ 2015-01-29 13:20 UTC (permalink / raw)
  To: Wang Sheng-Hui; +Cc: xfs

On Thu, Jan 29, 2015 at 06:39:51PM +0800, Wang Sheng-Hui wrote:
> Dear,
> 
> I'm reading "XFS Filesystem Structure" from the link 
>              http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/index.html
> and confused by one example in section 3.2.3:
>              http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/AG_Free_List.html
> ---------------------------------------------------------------------------
> xfs_db> fsblock 7
> xfs_db> type bnobt
> xfs_db> p
> magic = 0x41425442
> level = 1
> numrecs = 4
> leftsib = null
> rightsib = null
> keys[1-4] = [startblock,blockcount]
>            1:[12,16] 2:[184586,3] 3:[225579,1] 4:[511629,1]
> ptrs[1-4] = 1:2 2:83347 3:6 4:4
> 
> Blocks 2, 83347, 6 and 4 contain the leaves for the free space B+tree by starting block. Block 2 would contain offsets 16 up to but not including 184586 while block 4 would have all offsets from 511629 to the end of the AG. 
> ---------------------------------------------------------------------------
> 
> I have thought block 2 contains offsets start from 12, and it will cover 16 free blocks.
> I wonder why block 2 contains offsets start at 16, instead of 12 here?
> 

The text above looks like a typo to me. I believe the
[startblock,blockcount] shown in each higher level block of the btree
(e.g., level > 0) represents the first record available in the
associated block pointed at by 'ptr' (the next level down).

The above should say that block 2 contains offsets "12 up to but not
including 184586 ..." and so on. I'm not really sure what the process is
with these docs and where the source lies vs. what content is generated.
I thought Dave had done something a while back with intent to try and
organize docs but the details escape me... perhaps he can chime in on
if/how this can be edited, if you're willing to post a fix. ;)

Brian

> Anyone help give out some explanation, please?
> 
> Regards,
> Wang Sheng-Hui
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

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

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

* Re: question about one example in section 3.2.3 of "XFS Filesystem Structure"
  2015-01-29 13:20 ` Brian Foster
@ 2015-01-29 22:32   ` Dave Chinner
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Chinner @ 2015-01-29 22:32 UTC (permalink / raw)
  To: Brian Foster; +Cc: Wang Sheng-Hui, xfs

On Thu, Jan 29, 2015 at 08:20:24AM -0500, Brian Foster wrote:
> On Thu, Jan 29, 2015 at 06:39:51PM +0800, Wang Sheng-Hui wrote:
> > Dear,
> > 
> > I'm reading "XFS Filesystem Structure" from the link 
> >              http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/index.html
> > and confused by one example in section 3.2.3:
> >              http://xfs.org/docs/xfsdocs-xml-dev/XFS_Filesystem_Structure//tmp/en-US/html/AG_Free_List.html
> > ---------------------------------------------------------------------------
> > xfs_db> fsblock 7
> > xfs_db> type bnobt
> > xfs_db> p
> > magic = 0x41425442
> > level = 1
> > numrecs = 4
> > leftsib = null
> > rightsib = null
> > keys[1-4] = [startblock,blockcount]
> >            1:[12,16] 2:[184586,3] 3:[225579,1] 4:[511629,1]
> > ptrs[1-4] = 1:2 2:83347 3:6 4:4
> > 
> > Blocks 2, 83347, 6 and 4 contain the leaves for the free space B+tree by starting block. Block 2 would contain offsets 16 up to but not including 184586 while block 4 would have all offsets from 511629 to the end of the AG. 
> > ---------------------------------------------------------------------------
> > 
> > I have thought block 2 contains offsets start from 12, and it will cover 16 free blocks.
> > I wonder why block 2 contains offsets start at 16, instead of 12 here?
> > 
> 
> The text above looks like a typo to me. I believe the
> [startblock,blockcount] shown in each higher level block of the btree
> (e.g., level > 0) represents the first record available in the
> associated block pointed at by 'ptr' (the next level down).
> 
> The above should say that block 2 contains offsets "12 up to but not
> including 184586 ..." and so on. I'm not really sure what the process is
> with these docs and where the source lies vs. what content is generated.
> I thought Dave had done something a while back with intent to try and
> organize docs but the details escape me... perhaps he can chime in on
> if/how this can be edited, if you're willing to post a fix. ;)

I have an ascii-doc converted version of this document that I want
to become the master source for this published document in this
git tree:

git://oss.sgi.com/xfs/xfs-documentation.git

Patches to fix the documentation, or converting any of the other XFS
documentation to asciidoc format (including man pages, xml, stuff,
the faq page on the Wiki, etc) should be made against this
repository and sent to the list.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
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:[~2015-01-29 22:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-29 10:39 question about one example in section 3.2.3 of "XFS Filesystem Structure" Wang Sheng-Hui
2015-01-29 13:20 ` Brian Foster
2015-01-29 22:32   ` Dave Chinner

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