[OracleOSS] [TitleIndex] [WordIndex]

DLM structure difference between OCFS2-1.2.x and Mainline

OCFS2-1.2.x vs Mainline for DLM Messages

OCFS2-1.2.x
-----------
enum dlm_query_join_response {
        JOIN_DISALLOW = 0,
        JOIN_OK,
        JOIN_OK_NO_MAP,
};

Mainline
--------
enum dlm_query_join_response_code {
        JOIN_DISALLOW = 0,
        JOIN_OK,
        JOIN_OK_NO_MAP,
        JOIN_PROTOCOL_MISMATCH,
};

struct dlm_query_join_packet {
        u8 code;        /* Response code.  dlm_minor and fs_minor
                           are only valid if this is JOIN_OK */
        u8 dlm_minor;   /* The minor version of the protocol the
                           dlm is speaking. */
        u8 fs_minor;    /* The minor version of the protocol the
                           filesystem is speaking. */
        u8 reserved;
};

union dlm_query_join_response {
        u32 intval;
        struct dlm_query_join_packet packet;
};

OCFS2-1.2.0
-----------
struct dlm_query_join_request
{
        u8 node_idx;
        u8 pad1[2];
        u8 name_len;
        u8 domain[O2NM_MAX_NAME_LEN];
};

OCFS2-1.2.9
-----------
{{{
#define BITS_PER_BYTE 8
#define BITS_TO_BYTES(bits) \
        (((bits)+BITS_PER_BYTE-1)/BITS_PER_BYTE)

struct dlm_query_join_request
{
        u8 node_idx;
        u8 pad1[2];
        u8 name_len;
        u8 domain[O2NM_MAX_NAME_LEN];
        u8 node_map[BITS_TO_BYTES(O2NM_MAX_NODES)];
};

Mainline
--------
struct dlm_protocol_version {
        u8 pv_major;
        u8 pv_minor;
};

#define BITS_PER_BYTE 8
#define BITS_TO_BYTES(bits) (((bits)+BITS_PER_BYTE-1)/BITS_PER_BYTE)
struct dlm_query_join_request
{
        u8 node_idx;
        u8 pad1[2];
        u8 name_len;
        struct dlm_protocol_version dlm_proto;
        struct dlm_protocol_version fs_proto;
        u8 domain[O2NM_MAX_NAME_LEN];
        u8 node_map[BITS_TO_BYTES(O2NM_MAX_NODES)];
};

OCFS2-1.2.0
-----------
struct dlm_finalize_reco
{
        u8 node_idx;
        u8 dead_node;
        __be16 pad1;
        __be32 pad2;
};

OCFS2-1.2.9
-----------
struct dlm_finalize_reco
{
        u8 node_idx;
        u8 dead_node;
        u8 flags;
        u8 pad1;
        __be32 pad2;
};

Mainline
--------
struct dlm_finalize_reco
{
        u8 node_idx;
        u8 dead_node;
        u8 flags;
        u8 pad1;
        __be32 pad2;
};

struct dlm_deref_lockres
{
        u32 pad1;
        u16 pad2;
        u8 node_idx;
        u8 namelen;

        u8 name[O2NM_MAX_NAME_LEN];
};

2012-11-08 13:01