Whamcloud - gitweb
- change I/O to use a pagearray
[fs/lustre-release.git] / lustre / include / linux / lustre_lite.h
index 4b9bb0c..02b4c6e 100644 (file)
@@ -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>
@@ -30,7 +31,7 @@ struct ll_file_data {
 
 struct ll_inode_md {
         struct mds_body *body;
-        struct obdo *obdo;
+        struct lov_stripe_md *md;
 };
 
 #define LL_IOC_GETFLAGS                 _IOR ('f', 151, long)
@@ -41,11 +42,10 @@ struct ll_inode_md {
 
 #define LL_INLINESZ      60
 struct ll_inode_info {
-        int              lli_flags;
-        struct obdo     *lli_obdo;
-        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
@@ -55,9 +55,9 @@ struct ll_inode_info {
 #define LL_COMMITCBD_RUNNING   0x4
 
 struct ll_sb_info {
-        struct lustre_handle           ll_mdc_conn;
-        struct lustre_handle           ll_osc_conn;
-        ino_t                     ll_rootino; /* number of root inode */
+        struct lustre_handle      ll_mdc_conn;
+        struct lustre_handle      ll_osc_conn;
+        obd_id                    ll_rootino; /* number of root inode */
 
         wait_queue_head_t         ll_commitcbd_waitq;
         wait_queue_head_t         ll_commitcbd_ctl_waitq;
@@ -79,12 +79,12 @@ static inline struct lustre_handle *ll_s2obdconn(struct super_block *sb)
         return &(ll_s2sbi(sb))->ll_osc_conn;
 }
 
-static inline struct mdc_obd *sbi2mdc(struct ll_sb_info *sbi)
+static inline struct client_obd *sbi2mdc(struct ll_sb_info *sbi)
 {
         struct obd_device *obd = class_conn2obd(&sbi->ll_mdc_conn);
         if (obd == NULL)
                 LBUG();
-        return &obd->u.mdc;
+        return &obd->u.cli;
 }
 
 static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
@@ -97,21 +97,15 @@ 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);
 }
 
-static inline void ll_ino2fid(struct ll_fid *fid, ino_t ino, __u32 generation,
+static inline void ll_ino2fid(struct ll_fid *fid, obd_id ino, __u32 generation,
                               int type)
 {
-        fid->id = (__u64)ino;
+        fid->id = ino;
         fid->generation = generation;
         fid->f_type = type;
 }
@@ -127,7 +121,8 @@ int ll_lock(struct inode *dir, struct dentry *dentry,
             struct lookup_intent *it, struct lustre_handle *lockh);
 int ll_unlock(__u32 mode, struct lustre_handle *lockh);
 
-
+/* dcache.c */
+void ll_intent_release(struct dentry *de);
 
 /* dir.c */
 extern struct file_operations ll_dir_operations;