Misleading "out of memory" in btrfs check for qgroups
root@ubuntu:~# btrfs check /dev/nvme0n1p5 Opening filesystem to check... Checking filesystem on /dev/nvme0n1p5 UUID: 6afe1f98-2fc5-4dd7-a22f-0b9e2f514a71 [1/7] checking root items [2/7] checking extents [3/7] checking free space cache cache and super generation don't match, space cache will be invalidated [4/7] checking fs roots [5/7] checking only csums items (without verifying data) [6/7] checking root refs [7/7] checking quota groups ERROR: out of memory ERROR: Loading qgroups from disk: -2 ERROR: failed to check quota groups found 65546706944 bytes used, error(s) found total csum bytes: 59958768 total tree bytes: 1668497408 total fs tree bytes: 1538752512 total extent tree bytes: 53886976 btree space waste bytes: 264382931 file data blocks allocated: 321153744896 referenced 97287462912 extent buffer leak: start 300026445824 len 16384 extent buffer leak: start 300063735808 len 16384
-2 == ENOENT, but load_quota_info() prints "out of memory" for any error. This leads to rather misguided attempt to "fix" it.
This was reported in