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

Re: [lvm-devel] [PATCH 12/14] Port process_each_pv to new vg_read.



On Thu, 2009-01-22 at 11:10 +0100, Petr Rockai wrote:
>  
>  int process_each_pv(struct cmd_context *cmd, int argc, char **argv,
> -		    struct volume_group *vg, uint32_t lock_type, void *handle,
> +		    struct volume_group *vg, uint32_t flags, void *handle,
>  		    int (*process_single) (struct cmd_context * cmd,
>  					   struct volume_group * vg,
>  					   struct physical_volume * pv,
> @@ -673,25 +673,11 @@ int process_each_pv(struct cmd_context *
>  		if (!dm_list_empty(&tags) && (vgnames = get_vgs(cmd, 0)) &&
>  			   !dm_list_empty(vgnames)) {
>  			dm_list_iterate_items(sll, vgnames) {
> -				if (!lock_vol(cmd, sll->str, lock_type)) {
> -					log_error("Can't lock %s: skipping", sll->str);
> -					continue;
> -				}
> -				if (!(vg = vg_read_internal(cmd, sll->str, NULL, &consistent))) {
> -					log_error("Volume group \"%s\" not found", sll->str);
> -					unlock_vg(cmd, sll->str);
> +				vg = vg_read(cmd, sll->str, NULL, flags);
> +				if (vg_read_error(vg)) {
>  					ret_max = ECMD_FAILED;
>  					continue;
>  				}
> -				if (!consistent) {
> -					unlock_vg(cmd, sll->str);
> -					continue;
> -				}
> -
> -				if (!vg_check_status(vg, CLUSTERED)) {
> -					unlock_vg(cmd, sll->str);
> -					continue;
> -				}
>  
>  				ret = process_each_pv_in_vg(cmd, vg, &tags,
>  							    handle,

'consistent' declaration can be removed (saw it when I compiled).

Not critical to the patch though here's an updated patch with this one
line removed.

Attachment: 0001-Port-process_each_pv-to-new-vg_read.patch
Description: application/mbox


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