On Fri, 09/20 17:04, Paolo Bonzini wrote:
> Il 19/09/2013 13:31, Stefan Hajnoczi ha scritto:
> >> > We use the extent size as cluster size for flat extents (where no L1/L2
> >> > table is allocated so it's safe).
> > Why is the extent size passed as the cluster size parameter?
> 
> I think it's so that the flat extent doesn't take up too many cache entries.
> 
> Paolo

Flat extent doesn't take cache entry at all. It's passed as this because so
that more the code path for finding data offset can be the same with sparse:
flat is a special case of sparse with only 1 cluster. Otherwize flat needs to
be treated specially.

Another fix would be pass zero to cluster size parameter but initialize it to
extent size after parameter checking. But not quite different.

Fam

Reply via email to