[systemd-devel] Offtopic question.

Dave Reisner d at falconindy.com
Wed Jan 2 14:24:37 PST 2013


On Jan 2, 2013 4:59 PM, "Stef Bon" <stefbon at gmail.com> wrote:
>
> Hi,
>
> sorry for the offtopic question here, but I do not know a better place
for it.
>
> I'm building a lockmonitor. I thought that would be just as easy as with
the /proc/self/mountinfo "file".
>
> But that is not the case. It's not pollable, like the mountinfo fle is.
> I've looked into the code of the kernel, (fs/locks.c versus
fs/proc_namespace.c) and there it's abvious. The file_operations with the
locks file misses the .poll operation.

Hmmm, regardless, the file is pollable. findmnt polls it (systemd as well?)
-- you need to watch for POLLERR events.

> Now first howto implement this? Someone a hint?
>
> The mountinfo poll function is related to changes in namespace, but for
the locks that is different I guess. That "changes" when a lock has been
set or released.
>
> And by the way, isn't this locks file not namespace specific?
>
> Stef
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130102/e39379a9/attachment.html>


More information about the systemd-devel mailing list