+++ This bug was initially created as a clone of Bug #1866157 +++ Description of problem: Build dir pool failed since try to control COW flag without btrfs filesystem Version-Release number of selected component (if applicable): libvirt-6.6.0-1.module+el8.3.0+7556+0e164df2.x86_64 How reproducible: 100% Steps to Reproduce: 1.Prepare a dir pool xml and define it # cat pool.xml <pool type='dir'> <name>virsh_pool_test</name> <uuid>46eb05db-442e-42f6-b229-855c91a9bb34</uuid> <capacity unit='bytes'>53660876800</capacity> <allocation unit='bytes'>31874580480</allocation> <available unit='bytes'>21786296320</available> <source> </source> <target> <path>/var/tmp/avocado_huyf7ozz/dir-pool</path> <permissions> <mode>0711</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:virt_tmp_t:s0</label> </permissions> </target> </pool> 2.Try to build this pool # virsh pool-build virsh_pool_test error: Failed to build pool virsh_pool_test error: unable to control COW flag on '/var/tmp/avocado_huyf7ozz/dir-pool', not btrfs: Function not implemented 3. Actual results: Failed to build pool as step2 Expected results: Successfully created pool target path Additional info: This problem may point to the new commit 7230bc95aa78379c9ee20cf59394c5fc4305b75b which is mainly for btrfs filesystem but also has a influence with existed logic now. --- Additional comment from Jiri Denemark on 2020-08-05 04:34:54 EDT --- Patch sent upstream for review https://www.redhat.com/archives/libvir-list/2020-August/msg00259.html --- Additional comment from Jiri Denemark on 2020-08-05 05:06:35 EDT --- Fixed upstream by commit 2edd63a0dbd445112db23596ee0128521e8f1ff5 Refs: v6.6.0-488-g2edd63a0db Author: Jiri Denemark <jdenemar> AuthorDate: Wed Aug 5 10:01:45 2020 +0200 Commit: Jiri Denemark <jdenemar> CommitDate: Wed Aug 5 11:04:17 2020 +0200 util: Fix logic in virFileSetCOW When COW is not explicitly requested to be disabled or enabled, the function is supposed to do nothing on non-BTRFS file systems. Fixes commit 7230bc95aa78379c9ee20cf59394c5fc4305b75b. https://bugzilla.redhat.com/show_bug.cgi?id=1866157 Signed-off-by: Jiri Denemark <jdenemar> Reviewed-by: Daniel P. Berrangé <berrange> --- Additional comment from gaojianan on 2020-08-06 21:36:27 EDT --- Verified at libvirt version: libvirt-6.6.0-2.module+el8.3.0+7567+dc41c0a9.x86_64 1.Prepare a dir pool xml and define it # cat pool.xml <pool type='dir'> <name>virsh_pool_test</name> <uuid>46eb05db-442e-42f6-b229-855c91a9bb34</uuid> <capacity unit='bytes'>53660876800</capacity> <allocation unit='bytes'>31874580480</allocation> <available unit='bytes'>21786296320</available> <source> </source> <target> <path>/var/tmp/avocado_huyf7ozz/dir-pool</path> <permissions> <mode>0711</mode> <owner>0</owner> <group>0</group> <label>system_u:object_r:virt_tmp_t:s0</label> </permissions> </target> </pool> 2.Try to build this pool # virsh pool-define pool.xml Pool virsh_pool_test defined from pool.xml # virsh pool-build virsh_pool_test Pool virsh_pool_test built # virsh pool-start virsh_pool_test Pool virsh_pool_test started Work as expected , so verified.
Built into libvirt-6.6.0-2.fc33