[lvm-devel] Re: [PATCH 3 of 10] LVM: build log_area list
Jonathan Brassow
jbrassow at redhat.com
Tue Oct 13 21:36:38 UTC 2009
On Oct 12, 2009, at 8:55 PM, malahal at us.ibm.com wrote:
> Jonathan Brassow [jbrassow at redhat.com] 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 at redhat.com>
>> @@ -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?
I think you are right that we could... There is only one location
where this function is called, and I do not think it will ever make
the call with 'log_areas = NULL' and 'ah->log_count > 0'. I've
changed my local patch to reflect this.
brassow
More information about the lvm-devel
mailing list