From sacadmin Tue May  9 11:19:35 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k49IJYe1021454
	for <psarc@sac.eng.Sun.COM>; Tue, 9 May 2006 11:19:35 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.149.247.22])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id k49IJVot000961
	for <@sunmail3.sfbay.sun.com:psarc@sun.com>; Wed, 10 May 2006 02:19:33 +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 <0IZ00020BG8JNM00@nwk-avmta-2.sfbay.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 11:19:31 -0700 (PDT)
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 <0IZ000D7OG8ERYB0@nwk-avmta-2.sfbay.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 11:19:31 -0700 (PDT)
Received: from fe-amer-01.sun.com ([192.18.108.175])
	by brmea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id k49IJPSX013169	for
 <psarc@sun.com>; Tue, 09 May 2006 12:19:25 -0600 (MDT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ000I01G6MBJ00@mail-amer.sun.com>
 (original mail from Sarah.Jelinek@Sun.COM)
 for psarc@sun.com (ORCPT psarc@sun.com); Tue, 09 May 2006 12:19:25 -0600 (MDT)
Received: from [192.168.0.17] ([129.147.152.57])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTPSA id <0IZ000G8UG89XK41@mail-amer.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 12:19:22 -0600 (MDT)
Date: Tue, 09 May 2006 12:07:15 -0600
From: Sarah Jelinek <Sarah.Jelinek@sun.com>
Subject: Fast track: PSARC/2006/308 zfs list option
Sender: Sarah.Jelinek@sun.com
To: psarc@sun.com, richlowe@richlowe.net
Reply-to: Sarah.Jelinek@sun.com
Message-id: <4460DA53.8030807@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 2941

Hi All,

I am sponsoring the following fast track for myself and Richard Lowe as 
part of the OpenSolaris bug sponsor program. It times out on 5/16/2006.

Proposed man page changes are in the case directory, zfs.txt.

thanks,
sarah
*****


Copyright 2006 Sun Microsystems, Inc.
______________________________________________________________

Name(s) of person (s) answer questions?

        Sarah Jelinek
    Rich Lowe, richlowe@richlowe.net

What specifically is the proposal that we are reviewing?

    Addition of the -s and -S options to the 'zfs list' command for
    selecting columns to display and sort from. See svcs(1) for
    an example.

    This ARC case is generated from an opensolaris sponsor request for
    RFE 6276925 option to sort 'zfs list' output. Solution provided
    by Richard Lowe, sponsored by Sarah Jelinek.

Summary:

    These options are being added to enable sorting of the 'zfs list'
    output.

    -s col               Sorts output by column.  col  should
                           be  a column name. See COLUMNS below
                           for available columns.  Multiple  -s options 
are evaluated left to right, in
                           descreasing order of importance.

      So for example, the command  'zfs list -s avail -S refer' will be in
      ascending order of space available and for the datasets where that 
is equal, sort in descending order of space
      referenced.

    -S col               Sorts by col in the  opposite  order
                            as option -s.

    Numeric types sort in ascending/descending order.

    String types sort in alphabetical order.

    Types inappropriate for a row sort that row to the literal
    bottom, regardless of the specified ordering.  For example,
    the property 'available' makes no sense on a snapshot.

    If no sorting options are specified the existing behavior of
    'zfs list' is preserved.

    **************************************************************

    COLUMNS:

        type            
        creation        
        used          
        available       
        referenced      
        compressratio 
        mounted      
        origin
        quota
        reservation
        volsize  
        volblocksize
        recordsize 
        mountpoint
        sharenfs
        checksum
        atime
        devices
        exec
        setuid
        readonly
        zoned
        snapdir
        aclmode
        aclinherit

    This project is requesting approval for patch binding.

EXPORTED INTERFACES:
                          Proposed                              Specified
Interface                 Stability                             in what
Name                      Classification                        document?
------------------------------------------------------------------------------
zfs list -s/-S        Evolving                This document.



From sacadmin Tue May  9 11:50:11 2006
Received: from sunmail1brm.Central.Sun.COM (sunmail1brm.Central.Sun.COM [129.147.62.17])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k49IoB6k022481
	for <psarc@sac.eng.Sun.COM>; Tue, 9 May 2006 11:50:11 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.149.246.28])
	by sunmail1brm.Central.Sun.COM (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k49IoAq03606
	for <@sunmail2.sfbay.sun.com:psarc@sun.com>; Tue, 9 May 2006 12:50:10 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 id <0IZ000D05HNLUV00@nwk-avmta-1.sfbay.Sun.COM> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 11:50:10 -0700 (PDT)
Received: from brmea-mail-4.sun.com ([192.18.98.36])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 with ESMTP id <0IZ0004OMHNF9NB0@nwk-avmta-1.sfbay.Sun.COM> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 11:50:09 -0700 (PDT)
Received: from fe-amer-03.sun.com ([192.18.108.177])
	by brmea-mail-4.sun.com (8.12.10/8.12.9) with ESMTP id k49Io3IH008329	for
 <psarc@sun.com>; Tue, 09 May 2006 12:50:03 -0600 (MDT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ000I01H6GAG00@mail-amer.sun.com>
 (original mail from Sarah.Jelinek@Sun.COM)
 for psarc@sun.com (ORCPT psarc@sun.com); Tue, 09 May 2006 12:50:03 -0600 (MDT)
Received: from [192.168.0.17] ([129.147.152.57])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTPSA id <0IZ00067LHND8Y81@mail-amer.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 12:50:03 -0600 (MDT)
Date: Tue, 09 May 2006 12:37:56 -0600
From: Sarah Jelinek <Sarah.Jelinek@Sun.COM>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <4460DA53.8030807@sun.com>
Sender: Sarah.Jelinek@Sun.COM
To: Sarah.Jelinek@Sun.COM
Cc: psarc@Sun.COM, richlowe@richlowe.net
Reply-to: Sarah.Jelinek@Sun.COM
Message-id: <4460E184.6010503@sun.com>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_dbS3oe6yVRUgIL+Y2KxQGA)"
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com>
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 3361

This is a multi-part message in MIME format.

--Boundary_(ID_dbS3oe6yVRUgIL+Y2KxQGA)
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT

Resending with better formatted proposal, attached. Apologies.

sarah
****
Sarah Jelinek wrote:
> Hi All,
>
> I am sponsoring the following fast track for myself and Richard Lowe 
> as part of the OpenSolaris bug sponsor program. It times out on 
> 5/16/2006.
>
> Proposed man page changes are in the case directory, zfs.txt.
>
> thanks,
> sarah
> *****
>

--Boundary_(ID_dbS3oe6yVRUgIL+Y2KxQGA)
Content-type: text/plain; name=zfs_listarc.txt
Content-transfer-encoding: 7BIT
Content-disposition: inline; filename=zfs_listarc.txt

Copyright 2006 Sun Microsystems, Inc.
______________________________________________________________

Name(s) of person (s) answer questions?

        Sarah Jelinek
	Rich Lowe, richlowe@richlowe.net

What specifically is the proposal that we are reviewing?

	Addition of the -s and -S options to the 'zfs list' command for
	selecting columns to display and sort from. See svcs(1) for
	an example.

	This ARC case is generated from an opensolaris sponsor request for
	RFE 6276925 option to sort 'zfs list' output. Solution provided
	by Richard Lowe, sponsored by Sarah Jelinek.

Summary:

	These options are being added to enable sorting of the 'zfs list'
	output. 

	-s col               Sorts output by column.  col  should
                             be  a column name. See COLUMNS below
                             for available columns.  Multiple  -s
			     options are evaluated left to right, in
			     descreasing order of importance.

			     So for example, the command 
				'zfs list -s -S refer' will be in
			     ascending order of space available and
			     for the datasets where that is equal, sort
			     in descending order of space referenced.

	-S col               Sorts by col in the  opposite  order
			     as option -s.

	Numeric types sort in ascending/descending order.

	String types sort in alphabetical order.

	Types inappropriate for a row sort that row to the literal
	bottom, regardless of the specified ordering.  For example,
	the property 'available' makes no sense on a snapshot. 

	If no sorting options are specified the existing behavior of
	'zfs list' is preserved.

	**************************************************************

	COLUMNS:

	type             
        creation         
        used           
        available        
        referenced       
        compressratio  
        mounted       
        origin 
        quota
        reservation
        volsize   
        volblocksize 
        recordsize  
        mountpoint 
        sharenfs 
        checksum
        atime 
        devices
        exec
        setuid
        readonly
        zoned
        snapdir
        aclmode
        aclinherit

	This project is requesting approval for patch binding.

EXPORTED INTERFACES:
                          Proposed                              Specified
Interface                 Stability                             in what
Name                      Classification                        document?
------------------------------------------------------------------------------
zfs list -s/-S		Evolving				This document.


--Boundary_(ID_dbS3oe6yVRUgIL+Y2KxQGA)--

From sacadmin Tue May  9 12:01:03 2006
Received: from sunmail2.sfbay.sun.com (sunmail2.SFBay.Sun.COM [129.149.246.180])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k49J13EJ023286
	for <psarc@sac.eng.sun.com>; Tue, 9 May 2006 12:01:03 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2.sfbay.sun.com (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k49J0wE17114;
	Tue, 9 May 2006 12:00:58 -0700 (PDT)
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 <0IZ000K0DI5LAK00@brm-avmta-1.central.sun.com>; Tue,
 09 May 2006 13:00:57 -0600 (MDT)
Received: from phorcys.East.Sun.COM ([129.148.174.143])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0IZ000IOKI5LPY20@brm-avmta-1.central.sun.com>; Tue,
 09 May 2006 13:00:57 -0600 (MDT)
Received: from phorcys.East.Sun.COM (localhost [127.0.0.1])
	by phorcys.East.Sun.COM (8.13.6+Sun/8.13.6) with ESMTP id k49J1BVA001187; Tue,
 09 May 2006 15:01:11 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.East.Sun.COM (8.13.6+Sun/8.13.6/Submit) id k49J1Bun001184; Tue,
 09 May 2006 15:01:11 -0400 (EDT)
Date: Tue, 09 May 2006 15:01:10 -0400
From: James Carlson <james.d.carlson@Sun.COM>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: Sarah Jelinek's message of 9 May 2006 12:37:56
To: Sarah.Jelinek@Sun.COM
Cc: psarc@Sun.COM, richlowe@richlowe.net
Message-id: <17504.59126.941758.36742@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
Status: RO
Content-Length: 536

Sarah Jelinek writes:
> 			     So for example, the command 
> 				'zfs list -s -S refer' will be in
> 			     ascending order of space available and
> 			     for the datasets where that is equal, sort
> 			     in descending order of space referenced.

The above should be 'zfs list -s avail -S refer', right?

-- 
James Carlson, KISS Network                    <james.d.carlson@sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From sacadmin Tue May  9 12:04:16 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k49J4Flc023333
	for <psarc@sac.eng.Sun.COM>; Tue, 9 May 2006 12:04:15 -0700 (PDT)
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 k49J4B7E021193
	for <@sunmail1brm.central.sun.com:psarc@sun.com>; Wed, 10 May 2006 03:04:14 +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 <0IZ000K01IAZEE00@brm-avmta-1.central.sun.com> for psarc@sun.com
 (ORCPT psarc@Sun.COM); Tue, 09 May 2006 13:04:11 -0600 (MDT)
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 <0IZ000IGDIAZPM10@brm-avmta-1.central.sun.com> for psarc@sun.com
 (ORCPT psarc@Sun.COM); Tue, 09 May 2006 13:04:11 -0600 (MDT)
Received: from fe-amer-05.sun.com ([192.18.108.179])
	by brmea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id k49J4ASX012324	for
 <psarc@Sun.COM>; Tue, 09 May 2006 13:04:10 -0600 (MDT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ000501HY82100@mail-amer.sun.com>
 (original mail from Sarah.Jelinek@Sun.COM)
 for psarc@Sun.COM (ORCPT psarc@Sun.COM); Tue, 09 May 2006 13:04:10 -0600 (MDT)
Received: from [192.168.0.17] ([129.147.152.57])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTPSA id <0IZ0009MJIAXAM50@mail-amer.sun.com> for psarc@Sun.COM
 (ORCPT psarc@Sun.COM); Tue, 09 May 2006 13:04:10 -0600 (MDT)
Date: Tue, 09 May 2006 12:52:04 -0600
From: Sarah Jelinek <Sarah.Jelinek@sun.com>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <17504.59126.941758.36742@gargle.gargle.HOWL>
Sender: Sarah.Jelinek@sun.com
To: James Carlson <James.D.Carlson@sun.com>
Cc: psarc@sun.com, richlowe@richlowe.net
Reply-to: Sarah.Jelinek@sun.com
Message-id: <4460E4D4.30507@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
 <17504.59126.941758.36742@gargle.gargle.HOWL>
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 439

James Carlson wrote:
> Sarah Jelinek writes:
>   
>> 			     So for example, the command 
>> 				'zfs list -s -S refer' will be in
>> 			     ascending order of space available and
>> 			     for the datasets where that is equal, sort
>> 			     in descending order of space referenced.
>>     
>
> The above should be 'zfs list -s avail -S refer', right?
>
>   
yes, it should. I will update the doc in the case materials.

thanks,
sarah

From sacadmin Tue May  9 12:06:10 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k49J69Aq023419
	for <psarc@sac.eng.Sun.COM>; Tue, 9 May 2006 12:06:10 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.149.246.28])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id k49J5w7i022110
	for <@sunmail2.sfbay.sun.com:psarc@Sun.COM>; Wed, 10 May 2006 03:06:08 +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 (built Dec  2 2004))
 id <0IZ000F01IE5JC00@nwk-avmta-1.sfbay.Sun.COM> for psarc@Sun.COM
 (ORCPT psarc@Sun.COM); Tue, 09 May 2006 12:06:05 -0700 (PDT)
Received: from engmail1mpk.Eng.Sun.COM ([129.146.11.21])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 with ESMTP id <0IZ00044FIE59UB0@nwk-avmta-1.sfbay.Sun.COM> for psarc@Sun.COM
 (ORCPT psarc@Sun.COM); Tue, 09 May 2006 12:06:05 -0700 (PDT)
Received: from scuba.eng.sun.com (scuba.SFBay.Sun.COM [129.146.175.60])
	by engmail1mpk.Eng.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,v2.2)
 with ESMTP id k49J64jJ009722; Tue, 09 May 2006 12:06:04 -0700 (PDT)
Received: from scuba.sfbay.sun.com (localhost [127.0.0.1])
	by scuba.eng.sun.com (8.13.5+Sun/8.13.5) with ESMTP id k49J64Kn016335; Tue,
 09 May 2006 12:06:04 -0700 (PDT)
Received: (from dduvall@localhost)
	by scuba.sfbay.sun.com (8.13.5+Sun/8.13.5/Submit) id k49J64Yn016334; Tue,
 09 May 2006 12:06:04 -0700 (PDT)
Date: Tue, 09 May 2006 12:06:03 -0700
From: Danek Duvall <danek.duvall@sun.com>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <4460E184.6010503@sun.com>
To: Sarah Jelinek <Sarah.Jelinek@sun.com>
Cc: psarc@sun.com, richlowe@richlowe.net
Mail-followup-to: Sarah Jelinek <Sarah.Jelinek@Sun.COM>, psarc@Sun.COM,
 richlowe@richlowe.net
Message-id: <20060509190603.GT20215@scuba.sfbay.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
User-Agent: mutt-ng/devel-r535 (SunOS)
Status: RO
Content-Length: 90

What is the interaction between sorting and the tree-like view that list -r
gives?

Danek

From sacadmin Tue May  9 21:48:47 2006
Received: from sunmail1brm.Central.Sun.COM (sunmail1brm.Central.Sun.COM [129.147.62.17])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4A4mkED012411
	for <psarc@sac.eng.Sun.COM>; Tue, 9 May 2006 21:48:47 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.149.246.28])
	by sunmail1brm.Central.Sun.COM (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k4A4mkq11725
	for <@sunmail2.sfbay.sun.com:psarc@sun.com>; Tue, 9 May 2006 22:48:46 -0600 (MDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 id <0IZ1009019D97100@nwk-avmta-1.sfbay.Sun.COM> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 21:48:45 -0700 (PDT)
Received: from sineb-mail-2.sun.com ([192.18.19.7])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 with ESMTP id <0IZ1000089D3G140@nwk-avmta-1.sfbay.Sun.COM> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 21:48:45 -0700 (PDT)
Received: from fe-apac-06.sun.com
 (fe-apac-06.sun.com [192.18.19.177] (may be forged))
	by sineb-mail-2.sun.com (8.12.10+Sun/8.12.9) with ESMTP id k4A4mcFV005698	for
 <psarc@sun.com>; Wed, 10 May 2006 12:48:38 +0800 (SGT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ100701979JC00@mail-apac.sun.com>
 (original mail from Alan.Hargreaves@Sun.COM)
 for psarc@sun.com (ORCPT psarc@sun.com); Wed, 10 May 2006 12:48:38 +0800 (SGT)
Received: from [129.158.12.60] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 with ESMTPSA id <0IZ100DRR9CZ36GJ@mail-apac.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 12:48:38 +0800 (SGT)
Date: Wed, 10 May 2006 14:47:16 +1000
From: Alan Hargreaves <alan.hargreaves@sun.com>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <4460DA53.8030807@sun.com>
Sender: alan.hargreaves@sun.com
To: Sarah.Jelinek@sun.com
Cc: psarc@sun.com, richlowe@richlowe.net
Message-id: <44617054.9020705@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com>
User-Agent: Thunderbird 1.5.0.2 (X11/20060427)
Status: RO
Content-Length: 405

Have you considered multiple sort keys?

eg

zfs list -s col1,col2,...
or perhaps
zfs list -s col1 -s col2 [...]

Similar for -S.

The other thing I was wondering about would be using something like -r 
to reverse the sort order in the same way as ls(1).

alan?
-- 
Alan Hargreaves - http://blogs.sun.com/tpenta
Staff Engineer (Kernel/VOSJEC/Performance)
Product Technical Support (APAC)
Sun Microsystems

From sacadmin Tue May  9 22:04:53 2006
Received: from sunmail3.sfbay.sun.com (sunmail3.SFBay.Sun.COM [129.149.247.180])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4A54rO5013199
	for <psarc@sac.eng.sun.com>; Tue, 9 May 2006 22:04:53 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail3.sfbay.sun.com (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k4A54pw23275
	for <@sunmail1brm.central.sun.com:psarc@sun.com>; Tue, 9 May 2006 22:04:51 -0700 (PDT)
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 <0IZ100001A403500@brm-avmta-1.central.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 23:04:48 -0600 (MDT)
Received: from sineb-mail-2.sun.com ([192.18.19.7])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0IZ10078RA3YZ8A0@brm-avmta-1.central.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Tue, 09 May 2006 23:04:47 -0600 (MDT)
Received: from fe-apac-05.sun.com
 (fe-apac-05.sun.com [192.18.19.176] (may be forged))
	by sineb-mail-2.sun.com (8.12.10+Sun/8.12.9) with ESMTP id k4A54kFV006881	for
 <psarc@sun.com>; Wed, 10 May 2006 13:04:46 +0800 (SGT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ100801A26NZ00@mail-apac.sun.com>
 (original mail from Alan.Hargreaves@Sun.COM)
 for psarc@sun.com (ORCPT psarc@sun.com); Wed, 10 May 2006 13:04:46 +0800 (SGT)
Received: from [129.158.12.60] by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 with ESMTPSA id <0IZ10020YA3UM4A2@mail-apac.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 13:04:46 +0800 (SGT)
Date: Wed, 10 May 2006 15:03:23 +1000
From: Alan Hargreaves <Alan.Hargreaves@Sun.COM>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <44617054.9020705@Sun.COM>
Sender: Alan.Hargreaves@Sun.COM
To: Sarah.Jelinek@Sun.COM
Cc: psarc@Sun.COM, richlowe@richlowe.net
Message-id: <4461741B.9040706@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <44617054.9020705@Sun.COM>
User-Agent: Thunderbird 1.5.0.2 (X11/20060427)
Status: RO
Content-Length: 820

Alan Hargreaves wrote:
> Have you considered multiple sort keys?
> 
> eg
> 
> zfs list -s col1,col2,...
> or perhaps
> zfs list -s col1 -s col2 [...]
> 
> Similar for -S.
> 
> The other thing I was wondering about would be using something like -r 
> to reverse the sort order in the same way as ls(1).

OK, I see that multiple -s and -S args *are* listed in the man page. I 
also note that we already do comma seperated lists in zfs list (see -o). 
Might it then be an idea to allow comma seperated lists in addition to 
multiple arguments (in order to mix and match reverse sorting of 
multiple columns)?

I also see -r is not available so we can just ditch that idea.

alan.
-- 
Alan Hargreaves - http://blogs.sun.com/tpenta
Staff Engineer (Kernel/VOSJEC/Performance)
Product Technical Support (APAC)
Sun Microsystems

From sacadmin Wed May 10 09:26:41 2006
Received: from sunmail3.sfbay.sun.com (sunmail3.SFBay.Sun.COM [129.149.247.180])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4AGQeQx019129
	for <psarc@sac.eng.sun.com>; Wed, 10 May 2006 09:26:40 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.149.246.28])
	by sunmail3.sfbay.sun.com (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k4AGQcO23482
	for <@sunmail2.sfbay.sun.com:psarc@Sun.COM>; Wed, 10 May 2006 09:26:39 -0700 (PDT)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 id <0IZ200D015O82V00@nwk-avmta-1.sfbay.Sun.COM> for psarc@Sun.COM
 (ORCPT psarc@Sun.COM); Wed, 10 May 2006 09:26:32 -0700 (PDT)
Received: from sfbaymail1sca.SFBay.Sun.COM ([129.145.154.35])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 with ESMTP id <0IZ20060P5O8H360@nwk-avmta-1.sfbay.Sun.COM> for psarc@Sun.COM
 (ORCPT psarc@Sun.COM); Wed, 10 May 2006 09:26:32 -0700 (PDT)
Received: from bags.sfbay.sun.com (bags.SFBay.Sun.COM [129.146.228.222])
	by sfbaymail1sca.SFBay.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,v2.2)
 with ESMTP id k4AGQWoe010795; Wed, 10 May 2006 09:26:32 -0700 (PDT)
Received: from bags.SFBay.Sun.COM (localhost [127.0.0.1])
	by bags.sfbay.sun.com (8.13.5+Sun/8.13.5) with ESMTP id k4AGQVHu481244; Wed,
 10 May 2006 09:26:31 -0700 (PDT)
Received: (from jwadams@localhost)
	by bags.SFBay.Sun.COM (8.13.5+Sun/8.13.5/Submit) id k4AGQVGL481243; Wed,
 10 May 2006 09:26:31 -0700 (PDT)
Date: Wed, 10 May 2006 09:26:31 -0700
From: Jonathan Adams <jonathan.adams@Sun.COM>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <4460E184.6010503@sun.com>
To: Sarah Jelinek <Sarah.Jelinek@Sun.COM>
Cc: psarc@Sun.COM, richlowe@richlowe.net
Message-id: <20060510162631.GA481156@eng.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
User-Agent: Mutt/1.4.2.1i
Status: RO
Content-Length: 1474

On Tue, May 09, 2006 at 12:37:56PM -0600, Sarah Jelinek wrote:
> 
> 	-s col               Sorts output by column.  col  should
>                              be  a column name. See COLUMNS below
>                              for available columns.  Multiple  -s
> 			     options are evaluated left to right, in
> 			     descreasing order of importance.
> 
> 			     So for example, the command 
> 				'zfs list -s -S refer' will be in
				^^^^^^^^^^^^^^^^^^^^^^
there appears to be an argument missing here (-s avail?)

> 			     ascending order of space available and
> 			     for the datasets where that is equal, sort
> 			     in descending order of space referenced.
> 
> 	-S col               Sorts by col in the  opposite  order
> 			     as option -s.

Isn't this not getopts(1)-compliant:

intro(1):
     11. The order of the options relative to one another  should
         not matter.

I've always understood this to mean that while ordering of arguments
with the *same* option letter:

	ps -o pid -o args

can have an effect, different option letters should be independent.  That
would imply that:

	zfs list -s name -S compressratio

be equivalent to:

	zfs list -S compressratio -s name

which won't work.

Perhaps something like:

	zfs list -s avail -s -refer
	zfs list -s avail,-refer

would be better?  (- indicating reverse the sort order, and allow
comma-or-space-separated argument)

Cheers,
- jonathan
-- 
Jonathan Adams, Solaris Kernel Development

From sacadmin Wed May 10 09:30:33 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4AGUVVe019382
	for <psarc@sac.eng.Sun.COM>; Wed, 10 May 2006 09:30:32 -0700 (PDT)
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 k4AGUREC001528;
	Thu, 11 May 2006 00:30:29 +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 <0IZ2007155UQMR00@brm-avmta-1.central.sun.com>; Wed,
 10 May 2006 10:30:26 -0600 (MDT)
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 <0IZ200KA45UQF0B0@brm-avmta-1.central.sun.com>; Wed,
 10 May 2006 10:30:26 -0600 (MDT)
Received: from fe-amer-05.sun.com ([192.18.108.179])
	by brmea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id k4AGUPSX021634; Wed,
 10 May 2006 10:30:25 -0600 (MDT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ200I015HBGA00@mail-amer.sun.com>
 (original mail from Sarah.Jelinek@Sun.COM); Wed,
 10 May 2006 10:30:25 -0600 (MDT)
Received: from [192.168.0.17] ([129.147.152.57])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTPSA id <0IZ2009KD5U8ANH0@mail-amer.sun.com>; Wed,
 10 May 2006 10:30:10 -0600 (MDT)
Date: Wed, 10 May 2006 10:18:02 -0600
From: Sarah Jelinek <Sarah.Jelinek@sun.com>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <20060510162631.GA481156@eng.sun.com>
Sender: Sarah.Jelinek@sun.com
To: Jonathan Adams <jonathan.adams@sun.com>
Cc: psarc@sun.com, richlowe@richlowe.net
Reply-to: Sarah.Jelinek@sun.com
Message-id: <4462123A.4020103@sun.com>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
 <20060510162631.GA481156@eng.sun.com>
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 1639

Jonathan Adams wrote:
> On Tue, May 09, 2006 at 12:37:56PM -0600, Sarah Jelinek wrote:
>   
>> 	-s col               Sorts output by column.  col  should
>>                              be  a column name. See COLUMNS below
>>                              for available columns.  Multiple  -s
>> 			     options are evaluated left to right, in
>> 			     descreasing order of importance.
>>
>> 			     So for example, the command 
>> 				'zfs list -s -S refer' will be in
>>     
> 				^^^^^^^^^^^^^^^^^^^^^^
> there appears to be an argument missing here (-s avail?)
>   
Yes, it is wrong. I updated the spec in the case materials to be correct.

sarah
****
>   
>> 			     ascending order of space available and
>> 			     for the datasets where that is equal, sort
>> 			     in descending order of space referenced.
>>
>> 	-S col               Sorts by col in the  opposite  order
>> 			     as option -s.
>>     
>
> Isn't this not getopts(1)-compliant:
>
> intro(1):
>      11. The order of the options relative to one another  should
>          not matter.
>
> I've always understood this to mean that while ordering of arguments
> with the *same* option letter:
>
> 	ps -o pid -o args
>
> can have an effect, different option letters should be independent.  That
> would imply that:
>
> 	zfs list -s name -S compressratio
>
> be equivalent to:
>
> 	zfs list -S compressratio -s name
>
> which won't work.
>
> Perhaps something like:
>
> 	zfs list -s avail -s -refer
> 	zfs list -s avail,-refer
>
> would be better?  (- indicating reverse the sort order, and allow
> comma-or-space-separated argument)
>
> Cheers,
> - jonathan
>   


From sacadmin Wed May 10 09:53:43 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4AGrg7d020936
	for <psarc@sac.eng.Sun.COM>; Wed, 10 May 2006 09:53:43 -0700 (PDT)
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 k4AGrdjA014181
	for <@sunmail1brm.central.sun.com:psarc@sun.com>; Thu, 11 May 2006 00:53:41 +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 <0IZ20080L6XBJZ00@brm-avmta-1.central.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 10:53:35 -0600 (MDT)
Received: from brmea-mail-3.sun.com ([192.18.98.34])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0IZ200KBL6XBF0C0@brm-avmta-1.central.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 10:53:35 -0600 (MDT)
Received: from fe-amer-06.sun.com ([192.18.108.180])
	by brmea-mail-3.sun.com (8.12.10/8.12.9) with ESMTP id k4AGrZKe002952	for
 <psarc@sun.com>; Wed, 10 May 2006 10:53:35 -0600 (MDT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ200N016S43Q00@mail-amer.sun.com>
 (original mail from Sarah.Jelinek@Sun.COM)
 for psarc@sun.com (ORCPT psarc@sun.com); Wed, 10 May 2006 10:53:35 -0600 (MDT)
Received: from [192.168.0.17] ([129.147.152.57])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTPSA id <0IZ2008H76XAGGC0@mail-amer.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 10:53:34 -0600 (MDT)
Date: Wed, 10 May 2006 10:41:28 -0600
From: Sarah Jelinek <Sarah.Jelinek@sun.com>
Subject: [Fwd: Re: Fast track: PSARC/2006/308 zfs list option]
Sender: Sarah.Jelinek@sun.com
To: psarc@sun.com
Reply-to: Sarah.Jelinek@sun.com
Message-id: <446217B8.5080601@sun.com>
MIME-version: 1.0
Content-type: multipart/mixed; boundary="Boundary_(ID_O8C76LEULcKd8bIvEnEKRw)"
X-PMX-Version: 5.1.2.240295
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 5116

This is a multi-part message in MIME format.

--Boundary_(ID_O8C76LEULcKd8bIvEnEKRw)
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT

Forwarding for Richard.



--Boundary_(ID_O8C76LEULcKd8bIvEnEKRw)
Content-type: message/rfc822;
 name="Re: Fast track: PSARC/2006/308 zfs list option"

Return-path: <richlowe@richlowe.net>
Received: from fe-amer-10.sun.com ([192.18.108.184])
 by bedge3-mail1.central.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 with ESMTP id <0IZ200CXV5NEZ6C0@bedge3-mail1.central.sun.com> for
 sjelinek@bedge3-mail1.Central.Sun.COM; Wed, 10 May 2006 10:26:02 -0600 (MDT)
Received: from conversion-daemon.mail-amer.sun.com by mail-amer.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ2002015INJQ00@mail-amer.sun.com> for
 sjelinek@bedge3-mail1.Central.Sun.COM (ORCPT Sarah.Jelinek@sun.com); Wed,
 10 May 2006 10:26:01 -0600 (MDT)
Received: from phys-bedge3-1 ([129.147.156.111])
 by mail-amer.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTP id <0IZ200GMH5ND2G40@mail-amer.sun.com> for
 sjelinek@bedge3-mail1.Central.Sun.COM (ORCPT Sarah.Jelinek@sun.com); Wed,
 10 May 2006 10:26:01 -0600 (MDT)
Received: from centralmail3brm.Central.Sun.COM ([129.147.62.199])
 by bedge3-mail1.central.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 with ESMTP id <0IZ200CXS5NDZ6C0@bedge3-mail1.central.sun.com> for
 sjelinek@bedge3-mail1.Central.Sun.COM (ORCPT Sarah.Jelinek@sun.com); Wed,
 10 May 2006 10:26:01 -0600 (MDT)
Received: from sunmail1brm.Central.Sun.COM
 (sunmail1brm.Central.Sun.COM [129.147.62.17])
	by centralmail3brm.Central.Sun.COM (8.13.6+Sun/8.13.6/ENSMAIL,v2.2)
 with ESMTP id k4AGPb0a008842	for <sarah.jelinek@central.sun.com>; Wed,
 10 May 2006 10:25:37 -0600 (MDT)
Received: from nwk-avmta-2.sfbay.sun.com
 (nwk-avmta-2.SFBay.Sun.COM [129.149.247.22])	by sunmail1brm.Central.Sun.COM
 (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k4AGQ1E03772	for
 <@sunmail3.sfbay.sun.com:Sarah.Jelinek@sun.com>; Wed,
 10 May 2006 10:26:01 -0600 (MDT)
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 <0IZ20080T5NDBJ00@nwk-avmta-2.sfbay.sun.com> for Sarah.Jelinek@sun.com
 (ORCPT Sarah.Jelinek@sun.com); Wed, 10 May 2006 09:26:01 -0700 (PDT)
Received: from nwkea-mail-1.sun.com ([192.18.42.13])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0IZ200JUJ5NBLIC0@nwk-avmta-2.sfbay.sun.com> for
 Sarah.Jelinek@sun.com (ORCPT Sarah.Jelinek@sun.com); Wed,
 10 May 2006 09:25:59 -0700 (PDT)
Received: from relay2.sun.com (relay2.sun.com [150.143.103.24] (may be forged))
	by nwkea-mail-1.sun.com (8.12.10/8.12.9) with ESMTP id k4AGMEre012656	for
 <Sarah.Jelinek@sun.com>; Wed, 10 May 2006 09:25:59 -0700 (PDT)
Received: from mms09es.sun.com (mms09es.sun.com [150.143.104.174])
 by relay2.sun.com with ESMTP; Wed, 10 May 2006 16:25:54 +0000 (Z)
Received: from relay1.sun.com (relay1.sun.com [150.143.103.14])
 by mms09es.sun.com with ESMTP; Wed, 10 May 2006 16:25:53 +0000 (Z)
Received: from rwcrmhc12.comcast.net (rwcrmhc12.comcast.net [204.127.192.82])
 by relay1.sun.com with ESMTP; Wed, 10 May 2006 16:25:53 +0000 (Z)
Received: from cadellin.int.richlowe.net
 (c-71-236-33-80.hsd1.tn.comcast.net[71.236.33.80]) by comcast.net (rwcrmhc12)
 with ESMTP id <20060510162552m12008bpv9e>; Wed, 10 May 2006 16:25:52 +0000
Received: from cadellin.int.richlowe.net (localhost [127.0.0.1])
	by cadellin.int.richlowe.net (8.13.6+Sun/8.13.4) with ESMTP id k4AGPsel008086;
 Wed, 10 May 2006 12:25:54 -0400 (EDT)
Received: (from richlowe@localhost)	by cadellin.int.richlowe.net
 (8.13.6+Sun/8.13.6/Submit) id k4AGPsDO008085; Wed,
 10 May 2006 12:25:54 -0400 (EDT)
Date: Wed, 10 May 2006 12:25:54 -0400
From: Richard Lowe <richlowe@richlowe.net>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <20060509190603.GT20215@scuba.sfbay.sun.com>
To: Sarah Jelinek <Sarah.Jelinek@Sun.COM>
Cc: psarc@Sun.COM
Message-id: <874pzxsv71.fsf@richlowe.net>
X-Envelope-from: Sarah.Jelinek@Sun.COM
X-Envelope-to: psarc <@smarthost.sun.com:psarc@sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
 <20060509190603.GT20215@scuba.sfbay.sun.com>
X-Authentication-warning: cadellin.int.richlowe.net: richlowe set sender to
 richlowe@richlowe.net using -f
User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.5-b26 (usg-unix-v)
Original-recipient: rfc822;Sarah.Jelinek@sun.com

Danek Duvall <danek.duvall@Sun.COM> writes:

> What is the interaction between sorting and the tree-like view that list -r
> gives?
>

That view isn't at all specific to 'list -r', it's the normal view
limited to the specified dataset and its children.  It will be sorted
based on -s and -S, if they are specified.

-- Rich.

--Boundary_(ID_O8C76LEULcKd8bIvEnEKRw)--

From sacadmin Wed May 10 10:16:16 2006
Received: from sunmail3.sfbay.sun.com (sunmail3.SFBay.Sun.COM [129.149.247.180])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4AHGG5p024458
	for <psarc@sac.eng.sun.com>; Wed, 10 May 2006 10:16:16 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.149.247.22])
	by sunmail3.sfbay.sun.com (8.11.7p1+Sun/8.11.7/ENSMAIL,v2.2) with ESMTP id k4AHGFO14091
	for <@sunmail3.sfbay.sun.com:psarc@sun.com>; Wed, 10 May 2006 10:16:15 -0700 (PDT)
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 <0IZ200B0F7YVV400@nwk-avmta-2.sfbay.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 10:16:07 -0700 (PDT)
Received: from engmail1mpk.Eng.Sun.COM ([129.146.11.21])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0IZ200ABM7YU3O20@nwk-avmta-2.sfbay.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 10 May 2006 10:16:07 -0700 (PDT)
Received: from scuba.eng.sun.com (scuba.SFBay.Sun.COM [129.146.175.60])
	by engmail1mpk.Eng.Sun.COM (8.12.10+Sun/8.12.10/ENSMAIL,v2.2)
 with ESMTP id k4AHG6jJ004855; Wed, 10 May 2006 10:16:06 -0700 (PDT)
Received: from scuba.sfbay.sun.com (localhost [127.0.0.1])
	by scuba.eng.sun.com (8.13.5+Sun/8.13.5) with ESMTP id k4AHG5P9025220; Wed,
 10 May 2006 10:16:06 -0700 (PDT)
Received: (from dduvall@localhost)
	by scuba.sfbay.sun.com (8.13.5+Sun/8.13.5/Submit) id k4AHG5vL025219; Wed,
 10 May 2006 10:16:05 -0700 (PDT)
Date: Wed, 10 May 2006 10:16:04 -0700
From: Danek Duvall <danek.duvall@sun.com>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <87wtcu36tp.fsf@richlowe.net>
To: Richard Lowe <richlowe@richlowe.net>
Cc: Sarah Jelinek <sarah.jelinek@sun.com>, psarc@sun.com
Mail-followup-to: Richard Lowe <richlowe@richlowe.net>,
 Sarah Jelinek <sarah.jelinek@sun.com>, psarc@sun.com
Message-id: <20060510171604.GC20215@scuba.sfbay.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
 <20060509190603.GT20215@scuba.sfbay.sun.com> <87wtcu36tp.fsf@richlowe.net>
User-Agent: mutt-ng/devel-r535 (SunOS)
Status: RO
Content-Length: 1758

On Tue, May 09, 2006 at 11:19:14PM -0400, Richard Lowe wrote:

> Danek Duvall <danek.duvall@Sun.COM> writes:
> 
> > What is the interaction between sorting and the tree-like view that
> > list -r gives?
> 
> That view isn't at all specific to 'list -r', it's the normal view
> limited to the specified dataset and its children.  It will be sorted
> based on -s and -S, if they are specified.

I'm not sure I understand about the tree not being specific to list -r.
How else do you see a tree structure?  Or do you simply mean when using
list without an argument?

At any rate, I think my question still holds, but I'll be more specific.
When I do a "zfs list" or "zfs list -r <dataset>", I see a bunch of
datasets in a linearized tree structure.

If I now add sorting to that, is the tree structure preserved, and the
sorting applied only to the children of each node in the tree individually,
or is the sorting applied across all datasets, destroying the tree?

So if I have a couple of filesystems, each with a handful of snapshots:

    A     April 1
    A@1   April 3
    A@2   April 4
    A@3   April 7
    B     April 4
    B@1   April 5
    B@2   April 6
    B@3   April 8

I want to sort by date, will they all be intermixed:

    A     April 1
    A@1   April 3
    B     April 4
    A@2   April 4
    B@1   April 5
    B@2   April 6
    A@3   April 7
    B@3   April 8

or will I see the filesystems sorted by date, with the snapshots still
"attached" to their filesystems, which would look like the original
listing (since the default sorting at least appears to be date)?

I don't think it makes sense to "sort by thread" (to use a mutt term) at
any level except the top, but both sorting by thread and not are valid with
other sort keys.

Danek

From sacadmin Wed May 10 11:01:29 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4AI1SXI028750
	for <psarc@sac.eng.Sun.COM>; Wed, 10 May 2006 11:01:29 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.149.246.28])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id k4AI0orb020863;
	Thu, 11 May 2006 02:01:25 +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 (built Dec  2 2004))
 id <0IZ200M0JA2BX000@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 10 May 2006 11:01:23 -0700 (PDT)
Received: from sineb-mail-2.sun.com ([192.18.19.7])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2 (built Dec  2 2004))
 with ESMTP id <0IZ2006OHA29HDB0@nwk-avmta-1.sfbay.Sun.COM>; Wed,
 10 May 2006 11:01:22 -0700 (PDT)
Received: from fe-apac-03.sun.com
 (fe-apac-03.sun.com [192.18.19.174] (may be forged))
	by sineb-mail-2.sun.com (8.12.10+Sun/8.12.9) with ESMTP id k4AI1KFV013323;
 Thu, 11 May 2006 02:01:20 +0800 (SGT)
Received: from conversion-daemon.mail-apac.sun.com by mail-apac.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0IZ200K019EI8700@mail-apac.sun.com>
 (original mail from Alan.Hargreaves@Sun.COM); Thu,
 11 May 2006 02:01:20 +0800 (SGT)
Received: from [192.168.10.101] ([129.150.152.8])
 by mail-apac.sun.com (Sun Java System Messaging Server 6.2-4.02 (built Sep  9
 2005)) with ESMTPSA id <0IZ2006TYA20QZC2@mail-apac.sun.com>; Thu,
 11 May 2006 02:01:20 +0800 (SGT)
Date: Thu, 11 May 2006 04:00:35 +1000
From: Alan Hargreaves <Alan.Hargreaves@sun.com>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <20060510162631.GA481156@eng.sun.com>
Sender: Alan.Hargreaves@sun.com
To: Jonathan Adams <jonathan.adams@sun.com>
Cc: Sarah Jelinek <Sarah.Jelinek@sun.com>, psarc@sun.com,
        richlowe@richlowe.net
Message-id: <44622A43.5060105@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
 <20060510162631.GA481156@eng.sun.com>
User-Agent: Thunderbird 1.5 (X11/20060113)
Status: RO
Content-Length: 696

Jonathan Adams wrote:

> Perhaps something like:
> 
> 	zfs list -s avail -s -refer
> 	zfs list -s avail,-refer
> 
> would be better?  (- indicating reverse the sort order, and allow
> comma-or-space-separated argument)
> 

'-' is probably a particularly poor choice. Look at the example that you 
wish the primary key to be reverse sorted.

eg

	zfs list -s -avail,refer

That's going to confuse things pretty well.

alan.
-- 
Alan Hargreaves - http://blogs.sun.com/tpenta
Staff Engineer (Kernel/VOSJEC/Performance)
Product Technical Support (APAC)
Sun Microsystems

I'm going in the World's Greatest shave for Leukaemia. See
http://blogs.sun.com/tpenta?entry=raising_money_for_leukaemia_support

From sacadmin Wed May 10 12:58:40 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4AJwdZD006672
	for <psarc@sac.eng.Sun.COM>; Wed, 10 May 2006 12:58:39 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.149.247.22])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id k4AJwZ2f021099;
	Thu, 11 May 2006 03:58:36 +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 <0IZ200003FHM8H00@nwk-avmta-2.sfbay.sun.com>; Wed,
 10 May 2006 12:58:35 -0700 (PDT)
Received: from norton.SFBay.Sun.COM ([129.146.228.124])
 by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0IZ200KY6FHMOH10@nwk-avmta-2.sfbay.sun.com>; Wed,
 10 May 2006 12:58:34 -0700 (PDT)
Received: from norton.SFBay.Sun.COM (localhost [127.0.0.1])
	by norton.SFBay.Sun.COM (8.13.6+Sun/8.13.6) with ESMTP id k4AJwYx0143110; Wed,
 10 May 2006 12:58:34 -0700 (PDT)
Received: (from jwadams@localhost)
	by norton.SFBay.Sun.COM (8.13.6+Sun/8.13.6/Submit) id k4AJwXpp143109; Wed,
 10 May 2006 12:58:33 -0700 (PDT)
Date: Wed, 10 May 2006 12:58:33 -0700
From: Jonathan Adams <jonathan.adams@Sun.COM>
Subject: Re: Fast track: PSARC/2006/308 zfs list option
In-reply-to: <878xp9pun2.fsf@richlowe.net>
To: Richard Lowe <richlowe@richlowe.net>
Cc: Sarah Jelinek <Sarah.Jelinek@Sun.COM>, psarc@Sun.COM
Message-id: <20060510195833.GS129192@eng.sun.com>
MIME-version: 1.0
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: inline
X-PMX-Version: 5.1.2.240295
References: <4460DA53.8030807@sun.com> <4460E184.6010503@sun.com>
 <20060510162631.GA481156@eng.sun.com> <878xp9pun2.fsf@richlowe.net>
User-Agent: Mutt/1.4.2.1i
Status: RO
Content-Length: 1348

On Wed, May 10, 2006 at 03:06:09PM -0400, Richard Lowe wrote:
> Jonathan Adams <jonathan.adams@Sun.COM> writes:
> 
> > On Tue, May 09, 2006 at 12:37:56PM -0600, Sarah Jelinek wrote:
> >
> >> 			     ascending order of space available and
> >> 			     for the datasets where that is equal, sort
> >> 			     in descending order of space referenced.
> >> 
> >> 	-S col               Sorts by col in the  opposite  order
> >> 			     as option -s.
> >
> > Isn't this not getopts(1)-compliant:
> >
> > intro(1):
> >      11. The order of the options relative to one another  should
> >          not matter.
> >
> > I've always understood this to mean that while ordering of arguments
> > with the *same* option letter:
> >
> > 	ps -o pid -o args
> >
> > can have an effect, different option letters should be independent.  That
> > would imply that:
> >
> > 	zfs list -s name -S compressratio
> >
> > be equivalent to:
> >
> > 	zfs list -S compressratio -s name
> >
> > which won't work.
> 
> As mentioned in the reply to Alan, this is modelled on consistency
> with svcs(1)'s -s and -S flags, which also share this behavior.
> Given their similar purpose, and existing sharing of meanings and
> behaviour for -o, and -H.  I thought it best to aim for consistency.

That makes sense.

Cheers,
- jonathan

-- 
Jonathan Adams, Solaris Kernel Development

From sacadmin Wed May 31 09:53:12 2006
Received: from sunmail4.Singapore.Sun.COM (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.6+Sun/8.13.6) with ESMTP id k4VGrAtp009813
	for <psarc@sac.eng.Sun.COM>; Wed, 31 May 2006 09:53:11 -0700 (PDT)
Received: from nwk-avmta-2.sfbay.sun.com (nwk-avmta-2.SFBay.Sun.COM [129.149.247.22])
	by sunmail4.Singapore.Sun.COM (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id k4VGqe75025773
	for <@sunmail3.sfbay.sun.com:psarc@sun.com>; Thu, 1 Jun 2006 00:53:10 +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 <0J050010R2WJF300@nwk-avmta-2.sfbay.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 31 May 2006 09:53:07 -0700 (PDT)
Received: from nwkea-pix-1.sun.com ([10.4.134.6]) by nwk-avmta-2.sfbay.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0J0500HD42WIWJ40@nwk-avmta-2.sfbay.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 31 May 2006 09:53:06 -0700 (PDT)
Received: from d1-sfbay-09.sun.com ([192.18.39.119])
	by nwkea-pix-1.sun.com (8.12.10+Sun/8.12.9) with ESMTP id k4VGr673003834	for
 <psarc@sun.com>; Wed, 31 May 2006 09:53:06 -0700 (PDT)
Received: from conversion-daemon.d1-sfbay-09.sun.com by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 id <0J05005012U5R900@d1-sfbay-09.sun.com>
 (original mail from Sherri.Shieh@Sun.COM)
 for psarc@sun.com (ORCPT psarc@sun.com); Wed, 31 May 2006 09:53:06 -0700 (PDT)
Received: from [129.146.11.205] by d1-sfbay-09.sun.com
 (Sun Java System Messaging Server 6.2-4.02 (built Sep  9 2005))
 with ESMTPSA id <0J050075R2WHUC70@d1-sfbay-09.sun.com> for psarc@sun.com
 (ORCPT psarc@sun.com); Wed, 31 May 2006 09:53:06 -0700 (PDT)
Date: Wed, 31 May 2006 09:53:05 -0700
From: Sherri Shieh <Sherri.Shieh@sun.com>
Subject: PSARC fast track: 2006/308  ZFS list sort option
Sender: Sherri.Shieh@sun.com
To: psarc@sun.com, Sarah Jelinek <Sarah.Jelinek@sun.com>
Message-id: <447DC9F1.3010605@Sun.COM>
MIME-version: 1.0
Content-type: text/plain; format=flowed; charset=ISO-8859-1
Content-transfer-encoding: 7BIT
X-Accept-Language: en-us, en
X-PMX-Version: 5.2.0.264296
User-Agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.7) Gecko/20050530
Status: RO
Content-Length: 353

The following fast track was approved 2 weeks ago. I'm marking closed 
approved.

- Sherri

 

-- 


=========================================================
Sherri Shieh			Sun Microsystems, Inc.
Program Manager			Email: sherri.shieh@sun.com
Systems Architecture		Phone: 650-786-5245/x85245
===========================================================


