• Damien Le Moal's avatar
    zonefs: Separate zone information from inode information · aa7f243f
    Damien Le Moal authored
    In preparation for adding dynamic inode allocation, separate an inode
    zone information from the zonefs inode structure. The new data structure
    zonefs_zone is introduced to store in memory information about a zone
    that must be kept throughout the lifetime of the device mount.
    
    Linking between a zone file inode and its zone information is done by
    setting the inode i_private field to point to a struct zonefs_zone.
    Using the i_private pointer avoids the need for adding a pointer in
    struct zonefs_inode_info. Beside the vfs inode, this structure is
    reduced to a mutex and a write open counter.
    
    One struct zonefs_zone is created per file inode on mount. These
    structures are organized in an array using the new struct
    zonefs_zone_group data structure to represent zone groups. The
    zonefs_zone arrays are indexed per file number (the index of a struct
    zonefs_zone in its array directly gives the file number/name for that
    zone file inode).
    Signed-off-by: default avatarDamien Le Moal <damien.lemoal@opensource.wdc.com>
    Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
    aa7f243f
trace.h 3 KB