[Ocfs2-tools-devel] [PATCH v2] libo2cb: stop heartbeat on error
Joseph Qi
jiangqi903 at gmail.com
Tue Mar 6 18:34:33 PST 2018
Applied, thanks.
On 18/3/7 09:17, Joseph Qi wrote:
>
>
> On 18/3/6 23:20, 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>
>> Reviewed-by: Eric Ren <zren at suse.com>
>
> Acked-by: Joseph Qi <jiangqi903 at gmail.com>
>> ---
>> libo2cb/o2cb_abi.c | 4 +++-
>> 1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/libo2cb/o2cb_abi.c b/libo2cb/o2cb_abi.c
>> index 6609aa4..65ca793 100644
>> --- a/libo2cb/o2cb_abi.c
>> +++ b/libo2cb/o2cb_abi.c
>> @@ -1258,7 +1258,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? */
>> + 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