xfs
[Top] [All Lists]

Some questions about XFS design

To: linux-xfs@xxxxxxxxxxx
Subject: Some questions about XFS design
From: unDEFER <undefer@xxxxxxxxx>
Date: Mon, 17 Apr 2006 19:07:28 +0400
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:to:subject:from:content-type:mime-version:content-transfer-encoding:message-id:user-agent; b=Qwh2K4vCX07KB1p+OCQSqB1flwhWbCUmleEeHMRmNQi74WCcbfqecUcc99QCSW+AmtUQjWlX3EbK2QPy0Cwrg4Su9EZBkBpHvMeG+xJcFiwdr0L9vxrHwTdKAfc35kxjpUHobn7SjQ2uBuYjj8x1KN6qVmPdgNPnUqEBDrrCFO0=
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Opera M2/8.50 (Linux, build 1358)
Hello!
I try to understand XFS structure (I need it so as I will write build_xfs util like build_e2fs for anyfs-tools.sf.net project) and have some questions. I have understood superblock structure, alocation and inode allocation B-trees structures, inode core, extent list and directory structures, but I have some problem with Block Map. According information in xfsprogs-2.7.11/include/xfs_dinode.h, if di_format field of di_core have value 3 (XFS_DINODE_FMT_BTREE), then union inode have xfs_bmdr_block_t structure format, but seems it is not so. Below, I put some commented hexdump of structure of 0x84 inode (I expect, you have monospace type in your mail reader):

***Start of dxfs_dinode structure***
***Start of di_core structure***

            +-- di_magic ('IN')
            |
            |     +-- di_mode (it is regular file)
            |     |
            |     |   +-- di_version
            |     |   |
            |     |   |  +-- di_format (XFS_DINODE_FMT_BTREE)
            |     |   |  |
          +---+ +---+ ++ ++
00008400 49 4e 81 a4 01 03 00 01 00 00 01 f4 00 00 01 f5 |IN ╓.......Т...У| 00008410 00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 e5 |...............Е| 00008420 44 3a 80 d7 1e 54 43 d0 41 e8 68 9a 00 00 00 00 |D: в.TCпAХh ....| 00008430 42 1b 7d 18 2c d5 ec 08 00 00 00 00 27 c0 04 00 |B.}.,уЛ.....'ю..|

+-- di_nextents (10 extents)
                                                 |
                                               +---------+
00008440 00 00 00 00 00 02 7c 02 00 00 00 00 00 00 00 0a |......|.........| 00008450 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 0e |................|
***End of di_core structure***

            +-- di_next_unlinked (it is not unlinked file)
            |
            |           +-- bb_level of xfs_bmdr_block_t structure???
            |           |
| | +-- bb_numrecs of xfs_bmdr_block_t structure???
            |           |     |
            |           |     |      +-- Why we have zeroes here?
            |           |     |      |
          +---------+ +---+ +---+  +---------------------+
00008460 ff ff ff ff 00 01 00 01 00 00 00 00 00 00 00 00 |ЪЪЪЪ............|

!!! Here we have piece of old data of extent list. Why??? !!!
00008470 e5 a1 c8 00 00 00 00 00 03 90 00 00 00 00 00 8d |Е║х...... ..... | 00008480 41 a0 11 40 00 00 00 00 03 b2 80 00 00 00 00 91 |A .@.....╡ .... | 00008490 e1 a0 12 e0 00 00 00 00 03 d8 40 00 00 00 00 96 |А .Ю.....ь@.... | 000084a0 ad a0 14 60 00 00 00 00 04 01 00 00 00 00 00 9c |╜ .`........... |
!!! End if piece of old data of extent list !!!

            +-- It is seems, 64 bit link to btree block.
            |
          +---------------------+
000084b0 00 00 00 00 00 05 e0 6f 00 00 00 00 00 00 00 00 |......Юo........| 000084c0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000084d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000084e0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................| 000084f0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
***End of Inode***

So, I don't understand why we skip 0x50 bytes after some structure similar to btree root and what is it if not btree root block...

Sorry for bad english. My native language is russian.

--
registered Linux user #360474
Don't worry, I can read OpenOffice.org


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