Bug 240640 - zfs send -n -P -i is broken after r344601
Summary: zfs send -n -P -i is broken after r344601
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.0-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: Sean Eric Fagan
URL: https://reviews.freebsd.org/D21709
Keywords: regression
Depends on:
Blocks: 240700
  Show dependency treegraph
 
Reported: 2019-09-17 11:29 UTC by Andriy Gapon
Modified: 2019-10-09 09:48 UTC (History)
6 users (show)

See Also:
koobs: mfc-stable12?


Attachments
Proposed patch (1.44 KB, text/plain)
2019-09-20 07:25 UTC, Sean Eric Fagan
sef: maintainer-approval? (re)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andriy Gapon freebsd_committer 2019-09-17 11:29:27 UTC
base r344601 introduced a new feature to update zfs send process title with the send progress, but at the same time it appears to have broken -n -P combination of option that's used to estimate a send stream size (while doing a "dry" send) and to report it in a machine readable form.

On a system without the change:
> $ zfs send -n -v -i testz/test@snap1 testz/test@snap2
> send from @snap1 to testz/test@snap2 estimated size is 2.01M
> total estimated size is 2.01M

> $ zfs send -n -P -i testz/test@snap1 testz/test@snap2
> incremental     snap1   testz/test@snap2        2109424
> size    2109424

On a system with the change:
> $ zfs send -n -v -i testz/test@snap1 testz/test@snap2
> send from @snap1 to testz/test@snap2 estimated size is 2.01M
> total estimated size is 2.01M

> $ zfs send -n -P -i testz/test@snap1 testz/test@snap2
> incremental     snap1   testz/test@snap2

As can be seen, "-n -v" works as before, but "-n -P" is broken.
Comment 1 Andriy Gapon freebsd_committer 2019-09-17 11:31:39 UTC
This is a potential blocker for 12.1 release as this is a regression since 12.0.
Comment 2 Sean Eric Fagan freebsd_committer 2019-09-20 06:55:39 UTC
Proposed patch in https://reviews.freebsd.org/D21709.  If I don't get more feedback from it by tomorrow, I'll commit it over the weekend, and MFC 2 weeks after that, unless things need to move faster.
Comment 3 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-20 07:08:50 UTC
For any issues added as a bug 240700 blocker, please either include the patch as an attachment with maintainer-approval flag set to ? re@, or add re@ as a blocking reviewer on the differential
Comment 4 Sean Eric Fagan freebsd_committer 2019-09-20 07:22:20 UTC
For the review, re@ doesn't work; releng?
Comment 5 Sean Eric Fagan freebsd_committer 2019-09-20 07:25:30 UTC
Created attachment 207644 [details]
Proposed patch

Proposed diff, as per request.
Comment 6 Glen Barber freebsd_committer 2019-09-20 08:22:26 UTC
(In reply to Kubilay Kocak from comment #3)

As mentioned in (many) emails to developers, re@ does not currently accept Phabricator reviews for approval requests.  Please see https://wiki.freebsd.org/Releng/ChangeRequestGuidelines for the procedures.
Comment 7 Andriy Gapon freebsd_committer 2019-09-20 09:22:32 UTC
(In reply to Glen Barber from comment #6)
Well, this is not a merge request (yet).
The fix is not even in head.

I am sure that when the time comes to merge from stable/12 to releng/12.1, there will be a proper approval request.

I am not sure why there are some many requirements and requests to sef at *this* stage.
Comment 8 Glen Barber freebsd_committer 2019-09-20 19:25:30 UTC
(In reply to Andriy Gapon from comment #7)
I misunderstood the context of the PR.  I apologize for the confusion.
Comment 9 commit-hook freebsd_committer 2019-09-21 17:55:37 UTC
A commit references this bug:

Author: sef
Date: Sat Sep 21 17:54:42 UTC 2019
New revision: 352580
URL: https://svnweb.freebsd.org/changeset/base/352580

Log:
  Fix a regression introduced in r344601, and work properly with the
  -v and -n options.

  PR:		240640
  Reported by:	Andriy Gapon <avg@FreeBSD.org>
  Reviewed by:	avg
  MFC after:	2 weeks
  Differential Revision:	https://reviews.freebsd.org/D21709

Changes:
  head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
Comment 10 Andriy Gapon freebsd_committer 2019-09-30 13:37:54 UTC
Sean,
is it possible to MFC this change to stable/12 a little bit sooner, so that we can try to merge it to releng/12.1 while it's still in the RC phase?
Thanks!
Comment 11 Andriy Gapon freebsd_committer 2019-09-30 13:39:26 UTC
(In reply to Andriy Gapon from comment #10)
Sorry, I meant beta phase, of course.
Comment 12 Sean Eric Fagan freebsd_committer 2019-09-30 17:24:26 UTC
I completely forgot about it this weekend.  I'll plan on doing things today.
Comment 13 commit-hook freebsd_committer 2019-10-01 18:05:55 UTC
A commit references this bug:

Author: sef
Date: Tue Oct  1 18:05:52 UTC 2019
New revision: 352932
URL: https://svnweb.freebsd.org/changeset/base/352932

Log:
  Fix a regression introduced in r344601, and work properly with the
  -v and -n options.

  PR:		240640
  Reported by:	Andriy Gapon <avg@FreeBSD.org>
  Reviewed by:	avg
  Differential Revision:	https://reviews.freebsd.org/D21709
  Approved by:	re

Changes:
  releng/12.1/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
Comment 14 Mark Johnston freebsd_committer 2019-10-08 16:20:40 UTC
Can this PR be closed?
Comment 15 commit-hook freebsd_committer 2019-10-09 09:47:06 UTC
A commit references this bug:

Author: avg
Date: Wed Oct  9 09:47:00 UTC 2019
New revision: 353338
URL: https://svnweb.freebsd.org/changeset/base/353338

Log:
  MFC r352580 by sef: Fix a regression introduced in r344601

  ... and work properly with the -v and -n options.

  PR:		240640

Changes:
_U  stable/11/
  stable/11/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
Comment 16 Andriy Gapon freebsd_committer 2019-10-09 09:48:43 UTC
(In reply to Mark Johnston from comment #14)
Yes, of course.
Let me do it now.