On 8/30/18 11:25 AM, Christoph Hellwig wrote: > On Thu, Aug 30, 2018 at 11:10:05AM -0500, Eric Sandeen wrote: >> We disabled FIBMAP/bmap calls for reflinked files because swap will then >> writes directly to the blocks, bypassing COW mechanisms, and breaking >> copy on write. As noted in commit db1327b, this restriction also breaks >> bootloaders that want to use the FIBMAP ioctl. >> >> Rather than disabling the entire mapping interface for everyone just >> because swapon may abuse the info, teach xfs_iomap_swapfile_activate() >> to reject activation for reflinked files, and re-enable the FIBMAP >> interface. > > Every use of the feature is an abuse, and that includes bootloaders. > By the time you've obtained the information it can (and often will) > be stale. > That's no reason to uniquely disallow it for reflinked files, though; the problem is universal. It's true for fiemap as well. So I'm not sure that's an argument against the patch? -Eric