• Darrick J. Wong's avatar
    xfs: introduce new file range exchange ioctl · 9a64d9b3
    Darrick J. Wong authored
    Introduce a new ioctl to handle exchanging ranges of bytes
    between files.  The goal here is to perform the exchange atomically with
    respect to applications -- either they see the file contents before the
    exchange or they see that A-B is now B-A, even if the kernel crashes.
    
    My original goal with all this code was to make it so that online repair
    can build a replacement directory or xattr structure in a temporary file
    and commit the repair by atomically exchanging all the data blocks
    between the two files.  However, I needed a way to test this mechanism
    thoroughly, so I've been evolving an ioctl interface since then.
    Signed-off-by: default avatarDarrick J. Wong <djwong@kernel.org>
    Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
    9a64d9b3
Makefile 4.93 KB