endpoint: zfs abstraction: use new api (fixup)
This commit is contained in:
@@ -567,8 +567,18 @@ func listAbstractionsImplFS(ctx context.Context, fs string, query *ListZFSHoldsA
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// we need filesystem versions for any abstraction type
|
whatTypes := zfs.VersionTypeSet{}
|
||||||
fsvs, err := zfs.ZFSListFilesystemVersions(fsp, nil)
|
for what := range query.What {
|
||||||
|
if e := what.BookmarkExtractor(); e != nil {
|
||||||
|
whatTypes[zfs.Bookmark] = true
|
||||||
|
}
|
||||||
|
if e := what.HoldExtractor(); e != nil {
|
||||||
|
whatTypes[zfs.Snapshot] = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fsvs, err := zfs.ZFSListFilesystemVersions(fsp, zfs.ListFilesystemVersionsOptions{
|
||||||
|
Types: whatTypes,
|
||||||
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
errCb(err, fs, "list filesystem versions")
|
errCb(err, fs, "list filesystem versions")
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in New Issue
Block a user