CERROR("%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
obd->obd_name, exp->exp_client_uuid.uuid, exp,
fed->fed_dirty, fed->fed_pending, fed->fed_grant);
- spin_unlock(&obd->obd_osfs_lock);
+ cfs_spin_unlock(&obd->obd_osfs_lock);
LBUG();
}
EXIT;
LASSERT_SPIN_LOCKED(&obd->obd_osfs_lock);
- if (cfs_time_before_64(obd->obd_osfs_age, cfs_time_current_64() - HZ)) {
+ if (cfs_time_before_64(obd->obd_osfs_age,
+ cfs_time_current_64() - CFS_HZ)) {
restat:
rc = fsfilt_statfs(obd, obd->u.obt.obt_sb,
- cfs_time_current_64() + HZ);
+ cfs_time_current_64() + CFS_HZ);
if (rc) /* N.B. statfs can't really fail */
RETURN(0);
statfs_done = 1;
"current"LPU64"\n",
obd->obd_name, exp->exp_client_uuid.uuid,
exp, fed->fed_grant, want,current_grant);
- spin_unlock(&obd->obd_osfs_lock);
+ cfs_spin_unlock(&obd->obd_osfs_lock);
LBUG();
}
}
RETURN(rc);
if (oa && oa->o_valid & OBD_MD_FLGRANT) {
- spin_lock(&obd->obd_osfs_lock);
+ cfs_spin_lock(&obd->obd_osfs_lock);
filter_grant_incoming(exp, oa);
if (!(oa->o_flags & OBD_FL_SHRINK_GRANT))
oa->o_grant = 0;
- spin_unlock(&obd->obd_osfs_lock);
+ cfs_spin_unlock(&obd->obd_osfs_lock);
}
iobuf = filter_iobuf_get(&obd->u.filter, oti);
fsfilt_check_slow(obd, now, "preprw_read setup");
/* find pages for all segments, fill array with them */
- do_gettimeofday(&start);
+ cfs_gettimeofday(&start);
for (i = 0, lnb = res; i < *npages; i++, lnb++) {
lnb->dentry = dentry;
lprocfs_counter_add(obd->obd_stats, LPROC_FILTER_CACHE_MISS, 1);
filter_iobuf_add_page(obd, iobuf, inode, lnb->page);
}
- do_gettimeofday(&end);
+ cfs_gettimeofday(&end);
timediff = cfs_timeval_sub(&end, &start, NULL);
lprocfs_counter_add(obd->obd_stats, LPROC_FILTER_GET_PAGE, timediff);
CERROR("%s: cli %s/%p dirty %ld pend %ld grant %ld\n",
exp->exp_obd->obd_name, exp->exp_client_uuid.uuid, exp,
fed->fed_dirty, fed->fed_pending, fed->fed_grant);
- spin_unlock(&exp->exp_obd->obd_osfs_lock);
+ cfs_spin_unlock(&exp->exp_obd->obd_osfs_lock);
LBUG();
}
return rc;
fmd = filter_fmd_find(exp, obj->ioo_id, obj->ioo_gr);
LASSERT(oa != NULL);
- spin_lock(&obd->obd_osfs_lock);
+ cfs_spin_lock(&obd->obd_osfs_lock);
filter_grant_incoming(exp, oa);
if (fmd && fmd->fmd_mactime_xid > oti->oti_xid)
oa->o_valid &= ~(OBD_MD_FLMTIME | OBD_MD_FLCTIME |
oa->o_grant = filter_grant(exp, oa->o_grant, oa->o_undirty,
left, 1);
- spin_unlock(&obd->obd_osfs_lock);
+ cfs_spin_unlock(&obd->obd_osfs_lock);
filter_fmd_put(exp, fmd);
if (rc)
* multiple writes or single truncate. */
down_read(&dentry->d_inode->i_alloc_sem);
- do_gettimeofday(&start);
+ cfs_gettimeofday(&start);
for (i = 0, lnb = res; i < *npages; i++, lnb++) {
/* We still set up for ungranted pages so that granted pages
if (lnb->rc == 0)
tot_bytes += lnb->len;
}
- do_gettimeofday(&end);
+ cfs_gettimeofday(&end);
timediff = cfs_timeval_sub(&end, &start, NULL);
lprocfs_counter_add(obd->obd_stats, LPROC_FILTER_GET_PAGE, timediff);
case 1:
filter_iobuf_put(&obd->u.filter, iobuf, oti);
case 0:
- spin_lock(&obd->obd_osfs_lock);
+ cfs_spin_lock(&obd->obd_osfs_lock);
if (oa)
filter_grant_incoming(exp, oa);
- spin_unlock(&obd->obd_osfs_lock);
+ cfs_spin_unlock(&obd->obd_osfs_lock);
pop_ctxt(&saved, &obd->obd_lvfs_ctxt, NULL);
break;
default:;
unsigned long pending = 0;
int i;
- spin_lock(&exp->exp_obd->obd_osfs_lock);
+ cfs_spin_lock(&exp->exp_obd->obd_osfs_lock);
for (i = 0, lnb = res; i < niocount; i++, lnb++)
pending += lnb->lnb_grant_used;
filter->fo_tot_pending, pending);
filter->fo_tot_pending -= pending;
- spin_unlock(&exp->exp_obd->obd_osfs_lock);
+ cfs_spin_unlock(&exp->exp_obd->obd_osfs_lock);
}
int filter_commitrw(int cmd, struct obd_export *exp, struct obdo *oa,