wiretest.c

来自「lustre 1.6.5 source code」· C语言 代码 · 共 969 行 · 第 1/5 页

C
969
字号
                 (long long)LCK_PW);        LASSERTF(LCK_PR == 4, " found %lld\n",                 (long long)LCK_PR);        LASSERTF(LCK_CW == 8, " found %lld\n",                 (long long)LCK_CW);        LASSERTF(LCK_CR == 16, " found %lld\n",                 (long long)LCK_CR);        LASSERTF(LCK_NL == 32, " found %lld\n",                 (long long)LCK_NL);        LASSERTF(LCK_GROUP == 64, " found %lld\n",                 (long long)LCK_GROUP);        LASSERTF(LCK_MAXMODE == 65, " found %lld\n",                 (long long)LCK_MAXMODE);        LASSERTF(LCK_MODE_NUM == 7, " found %lld\n",                 (long long)LCK_MODE_NUM);        CLASSERT(LDLM_PLAIN == 10);        CLASSERT(LDLM_EXTENT == 11);        CLASSERT(LDLM_FLOCK == 12);        CLASSERT(LDLM_IBITS == 13);        LASSERTF(OBD_PING == 400, " found %lld\n",                 (long long)OBD_PING);        LASSERTF(OBD_LOG_CANCEL == 401, " found %lld\n",                 (long long)OBD_LOG_CANCEL);        LASSERTF(OBD_QC_CALLBACK == 402, " found %lld\n",                 (long long)OBD_QC_CALLBACK);        LASSERTF(OBD_LAST_OPC == 403, " found %lld\n",                 (long long)OBD_LAST_OPC);        LASSERTF(QUOTA_DQACQ == 601, " found %lld\n",                 (long long)QUOTA_DQACQ);        LASSERTF(QUOTA_DQREL == 602, " found %lld\n",                 (long long)QUOTA_DQREL);        LASSERTF(MGS_CONNECT == 250, " found %lld\n",                 (long long)MGS_CONNECT);        LASSERTF(MGS_DISCONNECT == 251, " found %lld\n",                 (long long)MGS_DISCONNECT);        LASSERTF(MGS_EXCEPTION == 252, " found %lld\n",                 (long long)MGS_EXCEPTION);        LASSERTF(MGS_TARGET_REG == 253, " found %lld\n",                 (long long)MGS_TARGET_REG);        LASSERTF(MGS_TARGET_DEL == 254, " found %lld\n",                 (long long)MGS_TARGET_DEL);        LASSERTF(MGS_SET_INFO == 255, " found %lld\n",                 (long long)MGS_SET_INFO);        /* Sizes and Offsets */        /* Checks for struct obd_uuid */        LASSERTF((int)sizeof(struct obd_uuid) == 40, " found %lld\n",                 (long long)(int)sizeof(struct obd_uuid));        /* Checks for struct lustre_handle */        LASSERTF((int)sizeof(struct lustre_handle) == 8, " found %lld\n",                 (long long)(int)sizeof(struct lustre_handle));        LASSERTF((int)offsetof(struct lustre_handle, cookie) == 0, " found %lld\n",                 (long long)(int)offsetof(struct lustre_handle, cookie));        LASSERTF((int)sizeof(((struct lustre_handle *)0)->cookie) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_handle *)0)->cookie));        /* Checks for struct lustre_msg_v1 */        LASSERTF((int)sizeof(struct lustre_msg_v1) == 64, " found %lld\n",                 (long long)(int)sizeof(struct lustre_msg_v1));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_handle) == 0, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_handle));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_handle));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_magic) == 8, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_magic));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_magic));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_type) == 12, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_type));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_type) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_type));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_version) == 16, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_version));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_version) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_version));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_opc) == 20, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_opc));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_opc));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_xid) == 24, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_last_xid));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_xid));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_last_committed) == 32, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_last_committed));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_last_committed));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_transno) == 40, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_transno));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_transno));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_status) == 48, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_status));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_status) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_status));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_flags) == 52, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_flags));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_flags));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_conn_cnt) == 56, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_conn_cnt));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_conn_cnt));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_bufcount) == 60, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_bufcount));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_bufcount));        LASSERTF((int)offsetof(struct lustre_msg_v1, lm_buflens[0]) == 64, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v1, lm_buflens[0]));        LASSERTF((int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v1 *)0)->lm_buflens[0]));        /* Checks for struct lustre_msg_v2 */        LASSERTF((int)sizeof(struct lustre_msg_v2) == 32, " found %lld\n",                 (long long)(int)sizeof(struct lustre_msg_v2));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_bufcount) == 0, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_bufcount));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_bufcount));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_secflvr) == 4, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_secflvr));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_secflvr));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_magic) == 8, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_magic));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_magic));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_repsize) == 12, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_repsize));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_repsize));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_cksum) == 16, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_cksum));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_cksum));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_flags) == 20, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_flags));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_flags));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_2) == 24, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_2));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_2));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_padding_3) == 28, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_padding_3));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_padding_3));        LASSERTF((int)offsetof(struct lustre_msg_v2, lm_buflens[0]) == 32, " found %lld\n",                 (long long)(int)offsetof(struct lustre_msg_v2, lm_buflens[0]));        LASSERTF((int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct lustre_msg_v2 *)0)->lm_buflens[0]));        LASSERT(offsetof(struct lustre_msg_v1, lm_magic) == offsetof(struct lustre_msg_v2, lm_magic));        /* Checks for struct ptlrpc_body */        LASSERTF((int)sizeof(struct ptlrpc_body) == 88, " found %lld\n",                 (long long)(int)sizeof(struct ptlrpc_body));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_handle) == 0, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_handle));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_handle) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_handle));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_type) == 8, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_type));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_type) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_type));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_version) == 12, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_version));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_version) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_version));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_opc) == 16, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_opc));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_opc) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_opc));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_status) == 20, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_status));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_status) == 4, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_status));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_xid) == 24, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_xid));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_xid) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_xid));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_seen) == 32, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_seen));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_seen) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_seen));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_last_committed) == 40, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_last_committed));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_last_committed) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_last_committed));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_transno) == 48, " found %lld\n",                 (long long)(int)offsetof(struct ptlrpc_body, pb_transno));        LASSERTF((int)sizeof(((struct ptlrpc_body *)0)->pb_transno) == 8, " found %lld\n",                 (long long)(int)sizeof(((struct ptlrpc_body *)0)->pb_transno));        LASSERTF((int)offsetof(struct ptlrpc_body, pb_flags) == 56, " found %lld\n",

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?