-static struct mdt_it_flavor {
- const struct req_format *it_fmt;
- int (*it_act)(enum mdt_it_code,
- struct mdt_thread_info *,
- struct ldlm_lock **,
- __u64);
- enum tgt_handler_flags it_handler_flags;
-} mdt_it_flavor[] = {
- [MDT_IT_OPEN] = {
- /*
- * OCREAT is not a MUTABOR request as if the file
- * already exists.
- * We do the extra check of OBD_CONNECT_RDONLY in
- * mdt_reint_open() when we really need to create
- * the object.
- */
- .it_fmt = &RQF_LDLM_INTENT,
- .it_act = mdt_intent_open,
- },
- [MDT_IT_GETATTR] = {
- .it_fmt = &RQF_LDLM_INTENT_GETATTR,
- .it_act = mdt_intent_getattr,
- .it_handler_flags = HABEO_REFERO,
- },
- [MDT_IT_LOOKUP] = {
- .it_fmt = &RQF_LDLM_INTENT_GETATTR,
- .it_act = mdt_intent_getattr,
- .it_handler_flags = HABEO_REFERO,
- },
- [MDT_IT_GETXATTR] = {
- .it_fmt = &RQF_LDLM_INTENT_GETXATTR,
- .it_act = mdt_intent_getxattr,
- .it_handler_flags = HABEO_CORPUS,
- },
- [MDT_IT_LAYOUT] = {
- .it_fmt = &RQF_LDLM_INTENT_LAYOUT,
- .it_act = mdt_intent_layout,
- },
- [MDT_IT_GLIMPSE] = {
- .it_fmt = &RQF_LDLM_INTENT,
- .it_act = mdt_intent_glimpse,
- },
- [MDT_IT_BRW] = {
- .it_fmt = &RQF_LDLM_INTENT,
- .it_act = mdt_intent_brw,
- },
-};
-
-static int mdt_intent_opc(enum ldlm_intent_flags it_code,