• Darrick J. Wong's avatar
    xfs: condense directories after a mapping exchange operation · da165fbd
    Darrick J. Wong authored
    The previous commit added a new file mapping exchange flag that enables
    us to perform post-swap processing on file2 once we're done exchanging
    extent mappings.  Now add this ability for directories.
    
    This isn't used anywhere right now, but we need to have the basic ondisk
    flags in place so that a future online directory repair feature can
    create salvaged dirents in a temporary directory and exchange the data
    fork mappings when ready.  If one file is in extents format and the
    other is inline, we will have to promote both to extents format to
    perform the exchange.  After the exchange, we can try to condense the
    fixed directory down to inline format if possible.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    da165fbd
xfs_exchmaps.c 30.6 KB