From nobody@FreeBSD.org  Sun Aug 19 08:39:02 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id DC4AC1065670
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 Aug 2012 08:39:02 +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 C7A1D8FC0C
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 Aug 2012 08:39:02 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q7J8d2Tu035494
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 19 Aug 2012 08:39:02 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q7J8d2ko035493;
	Sun, 19 Aug 2012 08:39:02 GMT
	(envelope-from nobody)
Message-Id: <201208190839.q7J8d2ko035493@red.freebsd.org>
Date: Sun, 19 Aug 2012 08:39:02 GMT
From: Marcelo Araujo <araujo@FreeBSD.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [zfs] 2399 zfs manual page does not document use of "zfs diff"
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         170764
>Category:       docs
>Synopsis:       [zfs] 2399 zfs manual page does not document use of "zfs diff"
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    mm
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 19 08:40:04 UTC 2012
>Closed-Date:    Sun Aug 19 10:40:57 UTC 2012
>Last-Modified:  Sun Aug 19 10:40:57 UTC 2012
>Originator:     Marcelo Araujo
>Release:        10-CURRENT
>Organization:
FreeBSD
>Environment:
FreeBSD hostb 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r233530: Tue Apr  3 02:11:40 UTC 2012     araujo@hostb:/usr/obj/usr/src/sys/HOSTB  i386
>Description:
- A small manpage update, just to document the use of "zfs diff". This patch was partially obtained from Illumos-gate, changeset: 00c2a08cf1bb
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: zfs.8
===================================================================
--- zfs.8	(revision 233530)
+++ zfs.8	(working copy)
@@ -3158,6 +3158,20 @@
         group staff @pset,create,mount
 -------------------------------------------------------------
 .Ed
+.It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
+.Pp
+The following example shows how to see what has changed between a prior
+snapshot of a ZFS Dataset and its current state.  The -F option is used
+to indicate type information for the files affected.
+.Bd -literal -offset 2n
+.Li # Ic zfs diff -F tank/test@before tank/test
+  M       /       /tank/test/
+  M       F       /tank/test/linked      (+1)
+  R       F       /tank/test/oldname -> /tank/test/newname
+  -       F       /tank/test/deleted
+  +       F       /tank/test/created
+  M       F       /tank/test/modified
+.Ed
 .El
 .Sh EXIT STATUS
 The following exit values are returned:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-doc->mm 
Responsible-Changed-By: araujo 
Responsible-Changed-When: Sun Aug 19 08:41:23 UTC 2012 
Responsible-Changed-Why:  
Maybe Martin, could have time to take care of this PR. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170764 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: docs/170764: commit references a PR
Date: Sun, 19 Aug 2012 10:34:57 +0000 (UTC)

 Author: mm
 Date: Sun Aug 19 10:34:40 2012
 New Revision: 239394
 URL: http://svn.freebsd.org/changeset/base/239394
 
 Log:
   Update zfs(8) manpage with illumos version of "zfs diff"
   
   Illumos issue:
     2399 zfs manual page does not document use of "zfs diff"
   
   References:
     https://www.illumos.org/issues/2399
   
   PR:		docs/170764
   Obtained from:	ssh://anonhg@hg.illumos.org/illumos-gate
   MFC after:	1 week
 
 Modified:
   head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
 
 Modified: head/cddl/contrib/opensolaris/cmd/zfs/zfs.8
 ==============================================================================
 --- head/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Sun Aug 19 10:33:31 2012	(r239393)
 +++ head/cddl/contrib/opensolaris/cmd/zfs/zfs.8	Sun Aug 19 10:34:40 2012	(r239394)
 @@ -2480,6 +2480,8 @@ also have the 'create' ability and 'moun
  .Xc
  .It create Ta subcommand Ta Must also have the 'mount' ability
  .It destroy Ta subcommand Ta Must also have the 'mount' ability
 +.It diff Ta subcommand Ta Allows lookup of paths within a dataset given an
 +object number, and the ability to create snapshots necessary to 'zfs diff'
  .It hold Ta subcommand Ta Allows adding a user hold to a snapshot
  .It mount Ta subcommand Ta Allows mount/umount of Tn ZFS No datasets
  .It Xo promote Ta subcommand Ta Must
 @@ -2683,43 +2685,43 @@ descendent file systems.
  .Op Ar snapshot Ns | Ns Ar filesystem
  .Xc
  .Pp
 -Describes differences between a snapshot and a successor dataset. The
 -successor dataset can be a later snapshot or the current filesystem.
 -.Pp
 -The changed files are displayed including the change type. The change type
 -is displayed useing a single character. If a file or directory was renamed,
 -the old and the new names are displayed.
 -.Pp
 -The following change types can be displayed:
 -.Pp
 -.Bl -column -offset indent "CHARACTER" "CHANGE TYPE"
 -.It CHARACTER Ta CHANGE TYPE
 -.It \&+ Ta file was added
 -.It \&- Ta file was removed
 -.It \&M Ta file was modified
 -.It \&R Ta file was renamed
 +Display the difference between a snapshot of a given filesystem and another
 +snapshot of that filesystem from a later time or the current contents of the
 +filesystem.  The first column is a character indicating the type of change,
 +the other columns indicate pathname, new pathname
 +.Pq in case of rename ,
 +change in link count, and optionally file type and/or change time.
 +.Pp
 +The types of change are:
 +.Bl -column -offset 2n indent
 +.It \&- Ta path was removed
 +.It \&+ Ta path was added
 +.It \&M Ta path was modified
 +.It \&R Ta path was renamed
  .El
  .Bl -tag -width indent
  .It Fl F
 -Display a single letter for the file type in second to last column.
 -.Pp
 -The following file types can be displayed:
 +Display an indication of the type of file, in a manner similar to the
 +.Fl F
 +option of
 +.Xr ls 1 .
  .Pp
 -.Bl -column -offset indent "CHARACTER" "FILE TYPE"
 -.It CHARACTER Ta FILE TYPE
 -.It \&F Ta file
 -.It \&/ Ta directory
 +.Bl -column -offset 2n indent
  .It \&B Ta block device
 +.It \&C Ta character device
 +.It \&F Ta regular file
 +.It \&/ Ta directory
  .It \&@ Ta symbolic link
  .It \&= Ta socket
  .It \&> Ta door (not supported on Fx )
 -.It \&| Ta FIFO (not supported on Fx )
 -.It \&P Ta event portal (not supported on Fx )
 +.It \&| Ta named pipe (not supported on Fx )
 +.It \&P Ta event port (not supported on Fx )
  .El
  .It Fl H
 -Machine-parseable output, fields separated a tab character.
 +Give more parseable tab-separated output, without header lines and without
 +arrows.
  .It Fl t
 -Display a change timestamp in the first column.
 +Display the path's inode change time as the first column of output.
  .El
  .It Xo
  .Nm
 @@ -3171,6 +3173,22 @@ Local+Descendent permissions on (tank/us
          group staff @pset,create,mount
  -------------------------------------------------------------
  .Ed
 +.It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset
 +.Pp
 +The following example shows how to see what has changed between a prior
 +snapshot of a ZFS Dataset and its current state.  The
 +.Fl F
 +option is used to indicate type information for the files affected.
 +.Pp
 +.Bd -literal -offset 2n
 +.Li # Ic zfs diff tank/test@before tank/test
 +M       /       /tank/test/
 +M       F       /tank/test/linked      (+1)
 +R       F       /tank/test/oldname -> /tank/test/newname
 +-       F       /tank/test/deleted
 ++       F       /tank/test/created
 +M       F       /tank/test/modified
 +.Ed
  .El
  .Sh EXIT STATUS
  The following exit values are returned:
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: mm 
State-Changed-When: Sun Aug 19 10:40:53 UTC 2012 
State-Changed-Why:  
Resolved. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=170764 
>Unformatted:
