[Drbd-dev] [PATCH] drbd-utils: Fix the default node id initialization when upgrade v8 to v9

Roland Kammerer roland.kammerer at linbit.com
Fri Jan 13 10:00:56 CET 2017


On Fri, Jan 13, 2017 at 02:15:58PM +0800, Nick Wang wrote:
> Signed-off-by: Nick Wang <nwang at suse.com>
> CC: Lars Ellenberg <lars.ellenberg at linbit.com>
> CC: Roland Kammerer <roland.kammerer at linbit.com>
> CC: drbd-dev at lists.linbit.com 
> 
> ---
>  user/shared/drbdmeta.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/user/shared/drbdmeta.c b/user/shared/drbdmeta.c
> index 9a28984..e2a9606 100644
> --- a/user/shared/drbdmeta.c
> +++ b/user/shared/drbdmeta.c
> @@ -3868,6 +3868,7 @@ void md_convert_08_to_09(struct format *cfg)
>  
>  	cfg->md.flags &= ~(MDF_CONNECTED_IND | MDF_FULL_SYNC | MDF_PEER_OUT_DATED);
>  
> +	cfg->md.node_id = -1;
>  	cfg->md.magic = DRBD_MD_MAGIC_09;
>  	re_initialize_md_offsets(cfg);
>  
> -- 
> 1.8.5.6

Looks good to me, we do the same if we initialize v9 meta data, but so
far we did not do it when we converted.

Thanks, rck


More information about the drbd-dev mailing list