From owner-freebsd-bugs@FreeBSD.ORG Wed Sep 19 00:30:11 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 70232106566B for ; Wed, 19 Sep 2012 00:30:11 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3F27F8FC15 for ; Wed, 19 Sep 2012 00:30:11 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q8J0UBla010178 for ; Wed, 19 Sep 2012 00:30:11 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q8J0UBHC010175; Wed, 19 Sep 2012 00:30:11 GMT (envelope-from gnats) Resent-Date: Wed, 19 Sep 2012 00:30:11 GMT Resent-Message-Id: <201209190030.q8J0UBHC010175@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Thomas Steen Rasmussen Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 63ED41065670 for ; Wed, 19 Sep 2012 00:28:31 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 357288FC08 for ; Wed, 19 Sep 2012 00:28:31 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.5/8.14.5) with ESMTP id q8J0SUip092532 for ; Wed, 19 Sep 2012 00:28:30 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.5/8.14.5/Submit) id q8J0SUZk092531; Wed, 19 Sep 2012 00:28:30 GMT (envelope-from nobody) Message-Id: <201209190028.q8J0SUZk092531@red.freebsd.org> Date: Wed, 19 Sep 2012 00:28:30 GMT From: Thomas Steen Rasmussen To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: misc/171761: Small patch to (temporarily) remove -r from zfs send usage and zfs(8) X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Sep 2012 00:30:11 -0000 >Number: 171761 >Category: misc >Synopsis: Small patch to (temporarily) remove -r from zfs send usage and zfs(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Sep 19 00:30:10 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Thomas Steen Rasmussen >Release: FreeBSD 9.1-PRERELEASE amd64 >Organization: >Environment: FreeBSD glas.tyknet.dk 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #2: Fri Jul 27 15:32:30 CEST 2012 root@glas.tyknet.dk:/usr/obj/usr/src/sys/TYKJAIL amd64 >Description: This thread describes the problem and proposed long-term solution: http://lists.freebsd.org/pipermail/freebsd-fs/2012-September/015052.html Basically FreeBSD and IllumOS are both missing code to handle the -r switch to zfs send. mm@ opened an issue at https://www.illumos.org/issues/3144 which has been closed as a duplicate of https://www.illumos.org/issues/2811 so upstream is working on it. While we are waiting for a long-term solution from upstream I propose a short-term solution by suggesting that we remove -r from the usage output of "zfs send" and from the zfs(8) manpage. >How-To-Repeat: try using zfs send -r, see that the option is unsupported. Also, see that the option is documented in usage and manpage. >Fix: 1: Apply this patch so we no longer advertise non-existing features 2: Wait until IllumOS upstream fixes problem 3. Import upstream fix when it is ready Patch attached with submission follows: diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs.8 b/cddl/contrib/opensolaris/cmd/zfs/zfs.8 index f83d6b4..245f741 100644 --- a/cddl/contrib/opensolaris/cmd/zfs/zfs.8 +++ b/cddl/contrib/opensolaris/cmd/zfs/zfs.8 @@ -174,7 +174,7 @@ .Fl a | Ar filesystem Ns | Ns Ar mountpoint .Nm .Cm send -.Op Fl DnPpRrv +.Op Fl DnPpRv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Nm @@ -2196,7 +2196,7 @@ file system shared on the system. .It Xo .Nm .Cm send -.Op Fl DnPpRrv +.Op Fl DnPpRv .Op Fl i Ar snapshot | Fl I Ar snapshot .Ar snapshot .Xc @@ -2269,13 +2269,6 @@ be used regardless of the dataset's property, but performance will be much better if the filesystem uses a dedup-capable checksum (eg. .Sy sha256 ) . -.It Fl r -Recursively send all descendant snapshots. This is similar to the -.Fl R -flag, but information about deleted and renamed datasets is not included, and -property information is only included if the -.Fl p -flag is specified. .It Fl p Include the dataset's properties in the stream. This flag is implicit when .Fl R diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c index ff698a7..aad7122 100644 --- a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c +++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c @@ -267,7 +267,7 @@ get_usage(zfs_help_t idx) case HELP_ROLLBACK: return (gettext("\trollback [-rRf] \n")); case HELP_SEND: - return (gettext("\tsend [-DnPpRrv] " + return (gettext("\tsend [-DnPpRv] " "[-i snapshot | -I snapshot] \n")); case HELP_SET: return (gettext("\tset " >Release-Note: >Audit-Trail: >Unformatted: