[Ocfs2-tools-devel] [PATCH] libo2cb: stop heartbeat on error
Joseph Qi
jiangqi903 at gmail.com
Mon Mar 5 19:42:40 PST 2018
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?
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