On Thu 22 Feb 2018 12:39:52 AM CET, Eric Blake wrote:
>      free_in_cluster = s->cluster_size - offset_into_cluster(s, offset);
>      do {
>          if (!offset || free_in_cluster < size) {
> -            int64_t new_cluster = alloc_clusters_noref(bs, s->cluster_size);
> +            int64_t new_cluster;
> +
> +            new_cluster = alloc_clusters_noref(bs, s->cluster_size,
> +                                               (1ULL << s->csize_shift) - 1);

(1ULL << s->csize_shift) - 1) is the same as s->cluster_offset_mask, but
I guess it's confusing to use that here, so your approach looks
appropriate.

Reviewed-by: Alberto Garcia <be...@igalia.com>

Berto

Reply via email to