I am writing a code for copying the XFS-format disk to another space disk.
The code is run without the support of XFS lib.
That is, the code has to read the structure of XFS by itself.
I went to know which block is used because I only plan to copy the used block
for saving time.
As I known, in XFS, a B+tree is used, instead of the tranditional bitmap
structure, to describe the free space.
When I view the raw data of a XFS partition, I see XFSB, AGF, AGI, and
What I cannot understand is
why only a short freelist [00 ~ 03] exists in the first AG even when there are
0xffff4 free blocks in the AG.
There are only 4 blocks described by the freelist.
Ps. is there any doc
explaining the relation between the internal structures, such as 'freelist' and
or explaining how the XFS code build a b+tree from the AGF ad freelist?
[[HTML alternate version deleted]]