On Wed, Oct 18, 2023 at 12:37:59PM -0700, Parke wrote:
> Hello, [email protected],
> 
> I am exploring the feasibility of adding colorization of subvolumes to
> the output of the coreutils `ls` program.  Specifically, for the
> BTRFS, ZFS, and Bcachefs filesystems.
> 
> In order for `ls` colorization of subvolumes to be feasible, detection
> of subvolumes, by non-root users, needs to be implemented in an
> efficient and reliable manner.
> 
> In searching the linux-bcachefs mailing list, I found a post by Kent 
> Overstreet:
> 
> On 4 Nov 2021, Kent Overstreet wrote:
> Still todo:
>    - need to export a different st_dev for each subvolume, like btrfs, so that
>      find -xdev does what you want and skips snapshots
> 
> Source:
> https://lore.kernel.org/linux-bcachefs/[email protected]/
> 
> What is the status of the above todo item regarding a distinct st_dev
> value for each subvolume?

Not done yet (and thanks for the reminder!)

> A second question:  On Btrfs, each subvolume has an inode value of 256.
> 
> Source:  https://btrfs.readthedocs.io/en/latest/Subvolumes.html
> 
> Is there any easy method for users (especially non-root users) to
> identify Bcachefs subvolumes?

Unfortunately nothing so easy - snapshots will have the same inode
number for their root as the parent subvolume, but new (empty)
subvolumes get new inode numbers for their root inode.

Perhaps we could sketch out a proper interface for this...

Reply via email to