On 1/2/17 4:55 AM, Andrei Borzenkov wrote: > I try to understand what exactly is trimmed in case of btrfs. Using > installation in QEMU I see that host file size is about 9GB, allocated > size in guest approximately matches it and used space in guest is 7.6GB. > After some experimenting it looks like host size follows "Device > allocated" value in "btrfs filesystem usage" which leads me to believe > trim only considers space outside of allocated chunks. Is it correct?
It should consider all available space. The code iterates over all block groups and trims free space and then iterates over free dev extents, which is all of the unallocated space. Which kernel version are you using? This stuff was broken for a while but was fixed in 4.3. -Jeff -- Jeff Mahoney SUSE Labs
signature.asc
Description: OpenPGP digital signature
