Thread (13 messages) 13 messages, 2 authors, 2021-12-07

Re: [PATCH v2 2/2] btrfs: sysfs add devinfo/fsid to retrieve fsid from the device

From: David Sterba <hidden>
Date: 2021-11-16 17:16:28

On Thu, Oct 21, 2021 at 11:31:17PM +0800, Anand Jain wrote:
In the case of the seed device, the fsid can be different from the mounted
sprout fsid.  The userland has to read the device superblock to know the
fsid but, that idea fails if the device is missing. So add a sysfs
interface devinfo/<devid>/fsid to show the fsid of the device.

For example:
 $ cd /sys/fs/btrfs/b10b02a5-f9de-4276-b9e8-2bfd09a578a8

 $ cat devinfo/1/fsid
 c44d771f-639d-4df3-99ec-5bc7ad2af93b
 $ cat  devinfo/3/fsid
 b10b02a5-f9de-4276-b9e8-2bfd09a578a8
From user perspective, it's another fsid, one is in the path, so I'm
wondering if it should be named like read_fsid or sprout_fsid or if the
seed/sprout information should be put into another directory completely.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help