OSDN Git Service

ocfs2/cluster: Pin/unpin o2hb regions
authorSunil Mushran <sunil.mushran@oracle.com>
Tue, 14 Dec 2010 22:14:29 +0000 (14:14 -0800)
committerJoel Becker <joel.becker@oracle.com>
Thu, 16 Dec 2010 08:47:44 +0000 (00:47 -0800)
commit58a3158a5d17ddf4894db9e8ccaf92093ff8e42e
tree8d60017f95fccd425bb20c13a8b2e3bc7233d543
parentffee223a9af4c5124beb56fa5c84132949923d23
ocfs2/cluster: Pin/unpin o2hb regions

This patch adds support for pinning o2hb regions in configfs. Pinning disallows
a region to be cleanly stopped as long as it has an active dependent user
(read o2dlm).

In local heartbeat mode, the region uuid matching the domain name is pinned as
long as the o2dlm domain is active.

In global heartbeat mode, all regions are pinned as long as there is atleast
one dependent user and the region count is 3 or less. All regions are unpinned
if the number of dependent users is zero or region count is greater than 3.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
fs/ocfs2/cluster/heartbeat.c
fs/ocfs2/dlm/dlmdomain.c