* with the request RPC to avoid extra RPC round trips
*/
count = mdc_resource_get_unused(exp, &op_data->op_fid1, &cancels,
- LCK_CR, MDS_INODELOCK_LAYOUT);
+ LCK_EX, MDS_INODELOCK_LAYOUT |
+ MDS_INODELOCK_XATTR);
count += mdc_resource_get_unused(exp, &op_data->op_fid2, &cancels,
- LCK_CR, MDS_INODELOCK_LAYOUT);
+ LCK_EX, MDS_INODELOCK_LAYOUT |
+ MDS_INODELOCK_XATTR);
req = ptlrpc_request_alloc(class_exp2cliimp(exp),
&RQF_MDS_SWAP_LAYOUTS);
RETURN(-EOPNOTSUPP);
info = tsi2mdt_info(tsi);
+
+ if (info->mti_dlm_req != NULL)
+ ldlm_request_cancel(req, info->mti_dlm_req, 0);
+
if (req_capsule_get_size(info->mti_pill, &RMF_CAPA1, RCL_CLIENT))
mdt_set_capainfo(info, 0, &info->mti_body->fid1,
req_capsule_client_get(info->mti_pill,
TGT_MDT_HDL(HABEO_CORPUS| HABEO_REFERO, MDS_HSM_ACTION, mdt_hsm_action),
TGT_MDT_HDL(HABEO_CORPUS| HABEO_REFERO, MDS_HSM_REQUEST,
mdt_hsm_request),
-TGT_MDT_HDL(HABEO_CORPUS|HABEO_REFERO | MUTABOR, MDS_SWAP_LAYOUTS,
- mdt_swap_layouts)
+TGT_MDT_HDL(HABEO_CLAVIS | HABEO_CORPUS | HABEO_REFERO | MUTABOR,
+ MDS_SWAP_LAYOUTS,
+ mdt_swap_layouts),
};
static struct tgt_handler mdt_sec_ctx_ops[] = {