This is for guest Linux under VMware Workstation.
I tried vmware-toolbox-cmd disk shrink /
on btrfs which mounted as compress=zstd,noatime,nodiratime,space_cache,ssd,discard
. However, the image just expanded to maximum size and cannot be shrinked.
It seems compressed btrfs will not write zero file as zeros.
I find there are some ioctl patches on zero-fill at https://lwn.net/ml/linux-btrfs/aed736d257f7e91cf3b0cf4d1fdfc247212d8bf7.1524233244.git.dsterba@suse.com/.
How can I call BTRFS_CLEAR_OP_ZERO_NOUNMAP
from guest Linux ?