<div dir="ltr">Hi,<div><br></div><div>I did some testing about disk with <slice> setting and found that the value of domblkinfo->allocation is not same with domstats.1->allocation for disk with <slices></div><div>Env:</div><div>libvirt-8.0.0-4.el9<br></div><div>qemu-kvm-6.2.0-9.el9<br></div><div><br></div><div>Step:</div><div>1. prepare a image </div><div># qemu-img create /car/lib/libvirt/images/disk-raw -f raw 100M -o preallocation=full<br></div><div><br></div><div>2. start a guest and attach the disk</div><div>➜  ~ cat disk.xml <br><disk type='file' device='disk'><br>      <driver name='qemu' type='raw' cache='none' io='native' copy_on_read='off' discard='ignore' detect_zeroes='on'/><br>      <source file='/var/lib/libvirt/images/disk-raw' index='1'><br>        <slices><br>          <slice type='storage' offset='0' size='104857600'/><br>        </slices><br>      </source><br>      <backingStore/><br>      <target dev='sdb' bus='scsi'/><br>      <iotune><br>        <total_bytes_sec>10000000</total_bytes_sec><br>        <group_name>slice</group_name><br>      </iotune><br>      <alias name='ua-slices'/><br>      <address type='drive' controller='0' bus='0' target='0' unit='1'/><br>    </disk><br></div><div><br></div><div>3. Write some data to the slices disk in vm</div>(in vm) dd if=/dev/zero of=/dev/sdb bs=10M count=1<div><br></div><div>4. check <b>domblkinfo</b> and <b>domstats</b><br><div>➜  ~ virsh domstats rhel9.0-1 --block|grep -Ei 'block.1.(allocation|capacity|physical)'<br>  <b>block.1.allocation=0</b><br>  block.1.capacity=104857600<br>  block.1.physical=104865792<br>➜  ~ <br>➜  ~ virsh domblkinfo rhel9.0-1 sdb|grep -Ei '(allocation|capacity|physical)'<br>Capacity:       104857600<br><b>Allocation:     104865792</b><br>Physical:       104857600<br></div></div><div><br></div><div>Are these 'allocation' values expected to be equal to each other? </div><div><br></div><div>Thanks,</div><div>Zhen Tang</div><div><br></div><div><br></div><div><br></div></div>