On 07/02/2012 06:00 PM, Ilya Dryomov wrote:

> On Mon, Jul 02, 2012 at 10:07:42AM +0800, Liu Bo wrote:
>> On 06/29/2012 06:21 PM, Ilya Dryomov wrote:
>>
>>> On Fri, Jun 29, 2012 at 06:00:36PM +0800, Liu Bo wrote:
>>>> Setting subvolume/snapshot readonly has been missing for a long time.
>>>>
>>>> With this patch, we can set a subvolume/snapshot readonly via:
>>>>
>>>> o    btrfs subvolume set-ro <path>
>>> Alexander's 'btrfs property' patches do exactly this, but in a much more
>>> generic and extensible way.  'btrfs property' subgroup provides a
>>> uniform interface for getting and setting properties of filesystem
>>> objects in general, not only those of subvolumes and snapshots.  It
>>> provides a much better user interface, and it also allows us to easily
>>> rethink kernel-user interface for generic get/set in future.
>>>
>>
>> Thanks for the explanation!
>>
>> But I prefer keeping the current categories 
>> {subvolume,filesystem,device,...}:
>>
>> o Compatibility, we cannot remove the old commands until we make sure that 
>> no users will
>>   use them.
> 
> We are not going to remove old commands any time soon.  However, adding
> new ones that clearly fall into get/set category, is not a good idea.
> Especially when there is a generic interface on its way.
> 
>> o We've three properties {default, readonly, lable}, is it worthy making 
>> another new interface?
> 
> It's not just about subvolumes.  There will be a lot more properties on
> the table as filesystem matures, for example device speeds, subvolume
> profiles, quotas.
> 
>> o Current categories are clear and clean.
> 
> Once again, it's not just about subvolumes.  Current categories are
> indeed clear, but adding two commands for each non-trivial property that
> comes up in future does not seem practical to me.
> 



I see, that's reasonable. :)

Besides set/get-ro and get-default, I also want to have 'btrfs subvolume list' 
work as 'ls', that is,
it can list not only all of items, but also a single item.

And I have made a patch for that (it refers to [PATCH 3/3] Btrfs-progs: add 's' 
option for 'btrfs subvolume list').

What's your opinion about it?

thanks,
liubo

> Thanks,
> 
>               Ilya
> --
> 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

Reply via email to