if (lu_seq_range_is_zero(loset))
__seq_set_init(env, seq);
- if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_ALLOC)) /* exhaust set */
+ if (CFS_FAIL_CHECK(OBD_FAIL_SEQ_ALLOC)) /* exhaust set */
loset->lsr_start = loset->lsr_end;
if (lu_seq_range_is_exhausted(loset)) {
mutex_lock(&seq->lcs_mutex);
- if (OBD_FAIL_CHECK(OBD_FAIL_SEQ_EXHAUST))
+ if (CFS_FAIL_CHECK(OBD_FAIL_SEQ_EXHAUST))
seq->lcs_fid.f_oid = seq->lcs_width;
if (unlikely(!fid_is_zero(&seq->lcs_fid) &&
req->rq_reply_portal = MDC_REPLY_PORTAL;
ptlrpc_at_set_req_timeout(req);
- if (OBD_FAIL_CHECK(OBD_FAIL_FLD_QUERY_REQ) && req->rq_no_delay) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_FLD_QUERY_REQ) && req->rq_no_delay) {
/* the same error returned by ptlrpc_import_delay_req */
rc = -EAGAIN;
req->rq_status = rc;
static inline int llog_max_idx(struct llog_log_hdr *lh)
{
- if (OBD_FAIL_PRECHECK(OBD_FAIL_CAT_RECORDS) &&
+ if (CFS_FAIL_PRECHECK(OBD_FAIL_CAT_RECORDS) &&
unlikely(lh->llh_flags & LLOG_F_IS_CAT))
return cfs_fail_val;
else
GOTO(out, rc = 0);
}
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_FATAL2)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_FATAL2)) {
spin_lock(&lfsck->li_lock);
thread_set_flags(thread, SVC_STOPPING);
spin_unlock(&lfsck->li_lock);
RETURN(0);
}
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_CRASH))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_CRASH))
RETURN(0);
lfsck->li_current_oit_processed = 1;
/* Rate control. */
lfsck_control_speed(lfsck);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_FATAL1)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_FATAL1)) {
spin_lock(&lfsck->li_lock);
thread_set_flags(thread, SVC_STOPPING);
spin_unlock(&lfsck->li_lock);
PFID(&lfsck->li_pos_checkpoint.lp_dir_parent),
current->pid, rc);
- if (!OBD_FAIL_CHECK(OBD_FAIL_LFSCK_CRASH))
+ if (!CFS_FAIL_CHECK(OBD_FAIL_LFSCK_CRASH))
rc = lfsck_post(env, lfsck, rc);
else
lfsck_close_dir(env, lfsck, rc);
"scan start, synced: rc = %d\n",
lfsck_lfsck2name(lfsck), rc2);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NO_DOUBLESCAN))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NO_DOUBLESCAN))
GOTO(cleanup, rc = 0);
while (test_bit(LAD_IN_DOUBLE_SCAN, &lad->lad_flags)) {
"LAST_ID file for sequence %#llx\n",
lfsck_lfsck2name(lfsck), lls->lls_seq);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_DELAY4) &&
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_DELAY4) &&
cfs_fail_val > 0) {
struct ptlrpc_thread *thread =
&lfsck->li_thread;
LASSERT(llsd != NULL);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_DELAY5) &&
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_DELAY5) &&
cfs_fail_val == lfsck_dev_idx(lfsck)) {
struct ptlrpc_thread *thread = &lfsck->li_thread;
/* start == NULL means auto trigger paused LFSCK. */
if (!start) {
if (list_empty(&lfsck->li_list_scan) ||
- OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NO_AUTO))
+ CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NO_AUTO))
GOTO(put, rc = 0);
} else if (start->ls_flags & LPF_BROADCAST && !lfsck->li_master) {
CERROR("%s: only allow to specify '-A | -o' via MDS\n",
if (unlikely(!thread_is_running(thread)))
GOTO(out, rc = 0);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_FATAL2)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_FATAL2)) {
spin_lock(&lfsck->li_lock);
thread_set_flags(thread, SVC_STOPPING);
spin_unlock(&lfsck->li_lock);
LASSERTF(rc == 0, "register namespace failed: rc = %d\n", rc);
target_recovery_init(&ofd->ofd_lut, tgt_request_handle);
- OBD_FAIL_TIMEOUT_ORSET(OBD_FAIL_OST_PREPARE_DELAY, OBD_FAIL_ONCE,
+ CFS_FAIL_TIMEOUT_ORSET(OBD_FAIL_OST_PREPARE_DELAY, CFS_FAIL_ONCE,
(OBD_TIMEOUT_DEFAULT + 1) / 4);
LASSERT(obd->obd_no_conn);
spin_lock(&obd->obd_dev_lock);
LASSERT(exp != NULL);
skip_orphan = !!(exp_connect_flags(exp) & OBD_CONNECT_SKIP_ORPHAN);
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_NODESTROY))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_NODESTROY))
goto done;
LCONSOLE(D_INFO, "%s: deleting orphan objects from "DOSTID
ENTRY;
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_EROFS))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_EROFS))
RETURN(-EROFS);
if (ofd->ofd_no_precreate)
ENTRY;
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_EROFS))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_EROFS))
RETURN(-EROFS);
/* This is old case for clients before Lustre 2.4 */
ENTRY;
- OBD_FAIL_TIMEOUT(OBD_FAIL_OST_STATFS_DELAY, 10);
+ CFS_FAIL_TIMEOUT(OBD_FAIL_OST_STATFS_DELAY, 10);
osfs = req_capsule_server_get(tsi->tsi_pill, &RMF_OBD_STATFS);
CERROR("%s: statfs failed: rc = %d\n",
tgt_name(tsi->tsi_tgt), rc);
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_STATFS_EINPROGRESS))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_STATFS_EINPROGRESS))
rc = -EINPROGRESS;
ofd_counter_incr(tsi->tsi_exp, LPROC_OFD_STATS_STATFS,
ENTRY;
- OBD_FAIL_TIMEOUT(OBD_FAIL_OST_PAUSE_PUNCH, cfs_fail_val);
+ CFS_FAIL_TIMEOUT(OBD_FAIL_OST_PAUSE_PUNCH, cfs_fail_val);
if ((oa->o_valid & (OBD_MD_FLSIZE | OBD_MD_FLBLOCKS)) !=
(OBD_MD_FLSIZE | OBD_MD_FLBLOCKS))
GOTO(out_release, rc);
}
- if (!OBD_FAIL_CHECK(OBD_FAIL_OST_GL_WORK_ALLOC))
+ if (!CFS_FAIL_CHECK(OBD_FAIL_OST_GL_WORK_ALLOC))
OBD_SLAB_ALLOC_PTR_GFP(gl_work, ldlm_glimpse_work_kmem,
GFP_ATOMIC);
*/
if (flags & LDLM_FL_BLOCK_NOWAIT) {
- OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_AGL_DELAY, 5);
+ CFS_FAIL_TIMEOUT(OBD_FAIL_LDLM_AGL_DELAY, 5);
- if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_AGL_NOLOCK))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LDLM_AGL_NOLOCK))
RETURN(ELDLM_LOCK_ABORTED);
}
/* The lock met with no resistance; we're finished. */
if (rc == LDLM_ITER_CONTINUE) {
- if (OBD_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2)) {
+ if (CFS_FAIL_TIMEOUT(OBD_FAIL_LDLM_GLIMPSE, 2)) {
ldlm_resource_unlink_lock(lock);
err = ELDLM_LOCK_ABORTED;
} else {
if (info->fti_attr.la_size == 0) {
/* object is just created, initialize last id */
- if (OBD_FAIL_CHECK(OBD_FAIL_OFD_SET_OID)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_OFD_SET_OID)) {
struct seq_server_site *ss = &ofd->ofd_seq_site;
struct lu_client_seq *client_seq = ss->ss_client_seq;
__u64 seq_width = fid_seq_is_norm(seq) ?
if (rc)
GOTO(out, rc);
- if (OBD_FAIL_CHECK(OBD_FAIL_MDS_FS_SETUP))
+ if (CFS_FAIL_CHECK(OBD_FAIL_MDS_FS_SETUP))
GOTO(out_seqs, rc = -ENOENT);
lu_local_obj_fid(&info->fti_fid, OFD_HEALTH_CHECK_OID);
int rc;
ENTRY;
- if (unlikely(OBD_FAIL_CHECK(OBD_FAIL_OST_SKIP_LV_CHECK)))
+ if (unlikely(CFS_FAIL_CHECK(OBD_FAIL_OST_SKIP_LV_CHECK)))
GOTO(out, rc = 0);
rc = ofd_object_ff_load(env, fo);
if (need_atime && ofd->ofd_atime_diff == 0)
need_atime = false;
- if (need_encfl && OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NO_ENCFLAG))
+ if (need_encfl && CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NO_ENCFLAG))
need_encfl = false;
if (!need_atime && !need_encfl)
begin = min_t(__u64, begin, rnb[i].rnb_offset);
end = max_t(__u64, end, rnb[i].rnb_offset + rnb[i].rnb_len);
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_2BIG_NIOBUF))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_2BIG_NIOBUF))
rnb[i].rnb_len = 100 * 1024 * 1024;
rc = dt_bufs_get(env, ofd_object_child(fo), rnb + i,
begin = min_t(__u64, begin, rnb[i].rnb_offset);
end = max_t(__u64, end, rnb[i].rnb_offset + rnb[i].rnb_len);
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_2BIG_NIOBUF))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_2BIG_NIOBUF))
rnb[i].rnb_len += PAGE_SIZE;
rc = dt_bufs_get(env, ofd_object_child(fo),
rnb + i, lnb + j, maxlnb, dbt);
LASSERT(oa != NULL);
- if (OBD_FAIL_CHECK(OBD_FAIL_SRV_ENOENT)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_SRV_ENOENT)) {
struct ofd_seq *oseq;
oseq = ofd_seq_load(env, ofd, ostid_seq(&oa->o_oi));
la->la_valid &= LA_UID | LA_GID | LA_PROJID;
if (oa->o_valid & OBD_MD_FLFLAGS && oa->o_flags & LUSTRE_ENCRYPT_FL &&
- !OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NO_ENCFLAG)) {
+ !CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NO_ENCFLAG)) {
la->la_valid |= LA_FLAGS;
la->la_flags = LUSTRE_ENCRYPT_FL;
}
* write RPCs only modify ff_{parent,layout} and those information will
* be the same from all the write RPCs. The reason that fl is not used
* in dt_xattr_set() is to allow this race. */
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NOPFID))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NOPFID))
GOTO(out_unlock, rc);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR1))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR1))
ff->ff_parent.f_oid = cpu_to_le32(1UL << 31);
- else if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR2))
+ else if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR2))
le32_add_cpu(&ff->ff_parent.f_oid, -1);
info->fti_buf.lb_buf = ff;
la->la_valid &= LA_ATIME | LA_MTIME | LA_CTIME;
/* do fake write, to simulate the write case for performance testing */
- if (OBD_FAIL_CHECK_QUIET(OBD_FAIL_OST_FAKE_RW)) {
+ if (CFS_FAIL_CHECK_QUIET(OBD_FAIL_OST_FAKE_RW)) {
struct niobuf_local *last = &lnb[niocount - 1];
__u64 file_size = last->lnb_file_offset + last->lnb_len;
__u64 valid = la->la_valid;
}
}
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_DQACQ_NET))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_DQACQ_NET))
GOTO(out_stop, rc = -EINPROGRESS);
if (likely(!fake_write)) {
}
if (likely(!fake_write)) {
- OBD_FAIL_TIMEOUT_ORSET(OBD_FAIL_OST_WR_ATTR_DELAY,
- OBD_FAIL_ONCE, cfs_fail_val);
+ CFS_FAIL_TIMEOUT_ORSET(OBD_FAIL_OST_WR_ATTR_DELAY,
+ CFS_FAIL_ONCE, cfs_fail_val);
rc = dt_write_commit(env, o, lnb, niocount, th, oa->o_size);
if (rc) {
restart = th->th_restart_tran;
ofd = ldlm_res_to_ns(res)->ns_lvbp;
LASSERT(ofd != NULL);
- if (OBD_FAIL_CHECK(OBD_FAIL_LDLM_OST_LVB))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LDLM_OST_LVB))
RETURN(-ENOMEM);
env = lu_env_find();
RETURN(-EPROTO);
/* Determine optimal brw size before calculating grant */
- if (OBD_FAIL_CHECK(OBD_FAIL_OST_BRW_SIZE)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_OST_BRW_SIZE)) {
data->ocd_brw_size = 65536;
} else if (OCD_HAS_FLAG(data, BRW_SIZE)) {
if (data->ocd_brw_size > ofd->ofd_brw_size)
osfs->os_blocks, osfs->os_bfree, osfs->os_bavail,
osfs->os_files, osfs->os_ffree, osfs->os_state);
- if (OBD_FAIL_CHECK_VALUE(OBD_FAIL_OST_ENOINO,
+ if (CFS_FAIL_CHECK_VALUE(OBD_FAIL_OST_ENOINO,
ofd->ofd_lut.lut_lsd.lsd_osd_index)) {
/* Reduce free inode count to zero, but keep "used" intact */
osfs->os_files -= osfs->os_ffree;
osfs->os_bsize = 1 << COMPAT_BSIZE_SHIFT;
}
- if (OBD_FAIL_CHECK_VALUE(OBD_FAIL_OST_ENOSPC,
+ if (CFS_FAIL_CHECK_VALUE(OBD_FAIL_OST_ENOSPC,
ofd->ofd_lut.lut_lsd.lsd_osd_index)) {
/* Reduce free blocks count near zero, but keep "used" intact */
osfs->os_bavail -= osfs->os_bavail - 2;
* To make above mechanism to work, before OFD pre-create OST-objects,
* it needs to update the LAST_ID file firstly, otherwise, the LFSCK
* may cannot get latest last_id although new OST-object created. */
- if (!OBD_FAIL_CHECK(OBD_FAIL_LFSCK_SKIP_LASTID)) {
+ if (!CFS_FAIL_CHECK(OBD_FAIL_LFSCK_SKIP_LASTID)) {
tmp = cpu_to_le64(id + nr - 1);
dt_write_lock(env, oseq->os_lastid_obj, DT_LASTID);
rc = dt_record_write(env, oseq->os_lastid_obj,
}
if (likely(!ofd_object_exists(fo) &&
- !OBD_FAIL_CHECK(OBD_FAIL_LFSCK_DANGLING))) {
+ !CFS_FAIL_CHECK(OBD_FAIL_LFSCK_DANGLING))) {
next = ofd_object_child(fo);
LASSERT(next != NULL);
GOTO(unlock, rc = fl);
if (fl) {
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR1))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR1))
ff->ff_parent.f_oid = cpu_to_le32(1UL << 31);
- else if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR2))
+ else if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR2))
le32_add_cpu(&ff->ff_parent.f_oid, -1);
- else if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NOPFID))
+ else if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NOPFID))
GOTO(unlock, rc);
info->fti_buf.lb_buf = ff;
GOTO(unlock, rc);
if (fl) {
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR1))
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR1))
ff->ff_parent.f_oid = cpu_to_le32(1UL << 31);
- else if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR2))
+ else if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_UNMATCHED_PAIR2))
le32_add_cpu(&ff->ff_parent.f_oid, -1);
- else if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_NOPFID))
+ else if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_NOPFID))
GOTO(unlock, rc);
info->fti_buf.lb_buf = ff;
/* Skip IDIF sequence for MDT0000 */
if (fid_is_idif(fid))
return true;
- if (OBD_FAIL_CHECK(OBD_FAIL_OSP_FORCE_NEW_SEQ))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OSP_FORCE_NEW_SEQ))
return true;
return fid_oid(fid) >= min(OBIF_MAX_OID, seq_width);
}
if (rc) {
CDEBUG(D_HA, "error "DFID": rc = %d\n",
PFID(lu_object_fid(&obj->opo_obj.do_lu)), rc);
- OBD_RACE(OBD_FAIL_OUT_OBJECT_MISS);
+ CFS_RACE(OBD_FAIL_OUT_OBJECT_MISS);
spin_lock(&obj->opo_lock);
obj->opo_attr.la_valid = 0;
obj->opo_stale = 1;
LASSERT(buf != NULL);
LASSERT(name != NULL);
- if (OBD_FAIL_CHECK(OBD_FAIL_LFSCK_BAD_NETWORK) &&
+ if (CFS_FAIL_CHECK(OBD_FAIL_LFSCK_BAD_NETWORK) &&
osp->opd_index == cfs_fail_val) {
if (is_ost_obj(&dt->do_lu)) {
if (osp_dev2node(osp) == cfs_fail_val)
/* should happen to non-0 OSP only so that at least one object
* has been already declared in the scenario and LOD should
* cleanup that */
- if (OBD_FAIL_CHECK(OBD_FAIL_MDS_OSC_CREATE_FAIL) && d->opd_index == 1)
+ if (CFS_FAIL_CHECK(OBD_FAIL_MDS_OSC_CREATE_FAIL) && d->opd_index == 1)
RETURN(-ENOSPC);
LASSERT(d->opd_last_used_oid_file);
LASSERT(!osp->opd_connect_mdt);
- if (!OBD_FAIL_CHECK(OBD_FAIL_LFSCK_LOST_MDTOBJ))
+ if (!CFS_FAIL_CHECK(OBD_FAIL_LFSCK_LOST_MDTOBJ))
rc = osp_sync_declare_add(env, o, MDS_UNLINK64_REC, th);
RETURN(rc);
LASSERT(!osp->opd_connect_mdt);
- if (!OBD_FAIL_CHECK(OBD_FAIL_LFSCK_LOST_MDTOBJ)) {
+ if (!CFS_FAIL_CHECK(OBD_FAIL_LFSCK_LOST_MDTOBJ)) {
/* once transaction is committed put proper command on
* the queue going to our OST. */
rc = osp_sync_add(env, o, MDS_UNLINK64_REC, th, NULL);
ptlrpc_request_set_replen(req);
- if (OBD_FAIL_CHECK(OBD_FAIL_OSP_FAKE_PRECREATE))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OSP_FAKE_PRECREATE))
GOTO(ready, rc = 0);
rc = ptlrpc_queue_wait(req);
CDEBUG(D_HA, "%s: going to cleanup orphans since "DFID"\n",
d->opd_obd->obd_name, PFID(&d->opd_last_used_fid));
- OBD_FAIL_TIMEOUT(OBD_FAIL_MDS_DELAY_DELORPHAN, cfs_fail_val);
+ CFS_FAIL_TIMEOUT(OBD_FAIL_MDS_DELAY_DELORPHAN, cfs_fail_val);
*last_fid = d->opd_last_used_fid;
/* The OSP should already get the valid seq now */
if (!d->opd_new_connection)
continue;
- OBD_FAIL_TIMEOUT(OBD_FAIL_OSP_CON_EVENT_DELAY,
+ CFS_FAIL_TIMEOUT(OBD_FAIL_OSP_CON_EVENT_DELAY,
cfs_fail_val);
d->opd_new_connection = 0;
d->opd_got_disconnected = 0;
imp = d->opd_obd->u.cli.cl_import;
LASSERT(imp);
- if (OBD_FAIL_CHECK(OBD_FAIL_OSP_CHECK_ENOMEM))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OSP_CHECK_ENOMEM))
RETURN(ERR_PTR(-ENOMEM));
req = ptlrpc_request_alloc(imp, format);
ENTRY;
LASSERT(h->lrh_type == MDS_SETATTR64_REC);
- if (OBD_FAIL_CHECK(OBD_FAIL_OSP_CHECK_INVALID_REC))
+ if (CFS_FAIL_CHECK(OBD_FAIL_OSP_CHECK_INVALID_REC))
RETURN(1);
/* lsr_valid can only be 0 or HAVE OBD_MD_{FLUID, FLGID, FLPROJID} set,
llh = NULL;
rec = NULL;
}
- if (OBD_FAIL_PRECHECK(OBD_FAIL_CATALOG_FULL_CHECK) &&
+ if (CFS_FAIL_PRECHECK(OBD_FAIL_CATALOG_FULL_CHECK) &&
cfs_fail_val != 1)
msleep(1 * MSEC_PER_SEC);
int size;
wrapped = llog_cat_is_wrapped(llh);
- if (OBD_FAIL_CHECK(OBD_FAIL_OSP_CANT_PROCESS_LLOG)) {
+ if (CFS_FAIL_CHECK(OBD_FAIL_OSP_CANT_PROCESS_LLOG)) {
rc = -EINPROGRESS;
goto next;
}
osp_trans_callback(env, our->our_th,
our->our_th->ot_super.th_result);
rc = our->our_th->ot_super.th_result;
- } else if (OBD_FAIL_CHECK(OBD_FAIL_INVALIDATE_UPDATE)) {
+ } else if (CFS_FAIL_CHECK(OBD_FAIL_INVALIDATE_UPDATE)) {
rc = -EIO;
osp_trans_callback(env, our->our_th, rc);
} else {
memset(repbody, 0, sizeof(*repbody));
memcpy(&repbody->qb_id, &lqe->lqe_id, sizeof(repbody->qb_id));
- if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_RECOVERABLE_ERR))
+ if (CFS_FAIL_CHECK(OBD_FAIL_QUOTA_RECOVERABLE_ERR))
RETURN(-cfs_fail_val);
- if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_PREACQ) &&
+ if (CFS_FAIL_CHECK(OBD_FAIL_QUOTA_PREACQ) &&
(req_is_preacq(qb_flags) || req_is_rel(qb_flags)))
RETURN(-EAGAIN);
/* start/stop grace timer if required */
qmt_lqes_tune_grace(env, now);
- if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_GRANT))
+ if (CFS_FAIL_CHECK(OBD_FAIL_QUOTA_GRANT))
slv_granted = 0xFFFFFFFFFFF00000;
/* Update slave index first since it is easier to roll back */
dt_object_put(env, slv_obj);
if ((req_is_acq(qb_flags) || req_is_preacq(qb_flags)) &&
- OBD_FAIL_CHECK(OBD_FAIL_QUOTA_EDQUOT)) {
+ CFS_FAIL_CHECK(OBD_FAIL_QUOTA_EDQUOT)) {
/* introduce inconsistency between granted value in slave index
* and slave index copy of slave */
repbody->qb_count = 0;
while (obd->obd_process_conf)
schedule_timeout_uninterruptible(cfs_time_seconds(1));
- OBD_FAIL_TIMEOUT(OBD_FAIL_QUOTA_RECALC, cfs_fail_val);
+ CFS_FAIL_TIMEOUT(OBD_FAIL_QUOTA_RECALC, cfs_fail_val);
sem = qmt_sarr_rwsem(pool);
LASSERT(sem);
down_read(sem);
* We don't update the version of slave index copy on DQACQ.
* No locking is necessary since nobody can change
* lqe->lqe_granted while lqe->lqe_pending_req > 0 */
- if (OBD_FAIL_CHECK(OBD_FAIL_QUOTA_GRANT))
+ if (CFS_FAIL_CHECK(OBD_FAIL_QUOTA_GRANT))
qti->qti_rec.lqr_slv_rec.qsr_granted =
0xFFFFFFFFFFDEC80CULL;
qsd_upd_schedule(qqi, lqe, &lqe->lqe_id, &qti->qti_rec, 0,
if (kthread_should_stop())
GOTO(out_lock, rc = 0);
- OBD_FAIL_TIMEOUT(OBD_FAIL_QUOTA_DELAY_REINT, 10);
+ CFS_FAIL_TIMEOUT(OBD_FAIL_QUOTA_DELAY_REINT, 10);
if (qqi->qqi_glb_ver != qti->qti_lvb.lvb_glb_ver) {
rc = qsd_reint_index(env, qqi, true);