VirtualBox

Changeset 77008 in vbox for trunk/include/iprt


Ignore:
Timestamp:
Jan 26, 2019 6:54:44 PM (6 years ago)
Author:
vboxsync
Message:

Runtime/xfsvfs.cpp: Updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/formats/xfs.h

    r76644 r77008  
    442442    /** 0x40: Number of direct and B-Tree blocks used for the forks. */
    443443    uint64_t     cBlocks;
    444     /** 0x48: Minimum exten size for the inode. */
     444    /** 0x48: Minimum extent size for the inode. */
    445445    uint32_t     cExtentBlocksMin;
    446446    /** 0x4c: Number of extents in the data fork. */
     
    634634
    635635
     636/**
     637 * XFS B+Tree root header.
     638 */
     639typedef struct XFSBTREEROOTHDR
     640{
     641    /** 0x00: Tree level. */
     642    uint16_t            iLvl;
     643    /** 0x02: Number of records. */
     644    uint16_t            cRecs;
     645} XFSBTREEROOTHDR;
     646/** Pointer to a B+Tree root header */
     647typedef XFSBTREEROOTHDR *PXFSBTREEROOTHDR;
     648/** Pointer to a const B+Tree root header. */
     649typedef const XFSBTREEROOTHDR *PCXFSBTREEROOTHDR;
     650
     651
     652/**
     653 * XFS B+Tree intermediate/leave node header.
     654 */
     655typedef struct XFSBTREENODEHDR
     656{
     657    /** 0x00: Magic identifying the node. */
     658    uint32_t            u32Magic;
     659    /** 0x04: Tree level. */
     660    uint16_t            iLvl;
     661    /** 0x06: Number of records. */
     662    uint16_t            cRecs;
     663    /** 0x08: Block number of the left sibling. */
     664    uint64_t            uSibLeft;
     665    /** 0x10: Block number of the right sibling. */
     666    uint64_t            uSibRight;
     667} XFSBTREENODEHDR;
     668/** Pointer to a B+Tree intermediate/leave node header. */
     669typedef XFSBTREENODEHDR *PXFSBTREENODEHDR;
     670/** Pointer to a const B+Tree intermediate/leave node header. */
     671typedef const XFSBTREENODEHDR *PCXFSBTREENODEHDR;
     672
     673/** @name XFS_BTREENODEHDR_XXX - B+Tree node related defines.
     674 * @{ */
     675/** Magic for the tree node header. */
     676#define XFS_BTREENODEHDR_MAGIC                       RT_MAKE_U32_FROM_U8('P', 'A', 'M', 'B')
     677/** @} */
     678
     679
     680/**
     681 * XFS Extent.
     682 */
     683typedef struct XFSEXTENT
     684{
     685    /** 0x00: Low 64 bits. */
     686    uint64_t    u64Low;
     687    /** 0x08: High 64 bits. */
     688    uint64_t    u64High;
     689} XFSEXTENT;
     690/** Pointer to an XFS extent. */
     691typedef XFSEXTENT *PXFSEXTENT;
     692/** Pointer to a const XFS extent. */
     693typedef const XFSEXTENT *PCXFSEXTENT;
     694
     695/** @name XFS_EXTENT_XXX - Extent related getters.
     696 * @{ */
     697/** Returns whether the extent is allocated but unwritten (true) or a normal extent (false). */
     698#define XFS_EXTENT_IS_UNWRITTEN(a_pExtent) (RT_BOOL((a_pExtent)->u64High & RT_BIT_64(63)))
     699/** Returns the number of blocks the extent covers. */
     700#define XFS_EXTENT_GET_BLOCK_COUNT(a_pExtent) ((a_pExtent)->u64Low & UINT64_C(0x1fffff))
     701/** Returns the absolute block number where the data is stored on the disk. */
     702#define XFS_EXTENT_GET_DISK_BLOCK(a_pExtent) (  (((a_pExtent)->u64High & UINT64_C(0x1ff)) << 42) \
     703                                              | (((a_pExtent)->u64Low & UINT64_C(0xffffffffffe00000)) >> 21))
     704/** Returns the logical inode block offset. */
     705#define XFS_EXTENT_GET_LOGICAL_BLOCK(a_pExtent) (((a_pExtent)->u64High & UINT64_C(0x7ffffffffffffe00)) >> 9)
     706/** @} */
     707
    636708/** @} */
    637709
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette