[PATCH 0/2] conf: Don't generate clashing machine names for embed driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Inspired by the talk here:

https://www.redhat.com/archives/libvir-list/2020-March/msg00232.html

Instead of using md5() and the first 6 letters of it, I've decided to go
with SHA256 and 8 letters as this offers 16^8 = 4294967296 = 2^32
possibilities, which is the limit of inodes for ext4. If we ever hit a
conflict, we can just use 9 letters of the hash.

Michal Prívozník (2):
  qemu_conf: Track embed root dir
  conf: Don't generate clashing machine names for embed driver

 src/conf/domain_conf.c | 18 +++++++++++++++---
 src/conf/domain_conf.h |  1 +
 src/lxc/lxc_domain.c   |  2 +-
 src/qemu/qemu_conf.c   |  2 ++
 src/qemu/qemu_conf.h   |  2 ++
 src/qemu/qemu_domain.c |  4 +++-
 tests/virsystemdtest.c | 35 ++++++++++++++++++++---------------
 7 files changed, 44 insertions(+), 20 deletions(-)

-- 
2.24.1





[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux