On Fri, Oct 31, 2014 at 12:11:20PM +0800, Anand Jain wrote: > btrfs_scan_lblikd() is called by most the device related command functions. > And btrfs_scan_lblkid() is most expensive function and it becomes more > expensive > as number of devices in the system increase. Further some threads call this
wouldn't be possible to ask udev rather than scan all devices? I understand than in some cases it's necessary to have robust and independent solution, but for usual use-cases it would be less expensive to read the info from udev where we already keep track about all block devices and where we call libblkid. It would be possible to implement it as optional feature (#ifdev HAVE_LIBUDEV), the library API is very easy to use. (For example lsblk uses libblkid as fallback, the default is udev). Karel -- Karel Zak <k...@redhat.com> http://karelzak.blogspot.com -- 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