Whamcloud - gitweb
LU-3321 clio: revert LU-2622 for removing global env list
[fs/lustre-release.git] / lustre / liblustre / llite_cl.c
index adc9dc9..5c7ce91 100644 (file)
@@ -58,7 +58,7 @@ static int   slp_type_init     (struct lu_device_type *t);
 static void  slp_type_fini     (struct lu_device_type *t);
 
 static int slp_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);
 static int   slp_attr_get     (const struct lu_env *env, struct cl_object *obj,
                                struct cl_attr *attr);
 
@@ -224,7 +224,7 @@ void slp_global_fini(void)
  */
 
 static int slp_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 ccc_page *cpg = cl_object_page_slice(obj, page);
 
@@ -294,7 +294,7 @@ static int slp_attr_get(const struct lu_env *env, struct cl_object *obj,
 
 static void slp_page_fini_common(struct ccc_page *cp)
 {
-        cfs_page_t *vmpage = cp->cpg_page;
+       struct page *vmpage = cp->cpg_page;
 
         LASSERT(vmpage != NULL);
         llu_free_user_page(vmpage);
@@ -497,8 +497,8 @@ static int llu_queue_pio(const struct lu_env *env, struct cl_io *io,
                 unsigned long index, offset, bytes;
 
                 offset = (pos & ~CFS_PAGE_MASK);
-                index = pos >> CFS_PAGE_SHIFT;
-                bytes = CFS_PAGE_SIZE - offset;
+               index = pos >> PAGE_CACHE_SHIFT;
+               bytes = PAGE_CACHE_SIZE - offset;
                 if (bytes > count)
                         bytes = count;
 
@@ -582,7 +582,8 @@ struct llu_io_group * get_io_group(struct inode *inode, int maxpages,
 
 static int max_io_pages(ssize_t len, int iovlen)
 {
-        return (((len + CFS_PAGE_SIZE -1) / CFS_PAGE_SIZE) + 2 + iovlen - 1);
+       return ((len + PAGE_CACHE_SIZE - 1) / PAGE_CACHE_SIZE) +
+               2 + iovlen - 1;
 }
 
 void put_io_group(struct llu_io_group *group)
@@ -791,5 +792,6 @@ int cl_sb_fini(struct llu_sb_info *sbi)
          * automatically when last device is destroyed).
          */
         lu_types_stop();
+        cl_env_cache_purge(~0);
         RETURN(0);
 }