is this patch still needed?
I've been running with the following patch, which doesn't seem to have made it into 0.9.1-beta[12]. Is it still needed? With 0.9, it fixed what seemed to be a fairly serious problem.
Index: pv_read_all_pv_of_vg.c
===================================================================
RCS file: /data/cvs/LVM/tools/lib/pv_read_all_pv_of_vg.c,v retrieving revision 1.3.2.3
pv_read_all_pv_of_vg.c +4 -4
@@ -101,17 +101,17 @@for ( p =0 ; pv_tmp[p] !=NULL ; p++) {if (strncmp ( pv_tmp[p]->vg_name, vg_name,NAME_LEN ) ==0 ) { pv_this_sav = pv_this; +if ( np < pv_tmp[p]->pv_number) np = pv_tmp[p]->pv_number;if ( ( pv_this =realloc ( pv_this, - ( np +2 ) *sizeof (pv_t *))) ==NULL ) { + ( np +1 ) *sizeof (pv_t *))) ==NULL ) {fprintf ( stderr,"realloc error in %s [line %d]\n" , __FILE__, __LINE__); ret = -LVM_EPV_READ_ALL_PV_OF_VG_MALLOC ;if ( pv_this_sav !=NULL )free ( pv_this_sav); goto pv_read_all_pv_of_vg_end; } - pv_this[np] = pv_tmp[p]; - pv_this[np+1 ] =NULL ; - np++; + pv_this[pv_tmp[p]->pv_number-1 ] = pv_tmp[p]; + pv_this[np] =NULL ; } }
Signature · 2 lines
David M. Meyer [email protected]
Hi,
Quoted 5 lines
I've been running with the following patch, which doesn't seem to have made it into 0.9.1-beta[12]. Is it still needed? With 0.9, it fixed what seemed to be a fairly serious problem.
[patch deleted]
The patch isn't needed for 0.9.1-beta2. Beta2 includes a "cleaner" fix from Heinz for this problem (see line ~190ff of pv_read_all_pv_of_vg.c beginning with comment /* Correct PV sort order */)
Holger
--
Holger Grothe (Email: [email protected]) Fachbereich Mathematik, TU Darmstadt