On 27/02/2018 01:33, Dave Chinner wrote:
On Mon, Feb 26, 2018 at 09:26:01AM -0800, Darrick J. Wong wrote: My point is that vfs_clone_file_range is not running fsync(2)i operations. It's a fdatawrite_and_wait() call, which submits dirty data to disk and waits for it, but does *not flush volatile storage caches*. IOWs, it's not a data integrity operation. Hence while the reflink now has "data on disk" and can clone the extents, Neither the data nor the extents being cloned are stable and won't be until an fsync operation is performed on either the reflink source or destination file.... Still no cache flushes. Hence even after the clone has run, you can still lose the data (and extents!) from the host file....
Am I right saying that you are speaking about an *host* crash during or just after the clone?
Even in such a case, only the newly created file clone should be lost/corrupted, while the original file will *not* be affected, right? Or will an interrupted clone operation (ie: due to a power failure) leave *both* files in an unconsistent state?
Thanks. -- Danti Gionatan Supporto Tecnico Assyoma S.r.l. - www.assyoma.it email: g.danti@xxxxxxxxxx - info@xxxxxxxxxx GPG public key ID: FF5F32A8 -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html