xfs
[Top] [All Lists]

[Question] how to know which blocks are used?

To: <linux-xfs@xxxxxxxxxxx>
Subject: [Question] how to know which blocks are used?
From: "weafon" <weafon@xxxxxxxxxxxxxxx>
Date: Tue, 17 May 2005 11:45:19 +0800
Sender: linux-xfs-bounce@xxxxxxxxxxx
Hi,
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 
"freelist" structure.

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 
AGF, 
or explaining how the XFS code build a b+tree from the AGF ad freelist?

Thx.

Regards,
Shih-Chiang Tsao
http://speed.cis.nctu.edu.tw/~weafon

[[HTML alternate version deleted]]


<Prev in Thread] Current Thread [Next in Thread>