__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;
};
#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
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);
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)
}
INIT_LIST_HEAD(&sbi->ll_conn_chain);
- sbi->ll_mount_epoch = 0;
generate_random_uuid(uuid);
class_uuid_unparse(uuid, sbi->ll_sb_uuid);
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);
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)
static void d_delete_aliases(struct inode *inode)
{
- struct dentry *dentry;
+ struct dentry *dentry = NULL;
struct list_head *tmp;
int dentry_count = 0;
ENTRY;
/* 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 */