* Re: btrfs thinks its full
2008-11-19 22:24 btrfs thinks its full Lee Trager
@ 2008-11-19 22:23 ` Josef Bacik
2008-11-20 5:54 ` Lee Trager
0 siblings, 1 reply; 4+ messages in thread
From: Josef Bacik @ 2008-11-19 22:23 UTC (permalink / raw)
To: Lee Trager; +Cc: linux-btrfs
On Wed, Nov 19, 2008 at 05:24:34PM -0500, Lee Trager wrote:
> 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.
>
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* btrfs thinks its full
@ 2008-11-19 22:24 Lee Trager
2008-11-19 22:23 ` Josef Bacik
0 siblings, 1 reply; 4+ messages in thread
From: Lee Trager @ 2008-11-19 22:24 UTC (permalink / raw)
To: linux-btrfs
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: btrfs thinks its full
2008-11-19 22:23 ` Josef Bacik
@ 2008-11-20 5:54 ` Lee Trager
2008-11-20 11:54 ` Josef Bacik
0 siblings, 1 reply; 4+ messages in thread
From: Lee Trager @ 2008-11-20 5:54 UTC (permalink / raw)
To: Josef Bacik; +Cc: linux-btrfs
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
Josef Bacik wrote:
> On Wed, Nov 19, 2008 at 05:24:34PM -0500, Lee Trager wrote:
>
>> 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.
>>
>>
>
> 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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: btrfs thinks its full
2008-11-20 5:54 ` Lee Trager
@ 2008-11-20 11:54 ` Josef Bacik
0 siblings, 0 replies; 4+ messages in thread
From: Josef Bacik @ 2008-11-20 11:54 UTC (permalink / raw)
To: Lee Trager; +Cc: Josef Bacik, linux-btrfs
On Thu, Nov 20, 2008 at 12:54:59AM -0500, Lee Trager wrote:
> 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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-11-20 11:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-19 22:24 btrfs thinks its full Lee Trager
2008-11-19 22:23 ` Josef Bacik
2008-11-20 5:54 ` Lee Trager
2008-11-20 11:54 ` Josef Bacik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox