Re: [PATCH 3 of 10] LVM: build log_area list

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

 



Jonathan Brassow [jbrassow@xxxxxxxxxx] wrote:
> Patch name: lvm-build-log_area-list.patch
> 
> Now that we have change the allocation handle structure to be
> able to store a list of log areas, fill them in and utilize
> them based on the 'log_count' parameter.  (log_count will
> be generalized in subsequent patches, but it is still just
> '1' or '0' for now... meaning nothing has changed at this
> point.)
> 
> RFC: Jonathan Brassow <jbrassow@xxxxxxxxxx>
> @@ -763,12 +763,14 @@ static int _alloc_parallel_area(struct a
>  	for (s = 0; s < ah->area_count; s++)
>  		consume_pv_area(areas[s], area_len);
>  
> -	if (log_area) {
> -		aa[s].pv = log_area->map->pv;
> -		aa[s].pe = log_area->start;
> +	for (i = 0, s = ah->area_count;
> +	     log_areas && (s < ah->area_count + ah->log_count);

log_areas should be set based on log_count, right? Can't we just remove
the log_areas check?

> +	     s++, i++) {
> +		aa[s].pv = log_areas[i]->map->pv;
> +		aa[s].pe = log_areas[i]->start;
>  		aa[s].len = log_len;
>  		dm_list_add(&ah->log_areas, &aa[s].list);
> -		consume_pv_area(log_area, log_len);
> +		consume_pv_area(log_areas[i], log_len);
>  	}
>  
>  	*ix += area_len * ah->area_multiple;

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux