Whamcloud - gitweb
- minor fixes to get mount to roll in 2.5
authorbraam <braam>
Wed, 30 Oct 2002 20:25:03 +0000 (20:25 +0000)
committerbraam <braam>
Wed, 30 Oct 2002 20:25:03 +0000 (20:25 +0000)
lustre/include/linux/lustre_lite.h
lustre/llite/super25.c
lustre/mdc/mdc_request.c

index 99d93b2..a646174 100644 (file)
@@ -32,6 +32,13 @@ struct ll_file_data {
         __u32 fd_flags;
 };
 
+struct lustre_intent_data { 
+       __u64 it_lock_handle[2];
+       __u32 it_disposition;
+       __u32 it_status;
+       __u32 it_lock_mode;
+};
+
 struct ll_dentry_data {
         struct semaphore      lld_it_sem;
 };
@@ -54,12 +61,6 @@ struct ll_inode_info {
 #endif
 };
 
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
-static inline struct ll_inode_info *LL_I(struct inode *inode)
-{
-        return container_of(inode, struct ll_inode_info, lli_vfs_inode);
-}
-#endif
 
 
 #define LL_SUPER_MAGIC 0x0BD00BD0
@@ -89,7 +90,7 @@ struct ll_sb_info {
 
 static inline struct ll_sb_info *ll_s2sbi(struct super_block *sb)
 {
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+#if  (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
         return (struct ll_sb_info *)(sb->s_fs_info);
 #else
         return (struct ll_sb_info *)(sb->u.generic_sbp);
@@ -109,14 +110,22 @@ static inline struct client_obd *sbi2mdc(struct ll_sb_info *sbi)
         return &obd->u.cli;
 }
 
+// FIXME: replace the name of this with LL_SB to conform to kernel stuff
 static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
 {
         return ll_s2sbi(inode->i_sb);
 }
 
+
+// FIXME: replace the name of this with LL_I to conform to kernel stuff
+// static inline struct ll_inode_info *LL_I(struct inode *inode)
 static inline struct ll_inode_info *ll_i2info(struct inode *inode)
 {
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
+               return container_of(inode, struct ll_inode_info, lli_vfs_inode);
+#else
         return (struct ll_inode_info *)&(inode->u.generic_ip);
+#endif
 }
 
 static inline struct lustre_handle *ll_i2obdconn(struct inode *inode)
index 83867eb..a4ea8b7 100644 (file)
@@ -123,7 +123,6 @@ static int ll_fill_super(struct super_block *sb, void *data, int silent)
         }
 
         INIT_LIST_HEAD(&sbi->ll_conn_chain);
-        sbi->ll_mount_epoch = 0;
         generate_random_uuid(uuid);
         class_uuid_unparse(uuid, sbi->ll_sb_uuid);
 
@@ -478,7 +477,6 @@ int ll_read_inode2(struct inode *inode, void *opaque)
         ENTRY;
         
         sema_init(&lli->lli_open_sem, 1);
-        lli->lli_mount_epoch = ll_i2sbi(inode)->ll_mount_epoch;
         
         /* core attributes first */
         ll_update_inode(inode, body);
@@ -585,16 +583,15 @@ static struct inode *ll_alloc_inode(struct super_block *sb)
        if (!lli)
                return NULL;
 
-       memset(lli, 0, sizeof(*lli));
+       memset(lli, 0, (char *)&lli->lli_vfs_inode - (char *)lli);
         sema_init(&lli->lli_open_sem, 1);
-        lli->lli_mount_epoch = ll_i2sbi(&lli->lli_vfs_inode)->ll_mount_epoch;
 
        return &lli->lli_vfs_inode;
 }
 
 static void ll_destroy_inode(struct inode *inode)
 {
-       kmem_cache_free(ll_inode_cachep, LL_I(inode));
+       kmem_cache_free(ll_inode_cachep, ll_i2info(inode));
 }
 
 static void init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
index 62d4610..acf6839 100644 (file)
@@ -157,7 +157,7 @@ int mdc_getattr(struct lustre_handle *conn,
 
 static void d_delete_aliases(struct inode *inode)
 {
-        struct dentry *dentry;
+        struct dentry *dentry = NULL;
        struct list_head *tmp;
         int dentry_count = 0;
         ENTRY;
@@ -347,11 +347,13 @@ static void mdc_replay_create(struct ptlrpc_request *req)
         /* XXX cargo-culted right out of ll_iget */
 #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0))
         inode = iget4(saved->sb, body->fid1.id, create_replay_find_inode, req);
-#else
+#endif
+#if 0
         {
                 extern int ll_read_inode2(struct inode *inode, void *opaque);
                 inode = iget5_locked(saved->sb, body->fid1.id,
-                                     create_replay_find_inode, req);
+                                     create_replay_find_inode, 
+                                     ll_read_inode2, req);
 
                 if (!inode)
                         LBUG(); /* XXX ick */