From: Xiaole He <hexiaole@xxxxxxxxxx> The image of 'design/XFS_Filesystem_Structure/images/31.png' depicts extent record format as below: +----+-------------------------+---------------------+------------+ |flag|bits 72 to 126(54) |bits 21 to 72(52) |bit 0-20(21)| | |logical file block offset|absolute block number|# blocks | +----+-------------------------+---------------------+------------+ There has a typo for 'logical file block offset' part, it writes 'bits 72 to 126', but it should be 'bits 73 to 126' because the 72st bit is consumed by 'absolute block number' part, this patch fix this problem and redrawing the image as below: +---------+-------------------------+---------------------+----------+ |bits[127]|bits[73-126] |bits[21-72] |bits[0-20]| +---------+-------------------------+---------------------+----------+ |flag |logical file block offset|absolute block number|# blocks | +---------+-------------------------+---------------------+----------+ Signed-off-by: Xiaole He <hexiaole@xxxxxxxxxx> Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> [djwong: convert the raw table above into asciidoc and remove the png] Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> --- Originally this patch was against 31.png itself, but apparently vger has been eating the entire thread because spam. It's very annoying that vger still lets through plenty of spam and phishing attempts while blocking legitimate patch submissions. Since there's nothing I can do about our crap infrastructure, I've taken the original patch submitter's table from the commit description and converted that directly into an asciidoc table format. I'll remove the PNG when I commit this patch, but I'm not including it here because you can't spell terrible without IT. --D --- .../XFS_Filesystem_Structure/data_extents.asciidoc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/design/XFS_Filesystem_Structure/data_extents.asciidoc b/design/XFS_Filesystem_Structure/data_extents.asciidoc index 4f1109b..29c78fe 100644 --- a/design/XFS_Filesystem_Structure/data_extents.asciidoc +++ b/design/XFS_Filesystem_Structure/data_extents.asciidoc @@ -17,7 +17,19 @@ vary depending on the extent allocator used in the XFS driver. An extent is 128 bits in size and uses the following packed layout: .Extent record format -image::images/31.png[] + +[cols="1,1,1,1"] +|=== +|bit[127] +|bits[73-126] +|bits[21-72] +|bits[0-20] + +|flag +|logical file block offset +|absolute block number +|# of blocks +|=== The extent is represented by the +xfs_bmbt_rec+ structure which uses a big endian format on-disk. In-core management of extents use the +xfs_bmbt_irec+