summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2026-02-04 13:24:08 +1030
committerDavid Sterba <dsterba@suse.com>2026-04-07 18:55:53 +0200
commit2672a26a75517a2b4409f2a379ee2bb5c38cff06 (patch)
tree6b66df18e1e0f900af85dd2363551a63c7f49951 /tools/perf/scripts/python/export-to-postgresql.py
parentc84053d9f7f758c79320716caa098cafc70a74da (diff)
btrfs: use per-profile available space in calc_available_free_space()
For the following disk layout, can_overcommit() can cause false confidence in available space: devid 1 unallocated: 1GiB devid 2 unallocated: 50GiB metadata type: RAID1 As can_overcommit() simply uses unallocated space with factor to calculate the allocatable metadata chunk size, resulting 25.5GiB available space. But in reality we can only allocate one 1GiB RAID1 chunk, the remaining 49GiB on devid 2 will never be utilized to fulfill a RAID1 chunk. This leads to various ENOSPC related transaction abort and flips the fs read-only. Now use per-profile available space in calc_available_free_space(), and only when that failed we fall back to the old factor based estimation. And for zoned devices or for the very low chance of temporary memory allocation failure, we will still fallback to factor based estimation. But I hope in reality it's very rare. Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions