config + job: forbid non-verlapping receiver root_fs

refs #136
refs #140
This commit is contained in:
Christian Schwarz
2019-03-20 23:01:24 +01:00
parent 3e71542c78
commit 7756c9a55c
8 changed files with 122 additions and 4 deletions
+9
View File
@@ -299,6 +299,15 @@ func (j *ActiveSide) Status() *Status {
return &Status{Type: t, JobSpecific: s}
}
func (j *ActiveSide) OwnedDatasetSubtreeRoot() (rfs *zfs.DatasetPath, ok bool) {
pull, ok := j.mode.(*modePull)
if !ok {
_ = j.mode.(*modePush) // make sure we didn't introduce a new job type
return nil, false
}
return pull.rootFS.Copy(), true
}
func (j *ActiveSide) Run(ctx context.Context) {
log := GetLogger(ctx)
ctx = logging.WithSubsystemLoggers(ctx, log)