All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] btrfs-progs: read device fsid from the sysfs
@ 2021-10-19  0:23 Anand Jain
  2021-10-19  0:23 ` [PATCH 1/2] btrfs-progs: prepare helper device_is_seed Anand Jain
                   ` (4 more replies)
  0 siblings, 5 replies; 17+ messages in thread
From: Anand Jain @ 2021-10-19  0:23 UTC (permalink / raw)
  To: linux-btrfs

The following test case fails as it trying to read the fsid from the sb
for a missing device.

   $ mkfs.btrfs -f -draid1 -mraid1 $DEV1 $DEV2 
   $ btrfstune -S 1 $DEV1 
   $ wipefs -a $DEV2 
   $ btrfs dev scan --forget 
   $ mount -o degraded $DEV1 /btrfs 
   $ btrfs device add $DEV3 /btrfs -f 

   $ btrfs fi us /btrfs 
     ERROR: unexpected number of devices: 1 >= 1 
     ERROR: if seed device is used, try running this command as root
 
The kernel patch [1] in the mailing list provided a sysfs interface
to read the fsid of the device, so use it instead.

 [1]  btrfs: sysfs add devinfo/fsid to retrieve fsid from the device

This patch also retains the old method that is to read the SB for
backward compatibility purposes.

Anand Jain (2):
  btrfs-progs: prepare helper device_is_seed
  btrfs-progs: read fsid from the sysfs in device_is_seed

 cmds/filesystem-usage.c | 47 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 42 insertions(+), 5 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2022-08-27  0:52 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-19  0:23 [PATCH 0/2] btrfs-progs: read device fsid from the sysfs Anand Jain
2021-10-19  0:23 ` [PATCH 1/2] btrfs-progs: prepare helper device_is_seed Anand Jain
2021-10-19  0:23 ` [PATCH 2/2] btrfs-progs: read fsid from the sysfs in device_is_seed Anand Jain
2021-10-19 14:03   ` Josef Bacik
2021-10-20  2:40     ` Anand Jain
2021-10-20 13:47       ` Josef Bacik
2021-10-19 14:04 ` [PATCH 0/2] btrfs-progs: read device fsid from the sysfs Josef Bacik
2021-10-20  2:41   ` Anand Jain
2022-01-06  0:04 ` Anand Jain
2022-01-11 15:19   ` Nikolay Borisov
2022-01-21  9:29     ` Anand Jain
2022-08-26  0:14       ` Wang Yugui
2022-08-26 10:18         ` Anand Jain
2022-08-27  0:52           ` Wang Yugui
2022-08-10 10:18 ` Qu Wenruo
2022-08-10 11:18   ` Anand Jain
2022-08-10 11:43     ` Qu Wenruo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.