From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cn.fujitsu.com ([222.73.24.84]:51569 "EHLO song.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S932563Ab2GCBhF (ORCPT ); Mon, 2 Jul 2012 21:37:05 -0400 Message-ID: <4FF24F0F.2070708@cn.fujitsu.com> Date: Tue, 03 Jul 2012 09:46:55 +0800 From: Liu Bo MIME-Version: 1.0 To: Ilya Dryomov CC: linux-btrfs@vger.kernel.org, Alexander Block Subject: Re: [PATCH 1/3] Btrfs-progs: add support to set subvolume/snapshot readonly References: <1340964038-32584-1-git-send-email-liubo2009@cn.fujitsu.com> <20120629102141.GA1877@zambezi.lan> <4FF1026E.9080007@cn.fujitsu.com> <20120702100027.GB2653@zambezi.lan> In-Reply-To: <20120702100027.GB2653@zambezi.lan> Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-btrfs-owner@vger.kernel.org List-ID: 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 >>> 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 majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >