+ die "unable to parse volume ID '$volid'\n";
+ }
+}
+
+sub volume_rollback_is_possible {
+ my ($cfg, $volid, $snap) = @_;
+
+ my ($storeid, $volname) = parse_volume_id($volid, 1);
+ if ($storeid) {
+ my $scfg = storage_config($cfg, $storeid);
+ my $plugin = PVE::Storage::Plugin->lookup($scfg->{type});
+ return $plugin->volume_rollback_is_possible($scfg, $storeid, $volname, $snap);
+ } elsif ($volid =~ m|^(/.+)$| && -e $volid) {
+ die "snapshot rollback file/device '$volid' is not possible\n";
+ } else {
+ die "unable to parse volume ID '$volid'\n";