On 05/18/2015 11:05 PM, Filipe Brandenburger wrote:
Hi,

On Mon, May 18, 2015 at 7:26 AM, Krzysztof Opasiak
<k.opas...@samsung.com> wrote:
Matching between fds and list of expected paths is done in n^2

I don't think that's the case, because you can just stat() all the
names and fstat() all the fds, then sort both lists on inode numbers
and then traverse both in order matching inode orders on each list, so
it's actually O(n * log n).

Not that it matters that much, I don't expect this scheme to be used
for a very large number of fds/labels...


True but it is not possible using sd_is_*() functions, you have to implement this on your own;)

--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to