zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Tim Haley
On 3/29/10 11:45 AM, Sebastien Roy wrote: On 03/29/10 01:24 PM, Nicolas Williams wrote: On Mon, Mar 29, 2010 at 01:17:30PM -0400, Sebastien Roy wrote: Understood, and I see that now. It would indeed make sense to be consistent and have -H for this subcommand as well. Agreed. Do you agree

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Nicolas Williams
On Mon, Mar 29, 2010 at 09:54:01PM -0700, Dan Price wrote: I also have questions about how intelligent a consuming piece of software must be in order to make sense of this information. Has anyone written a proof of concept tool using this? For example, if a directory /foo/a is renamed to

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Nicolas Williams
On Tue, Mar 30, 2010 at 01:20:55AM -0500, Nicolas Williams wrote: On Mon, Mar 29, 2010 at 09:54:01PM -0700, Dan Price wrote: Some specific questions... 1) In what order are the changes printed? If I saw: + /myfiles/rename_dir R /myfiles/rename_dir -

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Michael Schuster
On 30.03.10 06:54, Dan Price wrote: On Mon 29 Mar 2010 at 11:14AM, Bart Smaalders wrote: On 03/29/10 11:01, Matthew Ahrens wrote: How do commands like ls and find handle printing of filenames with arbitrary characters (newlines and such)? In general, badly. Tim, My concern, which others

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Vladimir Marek
Hi, I'm wondering, will zfs diff work between two zfs pools? I want to know if the current snapshot of my data differs from the snapshot I created by zfs send | zfs receive while ago (on the same machine, just different pool), so that I should refresh my backup. Does 'zfs diff' read all the

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Tim Haley
On 3/30/10 5:35 AM, Vladimir Marek wrote: Hi, I'm wondering, will zfs diff work between two zfs pools? No. Only between snapshots within the same dataset within the same pool. I want to know if the current snapshot of my data differs from the snapshot I created by zfs send | zfs

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Glenn Brunette
Dan, I have to +1 all of your well-thought-out comments. As a potential consuming of this functionality for the Immutable Service Container project, answers to these questions are critical. I am also interested in whether additional fields can be added to the output similar to a -o

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Bart Smaalders
On 03/30/10 09:58, Glenn Brunette wrote: Dan, I have to +1 all of your well-thought-out comments. As a potential consuming of this functionality for the Immutable Service Container project, answers to these questions are critical. I am also interested in whether additional fields can be

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Dan Price
On Tue 30 Mar 2010 at 01:20AM, Nicolas Williams wrote: 1) In what order are the changes printed? If I saw: + /myfiles/rename_dir R /myfiles/rename_dir - /myfiles/rename_dir My analyzer would need to be smart enough to realize that the second must have happened

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread johan...@opensolaris.org
On Tue, Mar 30, 2010 at 10:31:04AM -0700, Bart Smaalders wrote: On 03/30/10 09:58, Glenn Brunette wrote: Dan, I have to +1 all of your well-thought-out comments. As a potential consuming of this functionality for the Immutable Service Container project, answers to these questions are

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Tim Haley
On 03/30/10 12:29 PM, Dan Price wrote: On Tue 30 Mar 2010 at 01:20AM, Nicolas Williams wrote: 1) In what order are the changes printed? If I saw: + /myfiles/rename_dir R /myfiles/rename_dir - /myfiles/rename_dir My analyzer would need to be smart enough to realize that

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Dan Price
On Tue 30 Mar 2010 at 07:21AM, Tim Haley wrote: On 3/30/10 5:35 AM, Vladimir Marek wrote: Hi, I'm wondering, will zfs diff work between two zfs pools? No. Only between snapshots within the same dataset within the same pool. Only within the same dataset? What about a snapshot of a

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Nicolas Williams
On Tue, Mar 30, 2010 at 12:42:00PM -0600, Tim Haley wrote: On 03/30/10 12:29 PM, Dan Price wrote: The example was slightly messed up, sorry; that caused misunderstanding. I'm worried about this situation: snapshot at 1 mv /myfiles/name1 /myfiles/name2 mkdir

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Tim Haley
On 03/30/10 01:25 PM, Nicolas Williams wrote: On Tue, Mar 30, 2010 at 12:42:00PM -0600, Tim Haley wrote: On 03/30/10 12:29 PM, Dan Price wrote: The example was slightly messed up, sorry; that caused misunderstanding. I'm worried about this situation: snapshot at 1 mv

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Tim Haley
On 3/29/10 10:54 PM, Dan Price wrote: On Mon 29 Mar 2010 at 11:14AM, Bart Smaalders wrote: On 03/29/10 11:01, Matthew Ahrens wrote: How do commands like ls and find handle printing of filenames with arbitrary characters (newlines and such)? In general, badly.

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Nicolas Williams
On Tue, Mar 30, 2010 at 02:04:39PM -0600, Tim Haley wrote: It would be easy enough for me to print a 'time' column as the first column, and the output could then be sent to 'sort -n'. I'm not sure how people feel about that. Is that cheating? :-) The alternative is to AVL sort by that

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Nicolas Williams
On Tue, Mar 30, 2010 at 02:22:43PM -0600, Tim Haley wrote: You are correct that the command should work with clones, too, as though are desendant. For a clone we'd present its paths relative to where it is mounted. I'd say make all paths relative to the root of the dataset, even when the newer

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread Glenn Brunette
On 3/30/10 4:36 PM, Nicolas Williams wrote: On Tue, Mar 30, 2010 at 02:04:39PM -0600, Tim Haley wrote: It would be easy enough for me to print a 'time' column as the first column, and the output could then be sent to 'sort -n'. I'm not sure how people feel about that. Is that cheating?

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-30 Thread John Plocher
On Tue, Mar 30, 2010 at 1:36 PM, Nicolas Williams Nicolas.Williams at sun.com wrote: On Tue, Mar 30, 2010 at 02:04:39PM -0600, Tim Haley wrote: It would be easy enough for me to print a 'time' column as the first This is getting pretty close to design by ARC rather than review by ARC; it

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Darren Reed
On 03/28/10 12:12, Tim Haley wrote: I am sponsoring the following fast-track on behalf of myself. This case introduces a new zfs sub-command for describing differences between snapshots in a zfs hierarchy. A delegated permission and read-only system attribute are also introduced to support

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Darren J Moffat
On 28/03/2010 20:12, Tim Haley wrote: I am sponsoring the following fast-track on behalf of myself. This case introduces a new zfs sub-command for describing differences between snapshots in a zfs hierarchy. A delegated permission and read-only system attribute are also introduced to support

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Joep Vesseur
On 03/28/10 21:12, Tim Haley wrote: Five types of change are described: o File/Directory modified o File/Directory present in older snapshot but not newer o File/Directory present in newer snapshot but not older o File/Directory renamed o File link count changed Is there any provision

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Darren J Moffat
On 29/03/2010 09:44, Joep Vesseur wrote: On 03/28/10 21:12, Tim Haley wrote: Five types of change are described: o File/Directory modified o File/Directory present in older snapshot but not newer o File/Directory present in newer snapshot but not older o File/Directory renamed o File link

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Tim Haley
On 03/29/10 02:44 AM, Joep Vesseur wrote: On 03/28/10 21:12, Tim Haley wrote: Five types of change are described: o File/Directory modified o File/Directory present in older snapshot but not newer o File/Directory present in newer snapshot but not older o File/Directory renamed o File

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Joep Vesseur
On 03/29/10 16:57, Tim Haley wrote: Not sure exactly what sort of properties you have in mind - many I can think of would result in us detecting a modification to the file itself, for example: # echo 'tim was here' file # zfs snapshot toad/timh at before # touch file # zfs snapshot

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Tim Haley
On 03/29/10 09:01 AM, Joep Vesseur wrote: On 03/29/10 16:57, Tim Haley wrote: Not sure exactly what sort of properties you have in mind - many I can think of would result in us detecting a modification to the file itself, for example: # echo 'tim was here' file # zfs snapshot toad/timh at

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Nicolas Williams
On Sun, Mar 28, 2010 at 01:12:16PM -0600, Tim Haley wrote: +If the modification involved a change in the link count of a +file, the change will be expressed as a delta within +parentheses on the modification line. Example outputs are +below: + + M

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Nicolas Williams
On Mon, Mar 29, 2010 at 09:05:52AM -0600, Tim Haley wrote: On 03/29/10 09:01 AM, Joep Vesseur wrote: On 03/29/10 16:57, Tim Haley wrote: Not sure exactly what sort of properties you have in mind - many I can think of would result in us detecting a modification to the file itself, for example:

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Sebastien Roy
On 03/29/10 12:14 PM, Nicolas Williams wrote: On Sun, Mar 28, 2010 at 01:12:16PM -0600, Tim Haley wrote: +If the modification involved a change in the link count of a +file, the change will be expressed as a delta within +parentheses on the modification line. Example

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Nicolas Williams
On Mon, Mar 29, 2010 at 12:23:56PM -0400, Sebastien Roy wrote: Is there any escaping of whitespace and non-printable characters in the pathnames? If not then the above format is ambiguous and cannot be safely scripted. Taking a step back here, this subcommand is not the only zfs subcommand

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Sebastien Roy
On 03/29/10 12:34 PM, Steve Mckinty wrote: Sebastien Roy wrote: Taking a step back here, this subcommand is not the only zfs subcommand whose output could be subject to parsing by scripts. Adding parsable output should be something that is thought-through for the entire suite of subcommands

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Steve Mckinty
Sebastien Roy wrote: On 03/29/10 12:14 PM, Nicolas Williams wrote: On Sun, Mar 28, 2010 at 01:12:16PM -0600, Tim Haley wrote: +If the modification involved a change in the link count of a +file, the change will be expressed as a delta within +parentheses on the

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Sebastien Roy
On 03/29/10 12:33 PM, Nicolas Williams wrote: On Mon, Mar 29, 2010 at 12:23:56PM -0400, Sebastien Roy wrote: Is there any escaping of whitespace and non-printable characters in the pathnames? If not then the above format is ambiguous and cannot be safely scripted. Taking a step back here,

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Nicolas Williams
On Mon, Mar 29, 2010 at 01:17:30PM -0400, Sebastien Roy wrote: Understood, and I see that now. It would indeed make sense to be consistent and have -H for this subcommand as well. Agreed. Do you agree re: backslash-escaping? I could have filenames with ' - ' in them that would render the

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Don Cragun
On Mar 28, 2010, at 13:12:16 -0600, Tim Haley wrote: Please find documentation nits in-line below... - Don ... ... ... 4. Technical Description There is a long-standing RFE for zfs to be able to describe what has changed between the snapshots of a dataset. To

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Darren J Moffat
On 29/03/2010 18:30, Don Cragun wrote: + + Indicates the file/directory was added in the later dataset + - Indicates the file/directory was removed in the later dataset + M Indicates the file/directory was modified in the later dataset + R Indicates the

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Sebastien Roy
On 03/29/10 01:24 PM, Nicolas Williams wrote: On Mon, Mar 29, 2010 at 01:17:30PM -0400, Sebastien Roy wrote: Understood, and I see that now. It would indeed make sense to be consistent and have -H for this subcommand as well. Agreed. Do you agree re: backslash-escaping? Yes, but presumably

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Don Cragun
On Mar 29, 2010, at 10:42 AM, Darren J Moffat wrote: On 29/03/2010 18:30, Don Cragun wrote: + + Indicates the file/directory was added in the later dataset + - Indicates the file/directory was removed in the later dataset + M Indicates the file/directory was

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Darren J Moffat
On 29/03/2010 19:21, Don Cragun wrote: On Mar 29, 2010, at 10:42 AM, Darren J Moffat wrote: On 29/03/2010 18:30, Don Cragun wrote: + + Indicates the file/directory was added in the later dataset + - Indicates the file/directory was removed in the later dataset +

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Nicolas Williams
On Mon, Mar 29, 2010 at 11:14:24AM -0700, Bart Smaalders wrote: On 03/29/10 11:01, Matthew Ahrens wrote: How do commands like ls and find handle printing of filenames with arbitrary characters (newlines and such)? In general, badly. % touch `echo '\07'` % ls beep % Use ls -b:

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Matthew Ahrens
Nicolas Williams wrote: On Mon, Mar 29, 2010 at 12:23:56PM -0400, Sebastien Roy wrote: Is there any escaping of whitespace and non-printable characters in the pathnames? If not then the above format is ambiguous and cannot be safely scripted. Taking a step back here, this

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Bart Smaalders
On 03/29/10 11:01, Matthew Ahrens wrote: How do commands like ls and find handle printing of filenames with arbitrary characters (newlines and such)? In general, badly. % touch `echo '\07'` % ls beep % - Bart

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Don Cragun
On Mar 29, 2010, at 11:37 AM, Darren J Moffat wrote: On 29/03/2010 19:21, Don Cragun wrote: On Mar 29, 2010, at 10:42 AM, Darren J Moffat wrote: On 29/03/2010 18:30, Don Cragun wrote: + + Indicates the file/directory was added in the later dataset + - Indicates the

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Tim Haley
On 03/29/10 12:43 AM, Darren Reed wrote: On 03/28/10 12:12, Tim Haley wrote: I am sponsoring the following fast-track on behalf of myself. This case introduces a new zfs sub-command for describing differences between snapshots in a zfs hierarchy. A delegated permission and read-only system

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-29 Thread Dan Price
On Mon 29 Mar 2010 at 11:14AM, Bart Smaalders wrote: On 03/29/10 11:01, Matthew Ahrens wrote: How do commands like ls and find handle printing of filenames with arbitrary characters (newlines and such)? In general, badly. Tim, My concern, which others have hinted at, is that there are a

zfs diff [PSARC/2010/105 FastTrack timeout 04/05/2010]

2010-03-28 Thread Tim Haley
I am sponsoring the following fast-track on behalf of myself. This case introduces a new zfs sub-command for describing differences between snapshots in a zfs hierarchy. A delegated permission and read-only system attribute are also introduced to support the sub-command. The case requests