X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fliblustre%2Fllite_lib.h;h=2b427c38100997fa70ad95c7b708dd6194090706;hp=f8e6e342e3c85b711f56aa24ec66d375cf302e09;hb=93fe562c5dd3829939e3bc0533918f66b19776a4;hpb=08aa217ce49aba1ded52e0f7adb8a607035123fd diff --git a/lustre/liblustre/llite_lib.h b/lustre/liblustre/llite_lib.h index f8e6e34..2b427c3 100644 --- a/lustre/liblustre/llite_lib.h +++ b/lustre/liblustre/llite_lib.h @@ -27,7 +27,7 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2012, 2013, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -65,7 +65,7 @@ /* This should not be "optimized" use ~0ULL because page->index is a long and * 32-bit systems are therefore limited to 16TB in a mapping */ -#define MAX_LFS_FILESIZE ((__u64)(~0UL) << CFS_PAGE_SHIFT) +#define MAX_LFS_FILESIZE ((__u64)(~0UL) << PAGE_CACHE_SHIFT) struct ll_file_data { struct obd_client_handle fd_mds_och; __u32 fd_flags; @@ -117,6 +117,8 @@ struct llu_inode_info { * was opened several times without close, we track an * open_count here */ struct ll_file_data *lli_file_data; + /* checking lli_has_smd is reliable only inside an IO + * i.e, lov stripe has been held. */ bool lli_has_smd; int lli_open_flags; int lli_open_count; @@ -293,6 +295,7 @@ int llu_iop_lookup(struct pnode *pnode, struct intent *intnt, const char *path); void unhook_stale_inode(struct pnode *pno); +struct inode *llu_inode_from_resource_lock(struct ldlm_lock *lock); struct inode *llu_inode_from_lock(struct ldlm_lock *lock); int llu_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, @@ -327,7 +330,7 @@ static inline struct ext2_dirent *ext2_next_entry(struct ext2_dirent *p) return (struct ext2_dirent*)((char*) p + le16_to_cpu(p->rec_len)); } -int llu_merge_lvb(struct inode *inode); +int llu_merge_lvb(const struct lu_env *env, struct inode *inode); static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb) { @@ -342,7 +345,7 @@ static inline void inode_init_lvb(struct inode *inode, struct ost_lvb *lvb) #define LLU_IO_GROUP_SIZE(x) \ (sizeof(struct llu_io_group) + \ (sizeof(struct ll_async_page) + \ - sizeof(cfs_page_t) + \ + sizeof(struct page) + \ llap_cookie_size) * (x)) struct llu_io_session { @@ -413,9 +416,9 @@ static inline void cl_isize_unlock(struct inode *inode) { } -static inline int cl_merge_lvb(struct inode *inode) +static inline int cl_merge_lvb(const struct lu_env *env, struct inode *inode) { - return llu_merge_lvb(inode); + return llu_merge_lvb(env, inode); } #define cl_inode_atime(inode) (llu_i2stat(inode)->st_atime)