[Ocfs2-tools-devel] [PATCH] libo2cb: stop heartbeat on error

piaojun piaojun at huawei.com
Mon Mar 5 19:49:59 PST 2018


Hi Joseph,

On 2018/3/6 11:42, Joseph Qi wrote:
> 
> 
> On 18/3/5 20:49, piaojun wrote:
>> We should clean up heartbeat region if error happens in __o2cb_get_ref(),
>> as heartbeat region will be left over after mount failed.
>>
>> Signed-off-by: Jun Piao <piaojun at huawei.com>
>> ---
>>  libo2cb/o2cb_abi.c | 3 +++
>>  1 file changed, 3 insertions(+)
>>
>> diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
>> index 6609aa4..69148dc 100644
>> --- a/libo2cb/o2cb_abi.c
>> +++ b/libo2cb/o2cb_abi.c
>> @@ -1259,6 +1259,9 @@ errcode_t o2cb_start_heartbeat(struct o2cb_cluster_desc *cluster,
>>
>>  	ret = __o2cb_get_ref(semid, !region->r_persist);
>>  	/* XXX: Maybe stop heartbeat on error here? */
> So this comments should be deleted as well?
Agree, and I will send patch v2 to delete it.

thanks,
Jun
> 
> Thanks,
> Joseph
>> +	if (ret)
>> +		o2cb_remove_heartbeat_region(cluster->c_cluster,
>> +					   region->r_name);
>>  up:
>>  	up_ret = o2cb_mutex_up(semid);
>>  	if (up_ret && !ret)
>>
> 



More information about the Ocfs2-tools-devel mailing list