Re: [PATCH 00/15] btrfs: sysfs, cleanups

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

 





On 11/18/19 11:45 PM, David Sterba wrote:
On Mon, Nov 18, 2019 at 04:46:41PM +0800, Anand Jain wrote:
Mostly cleanups patches.

Patches 1-7 are renames, code moves patches and there are no
functional changes.

Patch 8 drops unused argument in the function btrfs_sysfs_add_fsid().
Patch 9 merges two small functions which is an extension of the other.

Patches 10,11 and 13 removes unnecessary features in the functions,
originally it was planned to provide sysfs attributes for the scanned
and unmounted devices, as in the un-merged patch in the mailing list [1]
    [1] [PATCH] btrfs: Introduce device pool sysfs attributes

We want something like that,

 Oh.

 Ok then I shall relook at these patches with a mind that we might
 introduce the sysfs for non mounted devices.

I don't recall all the past discussions,

 No worries. There wasn't any discussions on this specific topic.

but a separate directory for all the new sysfs files should be
introduced. Extending the existing /devices/ that contains just the
sysfs device like should stay as is.

/sys/fs/btrfs/UUID/
	devinfo/
		1/
			uuid
			state
			...
		2/
			...


 umm how about..

$ btrfs fi show
Label: none  uuid: 52ad6beb-524d-4cd8-8979-0890d0b74314
	Total devices 4 FS bytes used 384.00KiB
	devid    1 size 2.93GiB used 368.00MiB path /dev/sdb
	devid    2 size 2.93GiB used 368.00MiB path /dev/sdc
	devid    3 size 2.93GiB used 368.00MiB path /dev/sdd
	devid    4 size 2.93GiB used 368.00MiB path /dev/sde


# ls -l /sys/fs/btrfs/52ad6beb-524d-4cd8-8979-0890d0b74314/devices/
total 0
drwxr-xr-x 2 root root 0 Nov 19 14:39 1_sdb
drwxr-xr-x 2 root root 0 Nov 19 14:39 2_sdc
drwxr-xr-x 2 root root 0 Nov 19 14:39 3_sdd
drwxr-xr-x 2 root root 0 Nov 19 14:39 4_sde
lrwxrwxrwx 1 root root 0 Nov 19 14:39 sdb -> ../../../../devices/pci0000:00/0000:00:0d.0/ata2/host1/target1:0:0/1:0:0:0/block/sdb lrwxrwxrwx 1 root root 0 Nov 19 14:39 sdc -> ../../../../devices/pci0000:00/0000:00:0d.0/ata3/host2/target2:0:0/2:0:0:0/block/sdc lrwxrwxrwx 1 root root 0 Nov 19 14:39 sdd -> ../../../../devices/pci0000:00/0000:00:0d.0/ata4/host3/target3:0:0/3:0:0:0/block/sdd lrwxrwxrwx 1 root root 0 Nov 19 14:39 sde -> ../../../../devices/pci0000:00/0000:00:0d.0/ata5/host4/target4:0:0/4:0:0:0/block/sde

# cd /sys/fs/btrfs/52ad6beb-524d-4cd8-8979-0890d0b74314/devices/1_sdb
# ls -l
dev_state

(Currently its been coded to support only dev_state (patches under tests with me)).

Thanks, Anand



[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