• Brian Foster's avatar
    xfs: allocate sparse inode chunks on full chunk allocation failure · 56d1115c
    Brian Foster authored
    xfs_ialloc_ag_alloc() makes several attempts to allocate a full inode
    chunk. If all else fails, reduce the allocation to the sparse length and
    alignment and attempt to allocate a sparse inode chunk.
    
    If sparse chunk allocation succeeds, check whether an inobt record
    already exists that can track the chunk. If so, inherit and update the
    existing record. Otherwise, insert a new record for the sparse chunk.
    
    Create helpers to align sparse chunk inode records and insert or update
    existing records in the inode btrees. The xfs_inobt_insert_sprec()
    helper implements the merge or update semantics required for sparse
    inode records with respect to both the inobt and finobt. To update the
    inobt, either insert a new record or merge with an existing record. To
    update the finobt, use the updated inobt record to either insert or
    replace an existing record.
    Signed-off-by: default avatarBrian Foster <bfoster@redhat.com>
    Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
    Signed-off-by: default avatarDave Chinner <david@fromorbit.com>
    56d1115c
xfs_ialloc_btree.h 2.3 KB