rc = seq_client_alloc_super(cli, ctx);
if (rc) {
up(&seq->lss_sem);
- CERROR("can't allocate super-sequence, "
+ CERROR("Can't allocate super-sequence, "
"rc %d\n", rc);
RETURN(rc);
}
/* save init seq to backing store. */
rc = seq_store_write(seq, ctx);
if (rc) {
- CERROR("can't write sequence state, "
+ CERROR("Can't write sequence state, "
"rc = %d\n", rc);
}
}
*out = *in;
} else {
if (range_space(space) < seq->lss_super_width) {
- CWARN("sequences space is going to exhaust soon. "
+ CWARN("Sequences space is going to exhaust soon. "
"Can allocate only "LPU64" sequences\n",
range_space(space));
*out = *space;
space->lr_start = space->lr_end;
} else if (range_is_exhausted(space)) {
- CERROR("sequences space is exhausted\n");
+ CERROR("Sequences space is exhausted\n");
RETURN(-ENOSPC);
} else {
range_alloc(out, space, seq->lss_super_width);
rc = seq_store_write(seq, ctx);
if (rc) {
- CERROR("can't save state, rc = %d\n",
+ CERROR("Can't save state, rc = %d\n",
rc);
RETURN(rc);
}
*/
if (range_is_exhausted(super)) {
if (!seq->lss_cli) {
- CERROR("no seq-controller client is setup\n");
+ CERROR("No seq-controller client is setup\n");
RETURN(-EOPNOTSUPP);
}
rc = seq_client_alloc_super(seq->lss_cli, ctx);
if (rc) {
- CERROR("can't allocate new super-sequence, "
+ CERROR("Can't allocate new super-sequence, "
"rc %d\n", rc);
RETURN(rc);
}
rc = seq_store_write(seq, ctx);
if (rc) {
- CERROR("can't save state, rc = %d\n",
+ CERROR("Can't save state, rc = %d\n",
rc);
}
switch (opc) {
case SEQ_ALLOC_META:
if (!site->ls_server_seq) {
- CERROR("sequence-server is not "
+ CERROR("Sequence-server is not "
"initialized\n");
RETURN(-EINVAL);
}
break;
case SEQ_ALLOC_SUPER:
if (!site->ls_control_seq) {
- CERROR("sequence-controller is not "
+ CERROR("Sequence-controller is not "
"initialized\n");
RETURN(-EINVAL);
}
rc = lprocfs_add_vars(seq->lss_proc_dir,
seq_server_proc_list, seq);
if (rc) {
- CERROR("can't init sequence manager "
+ CERROR("Can't init sequence manager "
"proc, rc %d\n", rc);
GOTO(out_cleanup, rc);
}
*range = *out;
if (!range_is_sane(range)) {
- CERROR("invalid seq range obtained from server: "
+ CERROR("Invalid seq range obtained from server: "
DRANGE"\n", PRANGE(range));
GOTO(out_req, rc = -EINVAL);
}
if (range_is_exhausted(range)) {
- CERROR("seq range obtained from server is exhausted: "
+ CERROR("Seq range obtained from server is exhausted: "
DRANGE"]\n", PRANGE(range));
GOTO(out_req, rc = -EINVAL);
}
if (range_space(&seq->lcs_range) == 0) {
rc = __seq_client_alloc_meta(seq, NULL);
if (rc) {
- CERROR("can't allocate new meta-sequence, "
+ CERROR("Can't allocate new meta-sequence, "
"rc %d\n", rc);
RETURN(rc);
}
* or sequence is exhausted and should be switched. */
rc = __seq_client_alloc_seq(seq, &seqnr);
if (rc) {
- CERROR("can't allocate new sequence, "
+ CERROR("Can't allocate new sequence, "
"rc %d\n", rc);
GOTO(out, rc);
}
rc = lprocfs_add_vars(seq->lcs_proc_dir,
seq_client_proc_list, seq);
if (rc) {
- CERROR("can't init sequence manager "
+ CERROR("Can't init sequence manager "
"proc, rc %d\n", rc);
GOTO(out_cleanup, rc);
}
range_le_to_cpu(&seq->lss_space, &info->sti_record.ssr_space);
range_le_to_cpu(&seq->lss_super, &info->sti_record.ssr_super);
- CDEBUG(D_INFO|D_WARNING, "read %s ranges: space - "DRANGE", super "
+ CDEBUG(D_INFO|D_WARNING, "Read %s ranges: space - "DRANGE", super "
"- "DRANGE"\n", (seq->lss_type == LUSTRE_SEQ_SERVER ?
"server" : "controller"),
PRANGE(&seq->lss_space), PRANGE(&seq->lss_super));
} else if (rc == 0) {
rc = -ENODATA;
} else if (rc >= 0) {
- CERROR("read only %d bytes of %d\n", rc, sizeof(info->sti_record));
+ CERROR("Read only %d bytes of %d\n", rc,
+ sizeof(info->sti_record));
rc = -EIO;
}
seq->lss_obj = dt_obj;
rc = 0;
} else {
- CERROR("cannot find \"seq\" obj %d\n",
+ CERROR("Can't find \"seq\" obj %d\n",
(int)PTR_ERR(dt_obj));
rc = PTR_ERR(dt_obj);
}
/* did not match 2 values */
if (rc != 2 || !range_is_sane(&tmp) || range_is_zero(&tmp)) {
- CERROR("can't parse input string or input is not correct\n");
+ CERROR("Can't parse input string or input is not correct\n");
RETURN(-EINVAL);
}
rc = seq_proc_write_common(file, buffer, count,
data, &seq->lss_space);
if (rc == 0) {
- CDEBUG(D_WARNING, "SEQ-MGR(srv): sequences space has "
- "changed to "DRANGE"\n", PRANGE(&seq->lss_space));
+ CDEBUG(D_WARNING, "%s: sequences space has "
+ "changed to "DRANGE"\n", seq->lss_name,
+ PRANGE(&seq->lss_space));
}
up(&seq->lss_sem);
data, &seq->lss_super);
if (rc == 0) {
- CDEBUG(D_WARNING, "SEQ-MGR(srv): super-sequence has "
- "changed to "DRANGE"\n", PRANGE(&seq->lss_super));
+ CDEBUG(D_WARNING, "%s: super-sequence has "
+ "changed to "DRANGE"\n", seq->lss_name,
+ PRANGE(&seq->lss_super));
}
up(&seq->lss_sem);
seq->lss_super_width = val;
if (rc == 0) {
- CDEBUG(D_WARNING, "SEQ-MGR(srv): super-sequence width "
- "has changed to "LPU64"\n", seq->lss_super_width);
+ CDEBUG(D_WARNING, "%s: super-sequence width "
+ "has changed to "LPU64"\n", seq->lss_name,
+ seq->lss_super_width);
}
up(&seq->lss_sem);
seq->lss_meta_width = val;
if (rc == 0) {
- CDEBUG(D_WARNING, "SEQ-MGR(srv): meta-sequence width "
- "has changed to "LPU64"\n", seq->lss_meta_width);
+ CDEBUG(D_WARNING, "%s: meta-sequence width "
+ "has changed to "LPU64"\n", seq->lss_name,
+ seq->lss_meta_width);
}
}
data, &seq->lcs_range);
if (rc == 0) {
- CDEBUG(D_WARNING, "SEQ-MGR(cli): range has changed to "
- DRANGE"\n", PRANGE(&seq->lcs_range));
+ CDEBUG(D_WARNING, "%s: range has changed to "
+ DRANGE"\n", seq->lcs_name,
+ PRANGE(&seq->lcs_range));
}
up(&seq->lcs_sem);
seq->lcs_width = val;
if (rc == 0) {
- CDEBUG(D_WARNING, "SEQ-MGR(cli): sequence width "
- "has changed to "LPU64"\n", seq->lcs_width);
+ CDEBUG(D_WARNING, "%s: sequence width "
+ "has changed to "LPU64"\n", seq->lcs_name,
+ seq->lcs_width);
}
}
if (rc == 0)
LASSERT(dt_obj->do_index_ops != NULL);
else
- CERROR("\"%s\" is not an index!\n",
+ CERROR("File \"%s\" is not an index!\n",
fld_index_name);
} else {
- CERROR("cannot find \"%s\" obj %d\n",
+ CERROR("Can't find \"%s\" obj %d\n",
fld_index_name, (int)PTR_ERR(dt_obj));
rc = PTR_ERR(dt_obj);
}
rc = lprocfs_add_vars(fld->lcf_proc_dir,
fld_client_proc_list, fld);
if (rc) {
- CERROR("can't init FLD "
- "proc, rc %d\n", rc);
+ CERROR("Can't init FLD proc, rc %d\n", rc);
GOTO(out_cleanup, rc);
}
* cache errors. --umka
*/
fld_cache_insert(fld->lcf_cache, seq, mds);
+ } else {
+ CERROR("Can't create FLD entry, rc %d\n", rc);
}
RETURN(rc);
}
* correct actions like it is done in target_send_reply_msg().
*/
if (h->mh_fail_id != 0) {
+ /*
+ * Set to info->mti_fail_id to handler fail_id, it will be used
+ * later, and better than use default fail_id.
+ */
info->mti_fail_id = h->mh_fail_id;
if (OBD_FAIL_CHECK(h->mh_fail_id))
RETURN(0);
*/
rc = h->mh_act(info);
/*
- * XXX result value is unconditionally shoved into ->rq_status
- * (original code sometimes placed error code into ->rq_status, and
- * sometimes returned it to the
- * caller). ptlrpc_server_handle_request() doesn't check return value
- * anyway.
+ * XXX result value is unconditionally shoved into ->rq_status (original
+ * code sometimes placed error code into ->rq_status, and sometimes
+ * returned it to the caller). ptlrpc_server_handle_request() doesn't
+ * check return value anyway.
*/
req->rq_status = rc;
rc = 0;