else
bufcount = 2;
+ /* if we do recovery we isn't send reply mds state is restored */
+ if (lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) {
+ size[DLM_REPLY_REC_OFF] = 0;
+ if (opc == REINT_UNLINK || opc == REINT_RENAME)
+ size[DLM_REPLY_REC_OFF + 1] = 0;
+ }
+
rc = lustre_pack_reply(req, bufcount, size, NULL);
if (rc)
break;
case S_IFREG: {
struct lov_mds_md *lmm = lustre_msg_buf(req->rq_repmsg,
offset + 1, 0);
+ int sz = lustre_msg_buflen(req->rq_repmsg, offset + 1) > 0 ?
+ le32_to_cpu(lmm->lmm_stripe_count) : 0;
+
handle = fsfilt_start_log(obd, dparent->d_inode,
- FSFILT_OP_UNLINK, NULL,
- le32_to_cpu(lmm->lmm_stripe_count));
+ FSFILT_OP_UNLINK, NULL, sz);
if (IS_ERR(handle))
GOTO(cleanup, rc = PTR_ERR(handle));
LOCK_INODE_MUTEX(dparent->d_inode);
struct lustre_handle dlm_handles[4];
struct mds_body *body = NULL;
struct lov_mds_md *lmm = NULL;
- int rc = 0, lock_count = 3, cleanup_phase = 0;
+ int rc = 0, lock_count = 3, cleanup_phase = 0, sz;
void *handle = NULL;
unsigned int qcids[MAXQUOTAS] = { 0, 0 };
unsigned int qpids[4] = { 0, 0, 0, 0 };
GOTO(cleanup, rc = -EINVAL);
lmm = lustre_msg_buf(req->rq_repmsg, offset + 1, 0);
- handle = fsfilt_start_log(obd, de_tgtdir->d_inode, FSFILT_OP_RENAME,
- NULL, le32_to_cpu(lmm->lmm_stripe_count));
+ /* check that lmm size is not 0 */
+ sz = lustre_msg_buflen(req->rq_repmsg, offset + 1) > 0 ?
+ le32_to_cpu(lmm->lmm_stripe_count) : 0;
+ handle = fsfilt_start_log(obd, de_tgtdir->d_inode, FSFILT_OP_RENAME,
+ NULL, sz);
if (IS_ERR(handle))
GOTO(cleanup, rc = PTR_ERR(handle));