Re: [PATCH V2] btrfs-progs: add support to search subvolume by rootid and uuid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 13, 2017 at 06:47:11AM +0800, Anand Jain wrote:
> Unless the top level is mounted there is no way to know the
> details of all the subvolume.  For example:
> 
> mount -o subvol=sv1/newsv1 /dev/sdb /btrfs
> 
> btrfs su list /btrfs
> ID 257 gen 12 top level 5 path sv1
> ID 258 gen 9 top level 257 path sv1/snap
> ID 259 gen 11 top level 257 path sv1/newsv1
> 
> You can't subvol show for sv1 and sv1/snap as its paths aren't
> accessible to the user unless the its top level is mounted.
> 
> This patch adds two new options to the existing btrfs subvol show
> cli. They are --rootid/-r or --uuid/-u, with this now the user will
> be able to look for a subvolume using the rootid OR the uuid.
> 
> ./btrfs su show -r 257 /btrfs
> sv1
> 	Name: 			sv1
> 	UUID: 			30129358-c69d-3e4a-a662-29509cc69c95
> 	Parent UUID: 		-
> 	Received UUID: 		-
> 	Creation time: 		2017-07-11 20:32:57 +0800
> 	Subvolume ID: 		257
> 	Generation: 		12
> 	Gen at creation: 	7
> 	Parent ID: 		5
> 	Top level ID: 		5
> 	Flags: 			-
> 	Snapshot(s):
> 				sv1/snap
> 
> Signed-off-by: Anand Jain <anand.jain@xxxxxxxxxx>
> ---
> v2: Check if both -u and -r are set by the user and fail if so.

Applied, thanks. I did some minor updates to the help text.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux