zfs changes fixup
This commit is contained in:
@@ -157,7 +157,7 @@ func versionRelnamesSorted(versions []zfs.FilesystemVersion) []string {
|
|||||||
for _, v := range versions {
|
for _, v := range versions {
|
||||||
vstrs = append(vstrs, v.RelName())
|
vstrs = append(vstrs, v.RelName())
|
||||||
}
|
}
|
||||||
sort.Sort(sort.StringSlice(vstrs))
|
sort.Strings(vstrs)
|
||||||
return vstrs
|
return vstrs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,6 +171,6 @@ func datasetToStringSortedTrimPrefix(prefix *zfs.DatasetPath, paths []*zfs.Datas
|
|||||||
}
|
}
|
||||||
pstrs = append(pstrs, trimmed.ToString())
|
pstrs = append(pstrs, trimmed.ToString())
|
||||||
}
|
}
|
||||||
sort.Sort(sort.StringSlice(pstrs))
|
sort.Strings(pstrs)
|
||||||
return pstrs
|
return pstrs
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ var (
|
|||||||
|
|
||||||
func (s VersionTypeSet) zfsListTFlagRepr() string {
|
func (s VersionTypeSet) zfsListTFlagRepr() string {
|
||||||
var types []string
|
var types []string
|
||||||
for t, _ := range s {
|
for t := range s {
|
||||||
types = append(types, t.String())
|
types = append(types, t.String())
|
||||||
}
|
}
|
||||||
return strings.Join(types, ",")
|
return strings.Join(types, ",")
|
||||||
|
|||||||
@@ -1086,8 +1086,6 @@ func ZFSRecv(ctx context.Context, fs string, v *ZFSSendArgVersion, streamCopier
|
|||||||
if opts.RollbackAndForceRecv {
|
if opts.RollbackAndForceRecv {
|
||||||
// destroy all snapshots before `recv -F` because `recv -F`
|
// destroy all snapshots before `recv -F` because `recv -F`
|
||||||
// does not perform a rollback unless `send -R` was used (which we assume hasn't been the case)
|
// does not perform a rollback unless `send -R` was used (which we assume hasn't been the case)
|
||||||
var snaps []FilesystemVersion
|
|
||||||
{
|
|
||||||
snaps, err := ZFSListFilesystemVersions(fsdp, ListFilesystemVersionsOptions{
|
snaps, err := ZFSListFilesystemVersions(fsdp, ListFilesystemVersionsOptions{
|
||||||
Types: Snapshots,
|
Types: Snapshots,
|
||||||
})
|
})
|
||||||
@@ -1097,7 +1095,6 @@ func ZFSRecv(ctx context.Context, fs string, v *ZFSSendArgVersion, streamCopier
|
|||||||
sort.Slice(snaps, func(i, j int) bool {
|
sort.Slice(snaps, func(i, j int) bool {
|
||||||
return snaps[i].CreateTXG < snaps[j].CreateTXG
|
return snaps[i].CreateTXG < snaps[j].CreateTXG
|
||||||
})
|
})
|
||||||
}
|
|
||||||
// bookmarks are rolled back automatically
|
// bookmarks are rolled back automatically
|
||||||
if len(snaps) > 0 {
|
if len(snaps) > 0 {
|
||||||
// use rollback to efficiently destroy all but the earliest snapshot
|
// use rollback to efficiently destroy all but the earliest snapshot
|
||||||
|
|||||||
Reference in New Issue
Block a user