ocfs2/dlm: Remove struct dlm_lock_name in struct dlm_master_list_entry

This patch removes struct dlm_lock_name and adds the entries directly
to struct dlm_master_list_entry. Under the new scheme, both mles that
are backed by a lockres or not, will have the name populated in mle->mname.
This allows us to get rid of code that was figuring out the location of
the mle name.

Signed-off-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
This commit is contained in:
Sunil Mushran
2009-02-26 15:00:47 -08:00
committed by Mark Fasheh
vanhempi e64ff14607
commit 7141514b83
3 muutettua tiedostoa jossa 23 lisäystä ja 71 poistoa

Näytä tiedosto

@@ -287,18 +287,8 @@ static int stringify_nodemap(unsigned long *nodemap, int maxnodes,
static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len)
{
int out = 0;
unsigned int namelen;
unsigned char *name;
char *mle_type;
if (mle->type != DLM_MLE_MASTER) {
name = mle->u.mlename.name;
namelen = mle->u.mlename.len;
} else {
name = (unsigned char *)mle->u.mleres->lockname.name;
namelen = mle->u.mleres->lockname.len;
}
if (mle->type == DLM_MLE_BLOCK)
mle_type = "BLK";
else if (mle->type == DLM_MLE_MASTER)
@@ -306,7 +296,7 @@ static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len)
else
mle_type = "MIG";
out += stringify_lockname(name, namelen, buf + out, len - out);
out += stringify_lockname(mle->mname, mle->mnamelen, buf + out, len - out);
out += snprintf(buf + out, len - out,
"\t%3s\tmas=%3u\tnew=%3u\tevt=%1d\tuse=%1d\tref=%3d\n",
mle_type, mle->master, mle->new_master,