This is an old revision of the document!
How to balance a btrfs (when running out of free space even when there is really free space)
The code “btrfs_map_physical.c” for finding out the swap file offset for hibernation resume doesn't work on 32bits.
error opening file for reading: Value too large for defined data type
fstat: Value too large for defined data type
fd = open(argv[optind], O_RDONLY);
fd = open(argv[optind], O_RDONLY |O_LARGEFILE );
and compile using the following command line:
gcc -O2 -o btrfs_map_physical -D_FILE_OFFSET_BITS=64 btrfs_map_physical.c