[libvirt] [PATCH 07/17] virudev: Introduce virUdevMgrDump
Daniel P. Berrange
berrange at redhat.com
Wed Oct 26 15:37:01 UTC 2016
On Wed, Oct 26, 2016 at 02:36:54PM +0200, Michal Privoznik wrote:
> Now that we are able to store security labels for devices, next
> step is to flush them into a file. For more convenience I've
> chosen JSON format (as we have all the APIs needed for processing
> the format).
I wonder if we're better off avoiding using a structured file
format entirely.
IIUC, we essentially just need a boolean indicator for the udev
helper against each device. Could we do this with a zero length
file per device. eg consider a device '/dev/sda1' That has a
sha256 checksum d8d8d2c47b672edb91407c0014286b472673b2ff9d6636fd567d11650986ba3c
so we could just touch a zero length file
/var/lib/libvirt/udev/$CHECKSUM
that way the udev helper doesn't need to parse anything - it merely
needs to see if the file exists or not.
Regards,
Daniel
--
|: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org :|
|: http://entangle-photo.org -o- http://search.cpan.org/~danberr/ :|
More information about the libvir-list
mailing list