descr->cld_start = osc_index(opg);
descr->cld_end = osc_index(opg);
spin_lock(&hdr->coh_lock_guard);
descr->cld_start = osc_index(opg);
descr->cld_end = osc_index(opg);
spin_lock(&hdr->coh_lock_guard);
/*
* Lock-less sub-lock has to be either in HELD state
* (when io is actively going on), or in CACHED state,
/*
* Lock-less sub-lock has to be either in HELD state
* (when io is actively going on), or in CACHED state,
osc_lru_use(osc_cli(obj), opg);
spin_lock(&obj->oo_seatbelt);
osc_lru_use(osc_cli(obj), opg);
spin_lock(&obj->oo_seatbelt);
#endif
/* ops_inflight and ops_lru are the same field, but it doesn't
* hurt to initialize it twice :-) */
#endif
/* ops_inflight and ops_lru are the same field, but it doesn't
* hurt to initialize it twice :-) */
- LASSERT(cfs_list_empty(&opg->ops_lru));
- cfs_list_add(&opg->ops_lru, &lru);
+ LASSERT(list_empty(&opg->ops_lru));
+ list_add(&opg->ops_lru, &lru);
atomic_sub(npages, &cli->cl_lru_busy);
atomic_add(npages, &cli->cl_lru_in_list);
client_obd_list_unlock(&cli->cl_lru_list_lock);
atomic_sub(npages, &cli->cl_lru_busy);
atomic_add(npages, &cli->cl_lru_in_list);
client_obd_list_unlock(&cli->cl_lru_list_lock);
static void __osc_lru_del(struct client_obd *cli, struct osc_page *opg)
{
LASSERT(atomic_read(&cli->cl_lru_in_list) > 0);
static void __osc_lru_del(struct client_obd *cli, struct osc_page *opg)
{
LASSERT(atomic_read(&cli->cl_lru_in_list) > 0);
{
/* If page is being transfered for the first time,
* ops_lru should be empty */
{
/* If page is being transfered for the first time,
* ops_lru should be empty */
client_obd_list_lock(&cli->cl_lru_list_lock);
maxscan = min(target << 1, atomic_read(&cli->cl_lru_in_list));
client_obd_list_lock(&cli->cl_lru_list_lock);
maxscan = min(target << 1, atomic_read(&cli->cl_lru_in_list));
* from its own. This should rarely happen. */
spin_lock(&cache->ccc_lru_lock);
cache->ccc_lru_shrinkers++;
* from its own. This should rarely happen. */
spin_lock(&cache->ccc_lru_lock);
cache->ccc_lru_shrinkers++;
- while (--max_scans > 0 && !cfs_list_empty(&cache->ccc_lru)) {
- cli = cfs_list_entry(cache->ccc_lru.next, struct client_obd,
- cl_lru_osc);
+ while (--max_scans > 0 && !list_empty(&cache->ccc_lru)) {
+ cli = list_entry(cache->ccc_lru.next, struct client_obd,
+ cl_lru_osc);
CDEBUG(D_CACHE, "%s: cli %p LRU pages: %d, busy: %d.\n",
cli->cl_import->imp_obd->obd_name, cli,
atomic_read(&cli->cl_lru_in_list),
atomic_read(&cli->cl_lru_busy));
CDEBUG(D_CACHE, "%s: cli %p LRU pages: %d, busy: %d.\n",
cli->cl_import->imp_obd->obd_name, cli,
atomic_read(&cli->cl_lru_in_list),
atomic_read(&cli->cl_lru_busy));