X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fliblustre%2Fllite_cl.c;h=5c7ce91a470a2926495b9bb7ec7eae36c8fd9e98;hp=337a5ce25f86a0b85a7ab017a5f2d5aec43cae19;hb=93fe562c5dd3829939e3bc0533918f66b19776a4;hpb=d5390bbde9b525b13ab91f5610abe1c4bb98eff9 diff --git a/lustre/liblustre/llite_cl.c b/lustre/liblustre/llite_cl.c index 337a5ce..5c7ce91 100644 --- a/lustre/liblustre/llite_cl.c +++ b/lustre/liblustre/llite_cl.c @@ -17,7 +17,7 @@ * along with Lustre; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2013, Intel Corporation. */ #define DEBUG_SUBSYSTEM S_LLITE @@ -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); }