[dm-devel] [PATCH dmraid 1/1] Ensure metadata dump of pdc metadata has the correct offset.

Heinz Mauelshagen heinzm at redhat.com
Mon Dec 14 14:35:00 UTC 2009


Applied to the sources repository.

Thanks,
Heinz

On Fri, 2009-12-11 at 14:27 +1100, NeilBrown wrote:
> plain text document attachment (pdc-metadata-dump-fix)
> a read_metadata function needds to set *offset so that file_metadata
> can create the correct xxx/dev-offset file.
> pdf_read_metadata does not set *offset.
> 
> This patch add the appropriate setting.
> 
> Signed-off-by: NeilBrown <neilb at suse.de>
> ---
>  1.0.0.rc16/lib/format/ataraid/pdc.c |    5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> --- dmraid.orig/1.0.0.rc16/lib/format/ataraid/pdc.c
> +++ dmraid/1.0.0.rc16/lib/format/ataraid/pdc.c
> @@ -202,8 +202,11 @@ pdc_read_metadata(struct lib_context *lc
>  							break;
>  
>  					/* Memorize main metadata sector. */
> -					} else if (!info->u32)
> +					} else if (!info->u32) {
>  						info->u32 = *s;
> +						*offset = sub ? di->sectors - *s : *s;
> +					}
> +
>  				}
>  			}
>  		}
> 
> --
> dm-devel mailing list
> dm-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel




More information about the dm-devel mailing list