[libvirt] [PATCH 03/10] util: Introduce virFileFlock

Martin Kletzander mkletzan at redhat.com
Thu Jun 7 14:01:59 UTC 2018


On Thu, Jun 07, 2018 at 02:58:12PM +0100, Daniel P. Berrangé wrote:
>On Thu, Jun 07, 2018 at 03:54:24PM +0200, Martin Kletzander wrote:
>> We already have virFileLock(), but we are now using flock() in the code as
>> well (due to requirements for mutual exclusion between libvirt and other
>> programs using flock() as well), so let's have a function for that as well so we
>> don't need to have stubs for unsupported platforms in other files.
>
>Sigh, what program is using the flock interface ?
>

It is required (in the docs [1]) for the /sys/fs/resctrl so that all possible
programs that will access that directory are mutually excluded.  The only way
this will work is when all of them behave according to the documentation.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/x86/intel_rdt_ui.txt

>Regards,
>Daniel
>-- 
>|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
>|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
>|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20180607/d397bca8/attachment-0001.sig>


More information about the libvir-list mailing list