All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Behrens <sbehrens@giantdisaster.de>
To: Wang Shilong <wangsl-fnst@cn.fujitsu.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v2 4/4] Btrfs-progs: enhance 'btrfs subvolume list'
Date: Fri, 12 Apr 2013 09:44:53 +0200	[thread overview]
Message-ID: <5167BB75.9080604@giantdisaster.de> (raw)
In-Reply-To: <51675C33.30704@cn.fujitsu.com>

On Fri, 12 Apr 2013 08:58:27 +0800, Wang Shilong wrote:
>> "btrfs subvolume list" gets a new option "--fields=..." which allows
>> to specify which pieces of information about subvolumes shall be
>> printed. This is necessary because this commit also adds all the so
>> far missing items from the root_item like the received UUID, all
>> generation values and all time values.
>>
>> The parameters to the "--fields" option is a list of items to print:
>> --fields=gen,dirid,uuid,puuid,ruuid,cgen,ogen,sgen,rgen,ctime,otime,
>>          stime,rtime,path,rootid,parent,topid,all
>>
> 
> 
> The new option '--fields' is helpful, however, i am wondering
> whether we should remove the old options '-g', '-c'...etc. These
> options has been there for a period of time,some shell script may use
> it.
> 
> IMO, to ensure compatibility, we'd better keep it.

What do other people on the list think about maintaining compatibility
in this case?

IMO it is acceptable to break compatibility for such a change. It would
confuse everybody who reads the man page that there are 1 1/2 ways to
configure the printed columns.


[...]
>>  static const char * const cmd_subvol_list_usage[] = {
>> -	"btrfs subvolume list [-agopurts] [-G [+|-]value] [-C [+|-]value] "
>> -	"[--sort=gen,ogen,rootid,path] <path>",
>> +	"btrfs subvolume list [-roast] [-G [+|-]value] [-C [+|-]value] "
>> +	"[--sort=gen,ogen,rootid,path] "
>> +	"[--fields=gen,dirid,uuid,puuid,ruuid,cgen,ogen,sgen,rgen,ctime,"
>> +	"otime,stime,rtime,path,rootid,parent,topid,all] <path>",
>>  	"List subvolumes (and snapshots)",
>>  	"",
>> -	"-p           print parent ID",
>>  	"-a           print all the subvolumes in the filesystem and",
>>  	"             distinguish absolute and relative path with respect",
>>  	"             to the given <path>",
>> -	"-c           print the ogeneration of the subvolume",
>> -	"-g           print the generation of the subvolume",
>>  	"-o           print only subvolumes bellow specified path",
>> -	"-u           print the uuid of subvolumes (and snapshots)",
>> -	"-q           print the parent uuid of the snapshots",
>>  	"-t           print the result as a table",
>>  	"-s           list snapshots only in the filesystem",
>>  	"-r           list readonly subvolumes (including snapshots)",
>> @@ -308,6 +305,9 @@ static const char * const cmd_subvol_list_usage[] = {
>>  	"             list the subvolume in order of gen, ogen, rootid or path",
>>  	"             you also can add '+' or '-' in front of each items.",
>>  	"             (+:ascending, -:descending, ascending default)",
>> +	"--fields=gen,dirid,uuid,puuid,ruuid,cgen,ogen,sgen,rgen,ctime,otime,",
>> +	"         stime,rtime,path,rootid,parent,topid,all",
>> +	"             explicitly specify the fields to print",
>>  	NULL,
>>  };
[...]

  reply	other threads:[~2013-04-12  7:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 16:22 [PATCH v2 0/4] Btrfs-progs: add --fields option to subvol list Stefan Behrens
2013-04-11 16:22 ` [PATCH v2 1/4] Btrfs-progs: cleanup in btrfs-list.c Stefan Behrens
2013-04-11 16:22 ` [PATCH v2 2/4] Btrfs-progs: make the btrfs-list output more compact Stefan Behrens
2013-04-11 16:22 ` [PATCH v2 3/4] Btrfs-progs: add more subvol fields to btrfs-list Stefan Behrens
2013-04-12  1:34   ` Wang Shilong
2013-04-12  1:42   ` Wang Shilong
2013-04-12  8:18     ` Stefan Behrens
2013-04-11 16:22 ` [PATCH v2 4/4] Btrfs-progs: enhance 'btrfs subvolume list' Stefan Behrens
2013-04-12  0:58   ` Wang Shilong
2013-04-12  7:44     ` Stefan Behrens [this message]
2013-04-18 16:28       ` David Sterba
2013-04-18 16:42   ` David Sterba
2013-04-12  8:26 ` [PATCH v3 3/4] Btrfs-progs: add more subvol fields to btrfs-list Stefan Behrens
2013-04-12  8:39   ` Wang Shilong
2013-04-12  9:05     ` Stefan Behrens
2013-04-12  9:33       ` Wang Shilong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5167BB75.9080604@giantdisaster.de \
    --to=sbehrens@giantdisaster.de \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wangsl-fnst@cn.fujitsu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.