Whamcloud - gitweb
LU-1346 libcfs: replace cfs_ memory wrappers
[fs/lustre-release.git] / lustre / osc / osc_page.c
index 89c0aa0..0691f7b 100644 (file)
@@ -508,14 +508,14 @@ static const struct cl_page_operations osc_page_ops = {
 };
 
 int osc_page_init(const struct lu_env *env, struct cl_object *obj,
-               struct cl_page *page, cfs_page_t *vmpage)
+               struct cl_page *page, struct page *vmpage)
 {
        struct osc_object *osc = cl2osc(obj);
        struct osc_page   *opg = cl_object_page_slice(obj, page);
        int result;
 
        opg->ops_from = 0;
-       opg->ops_to   = CFS_PAGE_SIZE;
+       opg->ops_to   = PAGE_CACHE_SIZE;
 
        result = osc_prep_async_page(osc, opg, vmpage,
                                        cl_offset(obj, page->cp_index));
@@ -593,9 +593,9 @@ static CFS_DECL_WAITQ(osc_lru_waitq);
 static cfs_atomic_t osc_lru_waiters = CFS_ATOMIC_INIT(0);
 /* LRU pages are freed in batch mode. OSC should at least free this
  * number of pages to avoid running out of LRU budget, and.. */
-static const int lru_shrink_min = 2 << (20 - CFS_PAGE_SHIFT);  /* 2M */
+static const int lru_shrink_min = 2 << (20 - PAGE_CACHE_SHIFT);  /* 2M */
 /* free this number at most otherwise it will take too long time to finsih. */
-static const int lru_shrink_max = 32 << (20 - CFS_PAGE_SHIFT); /* 32M */
+static const int lru_shrink_max = 32 << (20 - PAGE_CACHE_SHIFT); /* 32M */
 
 /* Check if we can free LRU slots from this OSC. If there exists LRU waiters,
  * we should free slots aggressively. In this way, slots are freed in a steady
@@ -810,7 +810,7 @@ static void osc_lru_del(struct client_obd *cli, struct osc_page *opg, bool del)
                         * cl_lru_shrinkers is to avoid recursive call in case
                         * we're already in the context of osc_lru_shrink(). */
                        if (cfs_atomic_read(&cli->cl_lru_shrinkers) == 0 &&
-                           !cfs_memory_pressure_get())
+                           !memory_pressure_get())
                                osc_lru_shrink(cli, osc_cache_too_much(cli));
                        cfs_waitq_signal(&osc_lru_waitq);
                }