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
+5
View File
@@ -13,6 +13,7 @@ const (
CopyRangeMethodIoctl
CopyRangeMethodCopyFileRange
CopyRangeMethodSendFile
CopyRangeMethodDuplicateExtents
CopyRangeMethodAllWithFallback
)
@@ -26,6 +27,8 @@ func (o CopyRangeMethod) String() string {
return "copy_file_range"
case CopyRangeMethodSendFile:
return "sendfile"
case CopyRangeMethodDuplicateExtents:
return "duplicate_extents"
case CopyRangeMethodAllWithFallback:
return "all"
default:
@@ -47,6 +50,8 @@ func (o *CopyRangeMethod) UnmarshalText(bs []byte) error {
*o = CopyRangeMethodCopyFileRange
case "sendfile":
*o = CopyRangeMethodSendFile
case "duplicate_extents":
*o = CopyRangeMethodDuplicateExtents
case "all":
*o = CopyRangeMethodAllWithFallback
default: