From Tim.Haley@sun.com Thu Feb 26 19:32:27 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1R3WQdb028178
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Feb 2009 19:32:27 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n1R3WOve014939;
	Fri, 27 Feb 2009 03:32:25 GMT
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFP0080JGHZT900@brm-avmta-1.central.sun.com>; Thu,
 26 Feb 2009 20:32:23 -0700 (MST)
Received: from dm-central-02.central.sun.com ([129.147.62.5])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFP00NWFGHX4450@brm-avmta-1.central.sun.com>; Thu,
 26 Feb 2009 20:32:21 -0700 (MST)
Received: from spidey.Central.Sun.COM (spidey.Central.Sun.COM [172.20.25.27])
	by dm-central-02.central.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id n1R3WLFo036724; Thu, 26 Feb 2009 20:32:21 -0700 (MST)
Received: from spidey.Central.Sun.COM (localhost [127.0.0.1])
	by spidey.Central.Sun.COM (8.14.3+Sun/8.14.3) with ESMTP id n1R3Oq8X003523;
 Thu, 26 Feb 2009 20:24:52 -0700 (MST)
Received: (from timh@localhost)	by spidey.Central.Sun.COM
 (8.14.3+Sun/8.14.3/Submit) id n1R3Oqu6003521; Thu,
 26 Feb 2009 20:24:52 -0700 (MST)
Date: Thu, 26 Feb 2009 20:24:52 -0700 (MST)
From: Tim Haley <Tim.Haley@sun.com>
Subject: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack timeout
 03/05/2009]
To: PSARC-ext@sun.com
Cc: cifs-team@sun.com
Message-id: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 5104

I am sponsoring the following fast-track for Alan Wright.  It
introduces a new property on ZFS datasets to improve support SMB
clients.

Requested binding is micro, timeout is 3/4/2009.

Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 ZFS dataset property to support SMB
    1.2. Name of Document Author/Supplier:
	 Author:  Alan Wright
    1.3  Date of This Document:
	26 February, 2009

4. Technical Description

	This case proposes a new property for ZFS datasets, primarily to
	support Windows interoperability, based on the following RFEs.

	6808472 SMB name space caching on clients

	Name space caching allows SMB clients to cache the directory and
	file layout on a server.  All of the caching logistics are handled
	by the clients.  On the server-side, the requirement is that the
	server does not generate short names for files on the specified
	file system; short names are the DOS 8.3 compatibility names that
	are either space padded or contain an abbreviated form of a long
	name with a '~'.  Short names are generated by the server and
	only the server can decipher them thus the client may be unable
	to associate a short name with the original name in its cache.
	In SMB terms, the server must generate unique names, which requires
	a dataset-wide property to ensure that short names are not generated
	on any share of a dataset on which name space caching is permitted.

	6582167 Drive letter and volume label support

	Windows allows volumes to be named and some Windows applications
	embed the volume name in files, which can cause problems after
	network volume migration from, say, Samba to the CIFS service.
	For example, the Thumbs Plus photo indexing application keeps
	track of non-local volumes by volume label since network drives
	can show up on different drive letters.  After switching from
	Samba to the CIFS service, the volume label changed, which
	invalidated the Thumbs Plus application database containing all
	the keyword-to-image mapping information.  It is desirable to
	provide a property to allow users to label a ZFS dataset.

	Server-side drive letters are required by some over-the-wire Windows
	backup applications.  When these applications convert a share name
	to the absolute path on the server the path must be prefixed by a
	server-side drive letter.

	6600891 Need to be able to enable/disable oplocks per ZFS dataset

	Opportunistic locks (oplocks) are used to coordinate SMB delegation,
	which must be consistent across a dataset to ensure file content
	integrity.  Delegation is a mechanism for managing exclusive or
	shared network access to files.  For example, a client that has
	been granted exclusive access to a file can cache the file content
	locally, secure in the knowledge it will be informed if another
	client or a server process tries to access the file, and it will be
	given an opportunity to sync locally cached data back to the server
	prior to another access being granted.

	The proposed property is smb.  The default value will be none.
	The property is inherited, but individual values have different
	inheritance rules as described below.  Non-inherited values are
	stripped out by libzfs before being passed to higher level
	software.

	The following values are defined:

		shortnames=enabled | disabled

		Controls whether or not short names will be generated for
		objects in this file system.  When the value is set to
		disabled, the CIFS service will not generate short names
		and indicate to SMB clients that name space caching is
		allowed.  Otherwise, the CIFS service will generate short
		names and will not indicate that name space caching is
		allowed.  Short names will be generated by default.  This
		is an inheritable value.

		label=[<drive-letter>:]name

		Specifies a name for this file system.  The name cannot
		contain control characters (values 0x00 through 0x31) or
		any of the following characters:

		< > : " / \ | ? * ,

		Optionally, the name may be prefixed by an alphabetic
		character (drive letter) and a colon.  The drive letter
		may be used by clients as an alias for the volume name.

		The default value of the label property will be the final
		component of the mountpoint property, and there is no
		requirement for the label to be unique on the server.
		This is a non-inheritable value.

		oplocks=enabled | disabled

		Controls whether or not opportunistic locks (oplocks) will
		be granted on this file system.  The default value will be
		enabled.  This is an inheritable value.

	Example

		The following command disables short name and specifies a
		label for the dataset.  The oplocks value is not specified
		and will default to enabled.  The property as inherited by
		children will appear as simply 'shortnames=disabled'.

		# zfs set smb=shortnames=disabled,label=mylabel

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

From cyril.plisko@gmail.com Thu Feb 26 21:42:51 2009
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1R5gpQD021424
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 26 Feb 2009 21:42:51 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n1R5gorh054292;
	Thu, 26 Feb 2009 22:42:51 -0700 (MST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFP0070DMJCXP00@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Feb 2009 21:42:48 -0800 (PST)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFP00HVHMJBLIC0@nwk-avmta-2.sfbay.sun.com>; Thu,
 26 Feb 2009 21:42:48 -0800 (PST)
Received: from relay12i.sun.com
 (ip122.net129179-4.block1.us.syntegra.com [129.179.4.122])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n1R5dQ4I013420; Fri,
 27 Feb 2009 05:42:47 +0000 (GMT)
Received: from mmp12es.mmp.us.syntegra.com ([160.41.208.12] [160.41.208.12])
 by relay12i.sun.com with ESMTP id BT-MMP-673822; Fri,
 27 Feb 2009 05:42:47 +0000 (Z)
Received: from relay12i.sun.com (relay12i.sun.com [129.179.4.122])
 by mmp12es.mmp.us.syntegra.com with ESMTP id BT-MMP-8678117; Fri,
 27 Feb 2009 05:42:47 +0000 (Z)
Received: from mail-fx0-f162.google.com ([209.85.220.162] [209.85.220.162])
 by relay1i.sun.com with ESMTP id BT-MMP-8199393; Fri,
 27 Feb 2009 05:42:47 +0000 (Z)
Received: by fxm6 with SMTP id 6so897194fxm.8 for <multiple recipients>; Thu,
 26 Feb 2009 21:42:44 -0800 (PST)
Received: by 10.180.223.8 with SMTP id v8mr728640bkg.181.1235713364019; Thu,
 26 Feb 2009 21:42:44 -0800 (PST)
Date: Fri, 27 Feb 2009 07:42:43 +0200
From: Cyril Plisko <cyril.plisko@mountall.com>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
	timeout 03/05/2009]
In-reply-to: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
Sender: cyril.plisko@gmail.com
To: Tim Haley <Tim.Haley@sun.com>
Cc: PSARC-ext@sun.com, cifs-team@sun.com
Message-id: <c7dddeaa0902262142m22d5ea03qc9d875c503bd2449@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com;
 s=gamma;        h=domainkey-signature:mime-version:sender:received:in-reply-to
         :references:date:x-google-sender-auth:message-id:subject:from:to:cc
 :content-type:content-transfer-encoding;
 bh=kuQWs+bLRYJx6P2wtt0eHc9VmiWcit5tyaHJtOV7TVc=;
 b=o/x4CTIfL1lH0xjxshyaaNs9tVxrttLtx5i2NO+KENl9bYCwrIKQnZFF+F6FHXLkR/
 pjNWUetCyXi9vuhcMovYjc/ij83EzWNOAhrwZofVAomZtMjIgz8PYpNHoKzL6bVP79Di
 LsPPLHa8Byz9gr6zOubWUZ54spBpWU2TjPLaw=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type
 :content-transfer-encoding;
 b=b/1Rp0D+JItbSv2pt5t4hBIHRzk5bwj9ySfHU1dwZxPMInKYvJPtczyr0pvKQM1XjO
 UncIR5efWdw1tiJcjEJ7/vZ8eVfnjHKKEtxkvchbArfoDyrHwWh8HqJ4Z8XyxrRvbyFh
 A92EQuAfGGTCW8zdrQVBJZQrrD8m1sjClphHM=
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Google-Sender-Auth: 9ed628b0602298a9
X-Antispam: No, score=0.0/5.0, scanned in 0.082sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by sac.sfbay.sun.com id n1R5gpQD021424
Status: RO
Content-Length: 2302

>
>        6582167 Drive letter and volume label support
>
>        Windows allows volumes to be named and some Windows applications
>        embed the volume name in files, which can cause problems after
>        network volume migration from, say, Samba to the CIFS service.
>        For example, the Thumbs Plus photo indexing application keeps
>        track of non-local volumes by volume label since network drives
>        can show up on different drive letters.  After switching from
>        Samba to the CIFS service, the volume label changed, which
>        invalidated the Thumbs Plus application database containing all
>        the keyword-to-image mapping information.  It is desirable to
>        provide a property to allow users to label a ZFS dataset.
>
>        Server-side drive letters are required by some over-the-wire Windows
>        backup applications.  When these applications convert a share name
>        to the absolute path on the server the path must be prefixed by a
>        server-side drive letter.
>
>
>                label=[<drive-letter>:]name
>
>                Specifies a name for this file system.  The name cannot
>                contain control characters (values 0x00 through 0x31) or
>                any of the following characters:
>
>                < > : " / \ | ? * ,
>
>                Optionally, the name may be prefixed by an alphabetic
>                character (drive letter) and a colon.  The drive letter
>                may be used by clients as an alias for the volume name.
>
>                The default value of the label property will be the final
>                component of the mountpoint property, and there is no
>                requirement for the label to be unique on the server.
>                This is a non-inheritable value.
>


Label and drive letter sound to me like a parameters of SMB share,
rather than ZFS dataset. They make perfect sense while used to share
something other than ZFS filesystem as well.
If so, they can be used for ZFS with its sharesmb property. For example

zfs set sharesmb=name=photos,label=h:volume4 tank/export/photos

That would be similar to sharenfs property used to set any non-default
share parameters.

Does it make any sense or I am completely off ?

-- 
Regards,
        Cyril


From amw@sun.com Fri Feb 27 15:23:17 2009
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1RNNGiU028923
	for <psarc-ext@sac.sfbay.sun.com>; Fri, 27 Feb 2009 15:23:16 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n1RNNE51047434;
	Fri, 27 Feb 2009 16:23:16 -0700 (MST)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFQ00N07ZMR0L00@nwk-avmta-2.sfbay.sun.com>; Fri,
 27 Feb 2009 15:23:15 -0800 (PST)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFQ00MBCZMRF640@nwk-avmta-2.sfbay.sun.com>; Fri,
 27 Feb 2009 15:23:15 -0800 (PST)
Received: from fe-amer-10.sun.com ([192.18.109.80])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n1RNNFuV004737; Fri,
 27 Feb 2009 23:23:15 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KFQ00700ZFEPN00@mail-amer.sun.com>; Fri, 27 Feb 2009 16:23:15 -0700 (MST)
Received: from [10.1.106.211] ([unknown] [10.1.106.211])
 by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit
 (built Dec 23 2008)) with ESMTPSA id <0KFQ00CMEZME50C0@mail-amer.sun.com>; Fri,
 27 Feb 2009 16:23:03 -0700 (MST)
Date: Fri, 27 Feb 2009 15:23:02 -0800
From: Alan M Wright <amw@sun.com>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
 timeout 03/05/2009]
Sender: Alan.M.Wright@sun.com
To: cyril.plisko@mountall.com
Cc: PSARC-ext@sun.com
Message-id: <49A875D6.4080801@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
User-Agent: Thunderbird 2.0.0.14 (X11/20080630)
Status: RO
Content-Length: 3581

 >>
 >>        6582167 Drive letter and volume label support
 >>
 >>        Windows allows volumes to be named and some Windows applications
 >>        embed the volume name in files, which can cause problems after
 >>        network volume migration from, say, Samba to the CIFS service.
 >>        For example, the Thumbs Plus photo indexing application keeps
 >>        track of non-local volumes by volume label since network drives
 >>        can show up on different drive letters.  After switching from
 >>        Samba to the CIFS service, the volume label changed, which
 >>        invalidated the Thumbs Plus application database containing all
 >>        the keyword-to-image mapping information.  It is desirable to
 >>        provide a property to allow users to label a ZFS dataset.
 >>
 >>        Server-side drive letters are required by some over-the-wire Windows
 >>        backup applications.  When these applications convert a share name
 >>        to the absolute path on the server the path must be prefixed by a
 >>        server-side drive letter.
 >>
 >>
 >>                label=[<drive-letter>:]name
 >>
 >>                Specifies a name for this file system.  The name cannot
 >>                contain control characters (values 0x00 through 0x31) or
 >>                any of the following characters:
 >>
 >>                < > : " / \ | ? * ,
 >>
 >>                Optionally, the name may be prefixed by an alphabetic
 >>                character (drive letter) and a colon.  The drive letter
 >>                may be used by clients as an alias for the volume name.
 >>
 >>                The default value of the label property will be the final
 >>                component of the mountpoint property, and there is no
 >>                requirement for the label to be unique on the server.
 >>                This is a non-inheritable value.
 >>
 >
 >
 > Label and drive letter sound to me like a parameters of SMB share,
 > rather than ZFS dataset. They make perfect sense while used to share
 > something other than ZFS filesystem as well.
 > If so, they can be used for ZFS with its sharesmb property. For example
 >
 > zfs set sharesmb=name=photos,label=h:volume4 tank/export/photos
 >
 > That would be similar to sharenfs property used to set any non-default
 > share parameters.
 >
 > Does it make any sense or I am completely off ?

All shares of a dataset should report the same label and drive letter,
and I should be able to set sharesmb=off and still have other shares
report that drive letter and label.

For example:

     zfs create -o casesensitivity=mixed tank/photos
     zfs sharesmb=off

     sharemgr create -P smb photogroup
     sharemgr add-share -r public -s tank/photos/public photogroup
     sharemgr add-share -r private -s tank/photos/private photogroup

I now have two shares (public and private) and sharesmb=off.

If I were to set a label using sharesmb that would cause zfs to share
tank/photos, which I may not want shared.

The current syntax doesn't allow sharesmb=off,label=photos, and if we
change the syntax of sharesmb it would be inconsistent with sharenfs and
shareiscsi.

Suppose I did want to share tank/photos and set some options:

     zfs sharesmb=name=photos,csc=auto,oplocks=disabled,label=z:photos,

Here you would be applying name and csc to the tank/photos share but not
to the public and private shares, but the oplocks and label values would
apply to the public and private shares.  It may cause confusion to mix
share specific options with dataset wide options in this format.

Alan


From cyril.plisko@gmail.com Sat Feb 28 00:25:22 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n1S8PL2T008924
	for <psarc-ext@sac.sfbay.sun.com>; Sat, 28 Feb 2009 00:25:21 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n1S8PAh8014466;
	Sat, 28 Feb 2009 16:25:18 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFR00505OQ2TL00@brm-avmta-1.central.sun.com>; Sat,
 28 Feb 2009 01:25:14 -0700 (MST)
Received: from sca-ea-mail-4.sun.com ([192.18.43.22])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFR008YAOQ1E770@brm-avmta-1.central.sun.com>; Sat,
 28 Feb 2009 01:25:14 -0700 (MST)
Received: from relay12i.sun.com
 (ip122.net129179-4.block1.us.syntegra.com [129.179.4.122])
	by sca-ea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n1S7w1bU001911;
 Sat, 28 Feb 2009 08:25:13 +0000 (GMT)
Received: from mmp14es.mmp.us.syntegra.com ([160.41.208.14] [160.41.208.14])
 by relay12i.sun.com with ESMTP id BT-MMP-775989; Sat,
 28 Feb 2009 08:25:13 +0000 (Z)
Received: from relay13i.sun.com (relay13i.sun.com [129.179.4.123])
 by mmp14es.mmp.us.syntegra.com with ESMTP id BT-MMP-315236; Sat,
 28 Feb 2009 08:25:13 +0000 (Z)
Received: from mail-fx0-f162.google.com ([209.85.220.162] [209.85.220.162])
 by relay1i.sun.com with ESMTP id BT-MMP-9975088; Sat,
 28 Feb 2009 08:25:12 +0000 (Z)
Received: by fxm6 with SMTP id 6so1388684fxm.8 for <multiple recipients>; Sat,
 28 Feb 2009 00:25:12 -0800 (PST)
Received: by 10.223.114.68 with SMTP id d4mr4051982faq.86.1235809512128; Sat,
 28 Feb 2009 00:25:12 -0800 (PST)
Date: Sat, 28 Feb 2009 10:25:12 +0200
From: Cyril Plisko <cyril.plisko@mountall.com>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
	timeout 03/05/2009]
In-reply-to: <49A875D6.4080801@sun.com>
Sender: cyril.plisko@gmail.com
To: Alan M Wright <amw@sun.com>
Cc: PSARC-ext@sun.com
Message-id: <c7dddeaa0902280025r2eb13b70ue6771539beb07aa9@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com;
 s=gamma;        h=domainkey-signature:mime-version:sender:received:in-reply-to
         :references:date:x-google-sender-auth:message-id:subject:from:to:cc
 :content-type:content-transfer-encoding;
 bh=yhLGf5KAdAR+ipTLtjpfSoi75Tm1pN8bxkEH1NLdERo=;
 b=GVDY2xj2tEsadjdBDJPL0AG96cPfJl7H+e6A3TTMxPFYNl+nHgAHvURn0P4I3caHsM
 Mm9SKp/H+VUEcnMdFtNh3692wj6T0Z6BxyZYaMqlPudwdZcNsPK/c6H/Txp0oijds6ro
 WGsnGVouC5w/q9MpFzOBkXsRiv7RdaVrqEVc0=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type
 :content-transfer-encoding;
 b=Ri0wQiPqIb2Pz20c0rNv4pPKSHeA0JzxgPpkrn2wQU+H8fUkVvlN042WJkvZJf4Htn
 HInTAZ+mpOWZpyosCGacwHpeORtJ7G322zC/6t/m3enfEnBF4FNDSg1CN6iFqUNgbjfA
 wnwan53fT5K/ypZcXglIOHcPr3xYJCkhKdMzQ=
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Google-Sender-Auth: 3ccf9c85ed9d8fae
X-Antispam: No, score=0.0/5.0, scanned in 0.071sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <49A875D6.4080801@sun.com>
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by sac.sfbay.sun.com id n1S8PL2T008924
Status: RO
Content-Length: 2013

Hi Alan,

>
> All shares of a dataset should report the same label and drive letter,
> and I should be able to set sharesmb=off and still have other shares
> report that drive letter and label.

I see what you mean.

> For example:
>
>    zfs create -o casesensitivity=mixed tank/photos
>    zfs sharesmb=off
>
>    sharemgr create -P smb photogroup
>    sharemgr add-share -r public -s tank/photos/public photogroup
>    sharemgr add-share -r private -s tank/photos/private photogroup
>
> I now have two shares (public and private) and sharesmb=off.
>
> If I were to set a label using sharesmb that would cause zfs to share
> tank/photos, which I may not want shared.

I do not understand that. Why wouldn't you just set label with sharemgr than ?

> The current syntax doesn't allow sharesmb=off,label=photos, and if we
> change the syntax of sharesmb it would be inconsistent with sharenfs and
> shareiscsi.

To the contrary - sharenfs does allow such syntax, and it is widely used:

pronto:/home/imp> zfs get sharenfs tank/export/install
NAME                 PROPERTY  VALUE                SOURCE
tank/export/install  sharenfs  ro,anon=0            local

> Suppose I did want to share tank/photos and set some options:
>
>    zfs sharesmb=name=photos,csc=auto,oplocks=disabled,label=z:photos,
>
> Here you would be applying name and csc to the tank/photos share but not
> to the public and private shares, but the oplocks and label values would
> apply to the public and private shares.  It may cause confusion to mix
> share specific options with dataset wide options in this format.

I do not see how can it causes any confusion. To my understanding it
does exactly what you want, but may be I missing something here.

Anyway, why don't we just always use "final component of the
mountpoint property" as you've suggested and need a special attribute
to override the value ? After all windows users do not have an option
to report volume label other than it is set on the disk.

-- 
Regards,
        Cyril


From amw@sun.com Mon Mar  2 19:01:03 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n23312nY021514
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 2 Mar 2009 19:01:03 -0800 (PST)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n2330kWo024378;
	Tue, 3 Mar 2009 03:01:01 GMT
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFW00603TPMXL00@brm-avmta-1.central.sun.com>; Mon,
 02 Mar 2009 20:00:58 -0700 (MST)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFW00IH7TPLIA50@brm-avmta-1.central.sun.com>; Mon,
 02 Mar 2009 20:00:58 -0700 (MST)
Received: from fe-amer-10.sun.com ([192.18.109.80])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n2330vB6021195; Tue,
 03 Mar 2009 03:00:57 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KFW00H00TLRGW00@mail-amer.sun.com>; Mon, 02 Mar 2009 20:00:57 -0700 (MST)
Received: from [10.1.106.211] ([unknown] [10.1.106.211])
 by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit
 (built Dec 23 2008)) with ESMTPSA id <0KFW00FUQTPE4Z40@mail-amer.sun.com>; Mon,
 02 Mar 2009 20:00:50 -0700 (MST)
Date: Mon, 02 Mar 2009 19:00:50 -0800
From: Alan M Wright <amw@sun.com>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
 timeout 03/05/2009]
In-reply-to: <c7dddeaa0902280025r2eb13b70ue6771539beb07aa9@mail.gmail.com>
Sender: Alan.M.Wright@sun.com
To: Cyril Plisko <cyril.plisko@mountall.com>
Cc: PSARC-ext@sun.com
Message-id: <49AC9D62.4080405@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <49A875D6.4080801@sun.com>
 <c7dddeaa0902280025r2eb13b70ue6771539beb07aa9@mail.gmail.com>
User-Agent: Thunderbird 2.0.0.14 (X11/20080630)
Status: RO
Content-Length: 4046

On 02/28/09 00:25, Cyril Plisko wrote:
> Hi Alan,
> 
>> All shares of a dataset should report the same label and drive letter,
>> and I should be able to set sharesmb=off and still have other shares
>> report that drive letter and label.
> 
> I see what you mean.
> 
>> For example:
>>
>>    zfs create -o casesensitivity=mixed tank/photos
>>    zfs sharesmb=off
>>
>>    sharemgr create -P smb photogroup
>>    sharemgr add-share -r public -s tank/photos/public photogroup
>>    sharemgr add-share -r private -s tank/photos/private photogroup
>>
>> I now have two shares (public and private) and sharesmb=off.
>>
>> If I were to set a label using sharesmb that would cause zfs to share
>> tank/photos, which I may not want shared.
> 
> I do not understand that.

Assuming that we were to use sharesmb to set the label and that we
already have the public and private shares defined ...

	zfs sharesmb=label=images

Now I have three shares: public and private and tank_photos.
All report the label as images.

But I don't want tank_photos shared, so I do:

	zfs sharesmb=off

Now I have two shares (public and private) but the label for those
two shares has silently changed to photos.

The sharesmb syntax will not allow me to set sharesmb to off AND
set other options.

> Why wouldn't you just set label with sharemgr than ?

sharemgr deals with a share or share groups but it has no mechanism
to apply something to all shares or to remember that something has
been set and must be applied to all future shares.  Just like the
case-sensitivity of the file system, these new settings must be
persistent even if I delete all shares (and all share groups), turn
all sharing off and then create new shares.  Sharemgr also has no
means to manage properties across zfs send/receive or export/import.

>> The current syntax doesn't allow sharesmb=off,label=photos, and if we
>> change the syntax of sharesmb it would be inconsistent with sharenfs and
>> shareiscsi.
> 
> To the contrary - sharenfs does allow such syntax, and it is widely used:
> 
> pronto:/home/imp> zfs get sharenfs tank/export/install
> NAME                 PROPERTY  VALUE                SOURCE
> tank/export/install  sharenfs  ro,anon=0            local

You can specify multiple options but "off" cannot be combined with
other options:

	shareiscsi=on | off
	sharenfs=on | off | opts
	sharesmb=on | off | opts

>> Suppose I did want to share tank/photos and set some options:
>>
>>    zfs sharesmb=name=photos,csc=auto,oplocks=disabled,label=z:photos,
>>
>> Here you would be applying name and csc to the tank/photos share but not
>> to the public and private shares, but the oplocks and label values would
>> apply to the public and private shares.  It may cause confusion to mix
>> share specific options with dataset wide options in this format.
> 
> I do not see how can it causes any confusion. To my understanding it
> does exactly what you want, but may be I missing something here.

Perhaps because I explained them here but to someone new to ZFS and
sharesmb the only way to know what that command does is to study the
man page - very carefully.  It is very easy to make mistakes and not
get the behavior you expect.

> Anyway, why don't we just always use "final component of the
> mountpoint property" as you've suggested and need a special attribute
> to override the value ?

That's explained in the ARC materials.  Some Windows applications
track removable and remote volumes via their volume labels and embed
the volume label in on-disk databases.  If you move the database to
another volume or do anything that changes the volume label reported
to the application, you will be unable to access your data.  The
data can be made accessible by renaming the current volume label.

> After all windows users do not have an option
> to report volume label other than it is set on the disk.

Windows users can set the label to anything they want - except for
a few excluded characters.

The label command can be used to change the label on a Windows file
system.

Alan


From cyril.plisko@gmail.com Mon Mar  2 21:20:16 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n235KFru015147
	for <psarc-ext@sac.sfbay.sun.com>; Mon, 2 Mar 2009 21:20:15 -0800 (PST)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.145.155.6])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n235K2CY021158;
	Tue, 3 Mar 2009 13:20:03 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-2.sfbay.sun.com by
 nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFX00H0N05E0U00@nwk-avmta-2.sfbay.sun.com>; Mon,
 02 Mar 2009 21:20:02 -0800 (PST)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFX00FBN05DYI70@nwk-avmta-2.sfbay.sun.com>; Mon,
 02 Mar 2009 21:20:02 -0800 (PST)
Received: from relay12i.sun.com
 (ip122.net129179-4.block1.us.syntegra.com [129.179.4.122])
	by brmea-mail-4.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n235AnqL001604; Tue,
 03 Mar 2009 05:20:01 +0000 (GMT)
Received: from mmp13es.mmp.us.syntegra.com ([160.41.208.13] [160.41.208.13])
 by relay12i.sun.com with ESMTP id BT-MMP-998348; Tue,
 03 Mar 2009 05:20:01 +0000 (Z)
Received: from relay15i.sun.com (relay15i.sun.com [129.179.4.125])
 by mmp13es.mmp.us.syntegra.com with ESMTP id BT-MMP-14801201; Tue,
 03 Mar 2009 05:20:00 +0000 (Z)
Received: from mail-ew0-f160.google.com ([209.85.219.160] [209.85.219.160])
 by relay1i.sun.com with ESMTP id BT-MMP-13675316; Tue,
 03 Mar 2009 05:20:00 +0000 (Z)
Received: by ewy4 with SMTP id 4so2134660ewy.8 for <multiple recipients>; Mon,
 02 Mar 2009 21:19:59 -0800 (PST)
Received: by 10.216.17.213 with SMTP id j63mr25493wej.140.1236057598898; Mon,
 02 Mar 2009 21:19:58 -0800 (PST)
Date: Tue, 03 Mar 2009 07:19:58 +0200
From: Cyril Plisko <cyril.plisko@mountall.com>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
	timeout 03/05/2009]
In-reply-to: <49AC9D62.4080405@sun.com>
Sender: cyril.plisko@gmail.com
To: Alan M Wright <amw@sun.com>
Cc: PSARC-ext@sun.com
Message-id: <c7dddeaa0903022119l4bb341e6g8319c2fa37fe1593@mail.gmail.com>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com;
 s=gamma;        h=domainkey-signature:mime-version:sender:received:in-reply-to
         :references:date:x-google-sender-auth:message-id:subject:from:to:cc
 :content-type:content-transfer-encoding;
 bh=+iG5nqu1cv8Ctz4VpaQH1VwiFagOpYhR48ULToWOnT8=;
 b=TOjWQeOCjOEHAZuw1Wu77uJ+l3sNek7wsmzAKDZ0maAgG2dyUXaDavXgCksR6JXYnr
 aWRmpYuufeElEmyE2486WU8PbskmSukkD64SuZwKzIOQupTg+u13wiTCiSFi5GCg3/J/
 94gGz+6z+9UIbeHveSSUdyQs0DSDQIsZBvOEo=
DomainKey-Signature: a=rsa-sha1; c=nofws;        d=gmail.com; s=gamma;
 h=mime-version:sender:in-reply-to:references:date
 :x-google-sender-auth:message-id:subject:from:to:cc:content-type
 :content-transfer-encoding;
 b=xycJKn7Sjk1uIM+DC55G8XT655hbSjeDuEszU44oUtyTzgZAu3EjdZqHDg7uQpIuh5
 Njl2Q8LOyRdR7jzxCBKWlg1U9sA8CbnZOaLjMOjJUfovJ+02TWbuZ5mdfFOMeu/gAHRx
 gnloMUeELnSZVoB8pQ3JRo4pfklAczhZZYhtw=
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Google-Sender-Auth: 9c211d89906e8ff5
X-Antispam: No, score=0.0/5.0, scanned in 0.047sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <49A875D6.4080801@sun.com>
 <c7dddeaa0902280025r2eb13b70ue6771539beb07aa9@mail.gmail.com>
 <49AC9D62.4080405@sun.com>
Status: RO
Content-Length: 451

>>>
>>> If I were to set a label using sharesmb that would cause zfs to share
>>> tank/photos, which I may not want shared.
>>
>> I do not understand that.
>
[..]
>
> The sharesmb syntax will not allow me to set sharesmb to off AND
> set other options.

Got it.

After thinking about it some more I believe your approach is, indeed,
better and more consistent than other options.
Thanks for taking your time to explain it.

-- 
Regards,
        Cyril

From Richard.Matthews@Sun.COM Wed Mar  4 10:22:23 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n24IMMV3000311
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 4 Mar 2009 10:22:23 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n24IMFFa000635;
	Thu, 5 Mar 2009 02:22:21 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KFZ00913V17B100@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 04 Mar 2009 10:22:19 -0800 (PST)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KFZ005H3V15K430@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 04 Mar 2009 10:22:17 -0800 (PST)
Received: from fe-amer-09.sun.com ([192.18.109.79])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n24IMHx1011159; Wed,
 04 Mar 2009 18:22:17 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KFZ00A00U8ZT100@mail-amer.sun.com>; Wed, 04 Mar 2009 11:22:17 -0700 (MST)
Received: from Rick-Matthews-MacBook-Pro-15.local ([unknown] [129.150.64.186])
 by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 with ESMTPSA id <0KFZ00KR2V12XOC0@mail-amer.sun.com>; Wed,
 04 Mar 2009 11:22:15 -0700 (MST)
Date: Wed, 04 Mar 2009 12:22:21 -0600
From: Rick Matthews <Richard.Matthews@Sun.COM>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
 timeout 03/05/2009]
In-reply-to: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
Sender: Richard.Matthews@Sun.COM
To: Tim Haley <Tim.Haley@Sun.COM>
Cc: PSARC-ext@Sun.COM, cifs-team@Sun.COM
Message-id: <49AEC6DD.90906@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
Status: RO
Content-Length: 501

Guess I did this improperly

+1

-- 
---------------------------------------------------------------------
Rick Matthews                           email: Rick.Matthews@sun.com
Sun Microsystems, Inc.                  phone:+1(651) 554-1518
1270 Eagan Industrial Road              phone(internal): 54418
Suite 160                               fax:  +1(651) 554-1540
Eagan, MN 55121-1231 USA                main: +1(651) 554-1500		
---------------------------------------------------------------------


From tim.haley@sun.com Wed Mar  4 15:01:32 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n24N1V5f015451
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 4 Mar 2009 15:01:31 -0800 (PST)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n24N1Q3o013905;
	Thu, 5 Mar 2009 07:01:30 +0800 (SGT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KG000F0F7YHIZ00@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 04 Mar 2009 15:01:29 -0800 (PST)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KG00053Q7YGJI50@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 04 Mar 2009 15:01:28 -0800 (PST)
Received: from fe-amer-09.sun.com ([192.18.109.79])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n24N1SHn026837; Wed,
 04 Mar 2009 23:01:28 +0000 (GMT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java(tm) System Messaging Server 7.0-3.01 64bit (built Dec 23 2008))
 id <0KG0009007N3GV00@mail-amer.sun.com>; Wed, 04 Mar 2009 16:01:28 -0700 (MST)
Received: from Giles.local ([unknown] [76.120.1.50])
 by mail-amer.sun.com (Sun Java(tm) System Messaging Server 7.0-3.01 64bit
 (built Dec 23 2008)) with ESMTPSA id <0KG0008A97Y50E30@mail-amer.sun.com>; Wed,
 04 Mar 2009 16:01:17 -0700 (MST)
Date: Wed, 04 Mar 2009 16:01:17 -0700
From: Tim Haley <tim.haley@sun.com>
Subject: Re: ZFS dataset property to support SMB [PSARC/2009/140 FastTrack
 timeout	03/05/2009]
In-reply-to: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
Sender: Timothy.Haley@sun.com
To: PSARC-ext@sun.com
Cc: cifs-team@sun.com
Message-id: <49AF083D.3070600@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200902270324.n1R3Oqu6003521@spidey.Central.Sun.COM>
User-Agent: Thunderbird 2.0.0.19 (Macintosh/20081209)
Status: RO
Content-Length: 229

This case was approved in today's (03/04/09) PSARC meeting.

-tim

Tim Haley wrote:
> I am sponsoring the following fast-track for Alan Wright.  It
> introduces a new property on ZFS datasets to improve support SMB
> clients.
> 

