• Darrick J. Wong's avatar
    xfs: create agblock bitmap helper to count the number of set regions · e4fd1def
    Darrick J. Wong authored
    In the next patch, the rmap btree repair code will need to estimate the
    size of the new ondisk rmapbt.  The size is a function of the number of
    records that will be written to disk, and the size of the recordset is
    the number of observations made while scanning the filesystem plus the
    number of OWN_AG records that will be injected into the rmap btree.
    
    OWN_AG rmap records track the free space btrees, the AGFL, and the new
    rmap btree itself.  The repair tool uses a bitmap to record the space
    used for all four structures, which is why we need a function to count
    the number of set regions.
    
    A reviewer requested that this be pulled into a separate patch with its
    own justification, so here it is.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    e4fd1def
bitmap.h 2.5 KB