On 7/20/20 4:36 PM, Lin Ma wrote:
On 2020-07-17 07:05, Michal Prívozník wrote:
> errno=9 is EBADF so maybe this is a dm issue after all?
Emm...So far I lean towards to an issue in libvirt code, rather than in dm.
You might be right after all. Turns out that the mass FD closing we do
before spawning QEMU closed /dev/mapper/control opened by earlier runs
of virDevMapperGetTargets() and thus the pre-exec hook which called the
function again was passing closed FD into ioctl(). I've posted patches:
https://www.redhat.com/archives/libvir-list/2020-July/msg01500.html
The first patch should be enough to fix the issue. Can you check please?
It fixed the issue in my limited testing.
Michal