#include <linux/obdo.h>
extern kmem_cache_t *ll_file_data_slab;
-struct ll_file_data {
- __u64 fd_mdshandle;
- struct ptlrpc_request *fd_req;
+struct ll_file_data {
+ __u64 fd_mdshandle;
+ struct ptlrpc_request *fd_req;
+ __u32 fd_flags;
};
+struct ll_inode_md {
+ struct mds_body *body;
+ struct obdo *obdo;
+};
+
+#define LL_IOC_GETFLAGS _IOR ('f', 151, long)
+#define LL_IOC_SETFLAGS _IOW ('f', 152, long)
+#define LL_IOC_CLRFLAGS _IOW ('f', 153, long)
+
+#define LL_FILE_IGNORE_LOCK 0x00000001
+
#define LL_INLINESZ 60
struct ll_inode_info {
int lli_flags;
- __u64 lli_objid;
+ struct obdo *lli_obdo;
+ char *lli_symlink_name;
char lli_inline[LL_INLINESZ];
+ struct lustre_handle lli_intent_lock_handle;
};
-#define LL_SUPER_MAGIC 0x0BD00BD0;
+#define LL_SUPER_MAGIC 0x0BD00BD0
#define LL_COMMITCBD_STOPPING 0x1
#define LL_COMMITCBD_STOPPED 0x2
#define LL_COMMITCBD_RUNNING 0x4
struct ll_sb_info {
- struct obd_conn ll_conn;
+ struct obd_conn ll_mdc_conn;
+ struct obd_conn ll_osc_conn;
ino_t ll_rootino; /* number of root inode */
- struct ptlrpc_client ll_mds_client;
- struct ptlrpc_connection *ll_mds_conn;
- struct ptlrpc_client ll_ost_client;
- struct ptlrpc_connection *ll_ost_conn;
wait_queue_head_t ll_commitcbd_waitq;
wait_queue_head_t ll_commitcbd_ctl_waitq;
int ll_commitcbd_flags;
- struct task_struct *ll_commitcbd_thread;
+ struct task_struct *ll_commitcbd_thread;
time_t ll_commitcbd_waketime;
time_t ll_commitcbd_timeout;
spinlock_t ll_commitcbd_lock;
static inline struct obd_conn *ll_s2obdconn(struct super_block *sb)
{
- return &(ll_s2sbi(sb))->ll_conn;
+ return &(ll_s2sbi(sb))->ll_osc_conn;
+}
+
+static inline struct mdc_obd *sbi2mdc(struct ll_sb_info *sbi)
+{
+ struct obd_device *obd = sbi->ll_mdc_conn.oc_dev;
+ return &obd->u.mdc;
}
static inline struct ll_sb_info *ll_i2sbi(struct inode *inode)
inode->i_mode & S_IFMT);
}
+/* namei.c */
+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);
+
+
+
/* dir.c */
extern struct file_operations ll_dir_operations;
extern struct inode_operations ll_dir_inode_operations;