[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ext4 extends implementation question



Alberto Fuentes (alberto.fuentes@qindel.com on 2012-01-23 09:24 +0100):
> On 01/10/2012 11:31 PM, Arno Schuring wrote:
> > afuentes (alberto.fuentes@qindel.com on 2012-01-10 10:33 +0100):
> >> What happens when you run out of space to allocate new extends in
> >> ext4? is not allowed to write anymore even tho there are tons of
> >> blocks available?
> >
> > I'm unsure what you mean. Extents is only an optimization strategy
> > for allocating contiguous blocks. If there are no contiguous
> > blocks, ext4 falls back to allocating singular blocks, but with
> > normal usage patterns you should never get "tons of blocks
> > available" with none of them contiguous.
> >
> > At least, that's how I understand it. Are you getting allocation
> > failures with still plenty of space available?
> >
> >
> > Regards,
> > Arno
> >
> >
> 
> This is how i see it
> 
> [X][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
> [X][X][X][X][ ][ ][ ][ ][ ][ ][ ][ ]
> [X][X][X][X][X][X][X][X][ ][ ][ ][ ]
> [X][X][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
> [X][X][X][ ][ ][ ][ ][ ][ ][ ][ ][ ]
> [-][-][-][-][-][-][-][-][-][-][-][-]
> [-][-][-][-][-][-][-][-][-][-][-][-]
> 
> row= extends
> [x]= used
> [ ]= allocated
> [-]= free

That's not how extents work. What you are describing is a large block
granularity, not extents-based allocation. There is no reason why the
next allocation can't happen like this:

[X][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
[X][X][X][X][ ][ ][ ][ ][ ][ ][ ][ ]
[X][X][X][X][X][X][X][X][A][A][A][A]
[X][X][ ][ ][ ][ ][ ][ ][ ][ ][ ][ ]
[X][X][X][ ][ ][ ][ ][ ][ ][ ][ ][ ]
[-][-][-][-][-][-][-][-][-][-][-][-]
[-][-][-][-][-][-][-][-][-][-][-][-]


Regards,
Arno


Reply to: