Whamcloud - gitweb
LU-1187 mdt: directory remote open fix
[fs/lustre-release.git] / lustre / liblustre / llite_lib.h
index ec70c4e..c587ad5 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Whamcloud, Inc.
+ * Copyright (c) 2011, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -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;
@@ -327,7 +329,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)
 {
@@ -413,9 +415,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)