handle DryRun send size estimate errors with bookmarks

This commit is contained in:
Christian Schwarz
2018-09-05 17:41:25 -07:00
parent 9eca269ad8
commit acd2418803
6 changed files with 39 additions and 15 deletions
+3
View File
@@ -77,6 +77,9 @@ func (p *Sender) Send(ctx context.Context, r *pdu.SendReq) (*pdu.SendRes, io.Rea
if r.DryRun {
size, err := zfs.ZFSSendDry(r.Filesystem, r.From, r.To)
if err == zfs.BookmarkSizeEstimationNotSupported {
return &pdu.SendRes{ExpectedSize: 0}, nil, nil
}
if err != nil {
return nil, nil, err
}