From sacadmin Thu Apr  5 11:32:29 2007
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l35IWS46028461;
	Thu, 5 Apr 2007 11:32:28 -0700 (PDT)
Received: (from maybee@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id l35IWSFP028450;
	Thu, 5 Apr 2007 11:32:28 -0700 (PDT)
Date: Thu, 5 Apr 2007 11:32:28 -0700 (PDT)
From: Mark Maybee <maybee@sac.sfbay.sun.com>
Message-Id: <200704051832.l35IWSFP028450@sac.sfbay.sun.com>
To: PSARC@sac.sfbay.sun.com
Cc: Vitezslav.Batrla@Sun.COM
Subject: zfs {create,clone,rename} -p [PSARC/2007/199 Timeout:  04/12/2007]
Status: RO
Content-Length: 4149

Subject: PSARC FastTrack [04/12/2007]: zfs {create,clone,rename} -p


Template Version: @(#)sac_nextcase %I% %G% SMI
This information is Copyright 2007 Sun Microsystems, Inc.
1. Introduction
    1.1. Project/Component Working Name:
	 zfs {create,clone,rename} -p
    1.2. Name of Document Author/Supplier:
	 Author:  Vita Batrla
    1.3  Date of This Document:
	05 April, 2007
4. Technical Description

This case adds a new flag to zfs(1m).  
The release binding is patch/micro.


SUMMARY:

	This proposal is to add -p option to zfs(1M) commands: create, clone
	and rename, to automatically create parent datasets which do not
	exists.  It's CR 6290249.

PROBLEM:

        Zfs commands: create clone and rename require that the parent of the
	target dataset exists. If an administrator wants to create e.g. a clone
	of the gate in pool/$user/ws/bugfixes/, he needs to first zfs create
	pool/$user, pool/$user/ws and pool/$user/ws/bugfixes. That can be
	annoying.

PROPOSED SOLUTION:

        The proposed solution is as follows:

        1) Add a new "-p" option to zfs create, clone and rename.

        2) Update the zfs man page as shown below.

System Administration Commands                          zfs(1M)

[...]
SYNOPSIS
[...] 
-     zfs create [[-o property=value]]... filesystem
+     zfs create [-p] [[-o property=value]]... filesystem
 
-     zfs create [-s] [-b blocksize] [[-o property=value]]... -V size volume
+     zfs create [-ps] [-b blocksize] [[-o property=value]]... -V size volume
[...] 
-     zfs clone snapshot filesystem|volume
+     zfs clone [-p] snapshot filesystem|volume
[...] 
-     zfs rename filesystem|volume|snapshot
+     zfs rename [-p] filesystem|volume|snapshot
          [filesystem|volume|snapshot]
[...]
-     zfs create [[-o property=value]...] filesystem
+     zfs create [-p] [[-o property=value]...] filesystem
[...]
     zfs create [-p] [[-o property=value]...] filesystem
[...]
+         -p
+                           With  this  option, all the non-existing
+			    parent datasets are created.  Datasets created
+			    by this way will automatically  be  mounted
+			    according to the "mountpoint" property inherited
+			    from their parent.  Properties specified on the
+			    command line are ignored for datasets created as
+			    result of -p option. If the target filesystem
+			    already exists, the operation completes
+			    successfully.
[...]
-     zfs create [-s] [-b blocksize] [[-o property=value]...] -V
+     zfs create [-ps] [-b blocksize] [[-o property=value]...] -V
      size volume
[...]
+         -p
+                           With  this  option, all the non-existing
+			    parent datasets are created.  Datasets created
+			    by this way will automatically  be  mounted
+			    according to the "mountpoint" property inherited
+			    from their parent.  Properties specified on the
+			    command line using -o option are ignored for 
+			    datasets created as result of -p option.
+			    If the target volume already exists, the
+			    operation completes successfully.
[...]
-     zfs clone snapshot filesystem|volume
+     zfs clone [-p] snapshot filesystem|volume
[...] 
+         -p
+                           With  this  option, all the non-existing
+			    parent datasets of the target are created.
+			    Datasets created by this way will automatically
+ 			    be  mounted according to the "mountpoint" property
+			    inherited from their parent.  If the target
+			    filesystem or volume already exists, the
+			    operation completes successfully.
[...] 
      zfs rename filesystem|volume|snapshot
      filesystem|volume|snapshot
+     zfs rename -p filesystem|volume filesystem|volume
[...]
+         -p
+                           With  this  option, all the non-existing
+			    parent datasets of the target are created.
+			    Datasets created by this way will automatically
+ 			    be  mounted according to the "mountpoint" property
+			    inherited from their parent.
[...]

6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: FastTrack

From Mark.Maybee@Sun.COM Wed Apr 11 10:28:02 2007
Received: from sfbaymail1sca.SFBay.Sun.COM (sfbaymail1sca.SFBay.Sun.COM [129.145.154.35])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id l3BHS2i2023192
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 11 Apr 2007 10:28:02 -0700 (PDT)
Received: from brmea-mail-1.sun.com (brmea-mail-1.Sun.COM [192.18.98.31])
	by sfbaymail1sca.SFBay.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2) with ESMTP id l3BHRMrc003404
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 11 Apr 2007 10:27:22 -0700 (PDT)
Received: from fe-amer-04.sun.com ([192.18.108.178])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id l3BHRMiG024736
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 11 Apr 2007 17:27:22 GMT
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 id <0JGC00G01GELBL00@mail-amer.sun.com>
 (original mail from Mark.Maybee@Sun.COM) for psarc-ext@sac.sfbay.sun.com; Wed,
 11 Apr 2007 11:27:22 -0600 (MDT)
Received: from [172.20.25.54] by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-6.01 (built Apr  3 2006))
 with ESMTPSA id <0JGC00JKQGHL3U03@mail-amer.sun.com> for
 psarc-ext@sac.sfbay.sun.com; Wed, 11 Apr 2007 11:27:22 -0600 (MDT)
Date: Wed, 11 Apr 2007 11:26:57 -0600
From: Mark Maybee <Mark.Maybee@Sun.COM>
Subject: PSARC FastTrack 2007/199: approved
Sender: Mark.Maybee@Sun.COM
To: Vita Batrla <Vitezslav.Batrla@Sun.COM>, psarc-ext@sac.sfbay.sun.com
Message-id: <461D1A61.7030606@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
User-Agent: Thunderbird 1.5.0.5 (X11/20060730)
Status: RO
Content-Length: 42

Approved during PSARC business 04/11/2007

