Whamcloud - gitweb
Replace all of the "char[37]" uses with obd_uuid_t.
[fs/lustre-release.git] / lustre / include / linux / lustre_lite.h
index d74f319..1daa659 100644 (file)
@@ -6,8 +6,8 @@
  * This code is issued under the GNU General Public License.
  * See the file COPYING in this distribution
  * 
- *
- *
+ * Copyright (C) 2002 Cluster File Systems, Inc. <info@clusterfs.com>
+ */
 
 
 
@@ -17,6 +17,7 @@
 #include <linux/fs.h>
 #include <linux/ext2_fs.h>
 
+#include <linux/obd_class.h>
 #include <linux/lustre_net.h>
 #include <linux/lustre_mds.h>
 #include <linux/lustre_ha.h>
@@ -28,9 +29,10 @@ struct ll_file_data {
         __u32 fd_flags;
 };
 
-struct ll_inode_md {
-        struct mds_body *body;
-        struct lov_stripe_md *md;
+
+struct ll_read_inode2_cookie {
+        struct mds_body *lic_body;
+        struct lov_mds_md *lic_lmm;
 };
 
 #define LL_IOC_GETFLAGS                 _IOR ('f', 151, long)
@@ -41,14 +43,10 @@ struct ll_inode_md {
 
 #define LL_INLINESZ      60
 struct ll_inode_info {
-        int              lli_flags;
-        //        struct obdo     *lli_obdo;
-        struct  lov_stripe_md *lli_smd;
-        //        int              lli_obdo_mdsz;
-        //void            *lli_obdo_md;
-        char            *lli_symlink_name;
-        char             lli_inline[LL_INLINESZ];
-        struct lustre_handle lli_intent_lock_handle;
+        struct lov_stripe_md *lli_smd;
+        char                 *lli_symlink_name;
+        struct lustre_handle  lli_intent_lock_handle;
+        struct semaphore      lli_open_sem;
 };
 
 #define LL_SUPER_MAGIC 0x0BD00BD0
@@ -57,11 +55,15 @@ struct ll_inode_info {
 #define LL_COMMITCBD_STOPPED   0x2
 #define LL_COMMITCBD_RUNNING   0x4
 
+#define LL_SBI_NOLCK   0x1
+
 struct ll_sb_info {
+        obd_uuid_t                ll_sb_uuid;
         struct lustre_handle      ll_mdc_conn;
         struct lustre_handle      ll_osc_conn;
         obd_id                    ll_rootino; /* number of root inode */
-
+        
+        int                       ll_flags;
         wait_queue_head_t         ll_commitcbd_waitq;
         wait_queue_head_t         ll_commitcbd_ctl_waitq;
         int                       ll_commitcbd_flags;
@@ -100,12 +102,6 @@ static inline struct ll_inode_info *ll_i2info(struct inode *inode)
         return (struct ll_inode_info *)&(inode->u.generic_ip);
 }
 
-static inline int ll_has_inline(struct inode *inode)
-{
-        return (ll_i2info(inode)->lli_flags & OBD_FL_INLINEDATA);
-}
-
-
 static inline struct lustre_handle *ll_i2obdconn(struct inode *inode)
 {
         return ll_s2obdconn(inode->i_sb);
@@ -125,6 +121,16 @@ static inline void ll_inode2fid(struct ll_fid *fid, struct inode *inode)
                    inode->i_mode & S_IFMT);
 }
 
+static inline int ll_mds_easize(struct super_block *sb)
+{
+        return sbi2mdc(ll_s2sbi(sb))->cl_max_mds_easize;
+}
+
+static inline int ll_ost_easize(struct super_block *sb)
+{
+        return sbi2mdc(ll_s2sbi(sb))->cl_max_ost_easize;
+}
+
 /* namei.c */
 int ll_lock(struct inode *dir, struct dentry *dentry,
             struct lookup_intent *it, struct lustre_handle *lockh);
@@ -140,6 +146,14 @@ extern struct inode_operations ll_dir_inode_operations;
 /* file.c */
 extern struct file_operations ll_file_operations;
 extern struct inode_operations ll_file_inode_operations;
+struct ldlm_lock;
+int ll_lock_callback(struct ldlm_lock *, struct ldlm_lock_desc *, void *data,
+                     __u32 data_len);
+int ll_size_lock(struct inode *, struct lov_stripe_md *, __u64 start, int mode,
+                 struct lustre_handle **);
+int ll_size_unlock(struct inode *, struct lov_stripe_md *, int mode,
+                   struct lustre_handle *);
+int ll_file_size(struct inode *inode, struct lov_stripe_md *md);
 
 /* rw.c */
 struct page *ll_getpage(struct inode *inode, unsigned long offset,