Re: btrfs subvolume list feature request

2014-12-15 Thread Satoru Takeuchi

Hi Ali,

(2014/12/16 11:01), Ali AlipourR wrote:

Hi

I think it will be to add option to btrfs subvolume list command to
also show the property of sub volumes (ro, compression,...)? do this
is possible?


Of course it's possible by writing some code :-D

Is btrfs property get subvol (and some one liner) insufficient for
your purpose? If you want to just list properties of each subvolumes
instead of listing properties with existing fields, it can be
accomplished as follows.

===
# btrfs sub list /btrfstest
# btrfs sub cre /btrfstest/sub1
Create subvolume '/btrfstest/sub1'
# btrfs sub cre /btrfstest/sub2
Create subvolume '/btrfstest/sub2'
# btrfs sub list /btrfstest/
ID 382 gen 39625 top level 5 path sub1
ID 383 gen 39626 top level 5 path sub2
# for i in $(btrfs sub list /btrfstest | cut -d ' ' -f 9) ; do echo -n $i': ' ; 
btrfs prop get /btrfstest/$i ; done
sub1ro=false
sub2ro=false
===

Thanks,
Satoru



Thanks,
Ali
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html



--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: btrfs subvolume list feature request

2014-12-15 Thread Chris Murphy
On Mon, Dec 15, 2014 at 10:36 PM, Satoru Takeuchi
takeuchi_sat...@jp.fujitsu.com wrote:

 Is btrfs property get subvol (and some one liner) insufficient for
 your purpose?

I was not previously aware of btrfs property, thanks for mentioning
this. man btrfs does not list the property command; although man btrfs
property does explain it. So now I'm wondering what other commands
might not be listed in man btrfs.


-- 
Chris Murphy
--
To unsubscribe from this list: send the line unsubscribe linux-btrfs in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html