On 02/06/2014 08:49 PM, David Sterba wrote: > On Mon, Jan 27, 2014 at 08:47:09AM +0000, Hugo Mills wrote: >> On Mon, Jan 27, 2014 at 04:52:50PM +0800, Anand Jain wrote: >>> The user land progs needs a simple way to read >>> the raw list of disks and its parameters as >>> btrfs kernel understands it. This patch will >>> introduce BTRFS_IOC_GET_DEVS which dumps >>> every thing under fs_devices. >>> >>> As of now btrfs-devlist uses this ioctl. >>> >>> In the long run this ioctl would help to optimize >>> some part of btrfs-progs, mainly the current >>> btrfs filesystem show >> >> Just thinking out loud here, really, but can we export this >> information in /sys instead, rather than adding yet more ioctls? > > I tend to agree that this belongs to sysfs, it's more flexible in case > we'll add more per-device stats, ie. one file that holds all the stats > about the device. This is also easier to use from scripts that gather > system information. > > With 3.14 the sysfs interface is available, but the devices under > /sys/fs/btrfs/<fs-uuid>/devices/... > are symlinks to the sysfs devices, so this btrfs-specific device > information has to be located in a separate directory.
yes please; it would scale better than the ioctl()s; anyway I suggest 1 file per property, and not "...one file that holds all the stats about the device" > -- > To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- gpg @keyserver.linux.it: Goffredo Baroncelli (kreijackATinwind.it> Key fingerprint BBF5 1610 0B64 DAC6 5F7D 17B2 0EDA 9B37 8B82 E0B5 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html