/* directory got splitted. time to update local object and
* repeat the request with proper MDS */
LASSERT(lu_fid_eq(pid, &rpid));
- rc = lmv_get_mea_and_update_object(exp, &rpid);
+ rc = lmv_handle_split(exp, &rpid);
if (rc == 0) {
ptlrpc_req_finished(*reqp);
goto repeat;
cid = &body->fid1;
obj = lmv_obj_grab(obd, cid);
- if (!obj && (mea = lmv_splitted_dir_body(*reqp, 1))) {
+ if (!obj && (mea = lmv_get_mea(*reqp, 1))) {
/* wow! this is splitted dir, we'd like to handle it */
obj = lmv_obj_create(exp, &body->fid1, mea);
if (IS_ERR(obj))
cid = &body->fid1;
obj2 = lmv_obj_grab(obd, cid);
- if (!obj2 && (mea = lmv_splitted_dir_body(*reqp, 1))) {
+ if (!obj2 && (mea = lmv_get_mea(*reqp, 1))) {
/* wow! this is splitted dir, we'd like to handle it. */
body = lustre_msg_buf((*reqp)->rq_repmsg, 1, sizeof(*body));
LASSERT(body != NULL);
rc = lmv_intent_remote(exp, lmm, lmmsize, it, flags, reqp,
cb_blocking, extra_lock_flags);
- if (rc == 0 && (mea = lmv_splitted_dir_body(*reqp, 1))) {
+ if (rc == 0 && (mea = lmv_get_mea(*reqp, 1))) {
/* wow! this is splitted dir, we'd like to handle it */
body = lustre_msg_buf((*reqp)->rq_repmsg, 1, sizeof(*body));
LASSERT(body != NULL);
ldlm_blocking_callback cb_blocking,
int extra_lock_flags);
-int lmv_get_mea_and_update_object(struct obd_export *, struct lu_fid *);
+int lmv_handle_split(struct obd_export *, struct lu_fid *);
int lmv_dirobj_blocking_ast(struct ldlm_lock *, struct ldlm_lock_desc *,
void *, int);
int lmv_fld_lookup(struct obd_device *obd, struct lu_fid *fid);
static inline struct lmv_stripe_md *
-lmv_splitted_dir_body(struct ptlrpc_request *req, int offset)
+lmv_get_mea(struct ptlrpc_request *req, int offset)
{
struct mdt_body *body;
struct lmv_stripe_md *mea;
RETURN(rc);
}
-int lmv_get_mea_and_update_object(struct obd_export *exp,
- struct lu_fid *fid)
+/* called in the case MDS returns -ERESTART on create on open, what means that
+ * directory is splitted and its LMV presentation object has to be updated. */
+int lmv_handle_split(struct obd_export *exp, struct lu_fid *fid)
{
struct obd_device *obd = exp->exp_obd;
struct lmv_obd *lmv = &obd->u.lmv;
CDEBUG(D_OTHER, "created. "DFID3"\n", PFID3(&op_data->fid1));
} else if (rc == -ERESTART) {
- /*
- * directory got splitted. time to update local object and
- * repeat the request with proper MDS.
- */
- rc = lmv_get_mea_and_update_object(exp, &op_data->fid1);
+ /* directory got splitted. time to update local object and
+ * repeat the request with proper MDS. */
+ rc = lmv_handle_split(exp, &op_data->fid1);
if (rc == 0) {
ptlrpc_req_finished(*request);
goto repeat;
} else if (rc == -ERESTART) {
/* directory got splitted. time to update local object and
* repeat the request with proper MDS */
- rc = lmv_get_mea_and_update_object(exp, &rid);
+ rc = lmv_handle_split(exp, &rid);
if (rc == 0) {
ptlrpc_req_finished(*request);
goto repeat;