On Fri, Jun 12, 2020 at 02:42:37PM +0800, Qu Wenruo wrote: > For anonymous block device, we have at most 1 << 20 devices to allocate, > which looks quite a lot, but if we have a workload which created 1 > snapshots per second, we only need 12 days to exhaust the whole pool. 1<<20 is 1M and that would mean that there that many snapshots active at the same time in order to allocate all the anonymous block devices. Once a snapshot is not part of any path the device number is released and can be reused. So simply multiplying the numbers does not reflect the reality. A plausible explanation is leak of the anon bdev by something else than btrfs on the system.
