btrfs thinks its full
Because the last bug I dealt with had so much to do with the disk being full I decided to test and see what happens when I fill up the disk. Unfortunatly the disk thinks its full before it actually is. I have a 7539M btrfs partition and tried to fill it by doing
dd if=/dev/zero of=/mnt/btrfs/fill
btrfs reports its full after 6408M have been used. dd, ls, and df all confirm this. This uses only 85% of the disk but I can not put one more bit onto the partition. The only thing that shows up in my system logs is "space info full 1." I am using the latest git sources.
Lee
Quoted 5 lines · Lee Trager
Because the last bug I dealt with had so much to do with the disk being full I decided to test and see what happens when I fill up the disk. Unfortunatly the disk thinks its full before it actually is. I have a 7539M btrfs partition and tried to fill it by doing
Quoted 7 lines
dd if=/dev/zero of=/mnt/btrfs/fill
btrfs reports its full after 6408M have been used. dd, ls, and df all confirm this. This uses only 85% of the disk but I can not put one more bit onto the partition. The only thing that shows up in my system logs is "space info full 1." I am using the latest git sources.
Yup thats by design :). Theres a 85% full short-circuit in there to keep the panic unpleasentness from happening since there isn't proper ENOSPC handling. This will be tossed when the ENOSPC handling is done. Thanks,
Josef
Is that just finishing btrfs_check_free_space? What would that involve? I haven't done much kernel work but I could give it a try.
Lee
Quoted 22 lines · Josef Bacik
Quoted 5 lines · Lee Trager
Because the last bug I dealt with had so much to do with the disk being full I decided to test and see what happens when I fill up the disk. Unfortunatly the disk thinks its full before it actually is. I have a 7539M btrfs partition and tried to fill it by doing
Quoted 8 lines
dd if=/dev/zero of=/mnt/btrfs/fill
btrfs reports its full after 6408M have been used. dd, ls, and df all confirm this. This uses only 85% of the disk but I can not put one more bit onto the partition. The only thing that shows up in my system logs is "space info full 1." I am using the latest git sources.
Yup thats by design :). Theres a 85% full short-circuit in there to keep the panic unpleasentness from happening since there isn't proper ENOSPC handling. This will be tossed when the ENOSPC handling is done. Thanks,
Josef
Quoted 3 lines · Lee Trager
Is that just finishing
btrfs_check_free_space? What would that involve? I haven't done much kernel work but I could give it a try.
ENOSPC is kind of tricky, which is why it hasn't been done yet ;). Since btrfs does delayed allocation you are going to have to keep track of how much data we want to allocate within this transaction so we don't run out of space while we're doing the delalloc stuff. Since btrfs is COW you also can't let the amount of space you are going to alloc grow to the absolute largest it can for the disk, since we are going to need space to COW the metadata blocks, so you are going to have to keep a certain amount of space reserved so that you have enough space to handle all the COW blocks that will be made. It may be a bit much for a first time project, I'd recommend hopping on the IRC channel and get something to do from Chris, right now he's focusing on finalizing the disk format, so there is alot of simple work to be done that will familiarize you with some of the inner workings of btrfs. When we get the disk layout finalized I plan to tackle proper ENOSPC handling. Thanks,
Josef