lib/fs: Add support for Windows duplicate extents (#6764)

This commit is contained in:
Audrius Butkevicius
2020-06-18 22:32:26 +01:00
committed by GitHub
parent 22f0077262
commit deaccc7f8d
3 changed files with 134 additions and 1 deletions
@@ -12,7 +12,7 @@ func init() {
func copyRangeAllWithFallback(src, dst File, srcOffset, dstOffset, size int64) error {
var err error
for _, method := range []CopyRangeMethod{CopyRangeMethodIoctl, CopyRangeMethodCopyFileRange, CopyRangeMethodSendFile, CopyRangeMethodStandard} {
for _, method := range []CopyRangeMethod{CopyRangeMethodIoctl, CopyRangeMethodCopyFileRange, CopyRangeMethodSendFile, CopyRangeMethodDuplicateExtents, CopyRangeMethodStandard} {
if err = CopyRange(method, src, dst, srcOffset, dstOffset, size); err == nil {
return nil
}