On 31/10/2014 17:08, Karel Zak wrote:
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
I might be missing something, correct me if wrong. Is there any udev API
which gives me a list of devices which hold btrfs ? I just browsed
through there isn't any.
Anand
--
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