"("LPU64" bytes) allocated by Lustre, "
"%d total bytes by LNET\n",
obd_memory_sum(),
- obd_pages_sum() << CFS_PAGE_SHIFT,
+ obd_pages_sum() << PAGE_CACHE_SHIFT,
obd_pages_sum(),
cfs_atomic_read(&libcfs_kmemory));
return 1;
OBD_ALLOC(lcfg, data->ioc_plen1);
if (lcfg == NULL)
GOTO(out, err = -ENOMEM);
- err = cfs_copy_from_user(lcfg, data->ioc_pbuf1,
+ err = copy_from_user(lcfg, data->ioc_pbuf1,
data->ioc_plen1);
if (!err)
err = lustre_cfg_sanity_check(lcfg, data->ioc_plen1);
CWARN("LPD64 wrong length! strlen(%s)=%d != 2\n", buf, len);
ret = -EINVAL;
}
- if ((u64val & ~CFS_PAGE_MASK) >= CFS_PAGE_SIZE) {
+ if ((u64val & ~CFS_PAGE_MASK) >= PAGE_CACHE_SIZE) {
CWARN("mask failed: u64val "LPU64" >= "LPU64"\n", u64val,
- (__u64)CFS_PAGE_SIZE);
+ (__u64)PAGE_CACHE_SIZE);
ret = -EINVAL;
}
/* Default the dirty page cache cap to 1/2 of system memory.
* For clients with less memory, a larger fraction is needed
* for other purposes (mostly for BGL). */
- if (cfs_num_physpages <= 512 << (20 - CFS_PAGE_SHIFT))
- obd_max_dirty_pages = cfs_num_physpages / 4;
- else
- obd_max_dirty_pages = cfs_num_physpages / 2;
+ if (num_physpages <= 512 << (20 - PAGE_CACHE_SHIFT))
+ obd_max_dirty_pages = num_physpages / 4;
+ else
+ obd_max_dirty_pages = num_physpages / 2;
err = obd_init_caches();
if (err)