# include <linux/list.h>
#else
# define __KERNEL__
+# include <asm/types.h>
# include <linux/list.h>
# undef __KERNEL__
# include <stdint.h>
__u64 addr;
__u64 cookie; /* security token */
__u32 magic;
+ __u32 type;
__u32 version;
- __u64 last_rcvd;
+ __u32 opc;
+ __u64 last_xid;
__u64 last_committed;
__u64 transno;
- __u32 opc;
__u32 status;
- __u32 type;
- __u32 bufcount;
- __u32 buflens[0];
+ __u32 bufcount;
+ __u32 buflens[0];
};
#define CONNMGR_REPLY 0
#define OST_REPLY 0 /* reply ? */
#define OST_GETATTR 1
#define OST_SETATTR 2
-#define OST_BRW 3
-#define OST_CREATE 4
-#define OST_DESTROY 5
-#define OST_GET_INFO 6
-#define OST_CONNECT 7
-#define OST_DISCONNECT 8
-#define OST_PUNCH 9
-#define OST_OPEN 10
-#define OST_CLOSE 11
-#define OST_STATFS 12
+#define OST_READ 3
+#define OST_WRITE 4
+#define OST_CREATE 5
+#define OST_DESTROY 6
+#define OST_GET_INFO 7
+#define OST_CONNECT 8
+#define OST_DISCONNECT 9
+#define OST_PUNCH 10
+#define OST_OPEN 11
+#define OST_CLOSE 12
+#define OST_STATFS 13
typedef uint64_t obd_id;
typedef uint32_t obd_mode;
typedef uint32_t obd_uid;
typedef uint32_t obd_gid;
-typedef uint32_t obd_rdev;
+typedef uint64_t obd_rdev;
typedef uint32_t obd_flag;
typedef uint32_t obd_count;
#define OBD_FL_INLINEDATA (0x00000001)
#define OBD_FL_OBDMDEXISTS (0x00000002)
-#define OBD_FL_CREATEONOPEN (0x00000004)
#define OBD_INLINESZ 60
-#define OBD_OBDMDSZ 60
+
/* Note: 64-bit types are 64-bit aligned in structure */
struct obdo {
obd_id o_id;
obd_time o_ctime;
obd_size o_size;
obd_blocks o_blocks;
+ obd_rdev o_rdev;
obd_blksize o_blksize;
obd_mode o_mode;
obd_uid o_uid;
obd_flag o_flags;
obd_count o_nlink;
obd_count o_generation;
- obd_rdev o_rdev;
obd_flag o_valid; /* hot fields in this obdo */
obd_flag o_obdflags;
+ __u32 o_easize;
char o_inline[OBD_INLINESZ];
};
+struct lov_object_id { /* per-child structure */
+ __u64 l_object_id;
+};
+
+#define LOV_MAGIC 0x0BD00BD0
+
+struct lov_stripe_md {
+ __u32 lmd_magic;
+ __u32 lmd_easize; /* packed size of extended */
+ __u64 lmd_object_id; /* lov object id */
+ __u64 lmd_stripe_offset; /* offset of the stripe */
+ __u64 lmd_stripe_size; /* size of the stripe */
+ __u32 lmd_stripe_count; /* how many objects are being striped */
+ __u32 lmd_stripe_pattern; /* per-lov object stripe pattern */
+ struct lov_object_id lmd_objects[0];
+};
+
#define OBD_MD_FLALL (0xffffffff)
#define OBD_MD_FLID (0x00000001)
#define OBD_MD_FLATIME (0x00000002)
#define OBD_MD_FLNLINK (0x00002000)
#define OBD_MD_FLGENER (0x00004000)
#define OBD_MD_FLINLINE (0x00008000)
-#define OBD_MD_FLOBDMD (0x00010000)
-#define OBD_MD_FLOBJID (0x00020000)
+#define OBD_MD_FLRDEV (0x00010000)
+#define OBD_MD_FLEASIZE (0x00020000)
#define OBD_MD_LINKNAME (0x00040000)
-#define OBD_MD_FLNOTOBD (~(OBD_MD_FLOBDMD | OBD_MD_FLOBDFLG | OBD_MD_FLBLOCKS |\
- OBD_MD_LINKNAME))
+#define OBD_MD_FLNOTOBD (~(OBD_MD_FLOBDFLG | OBD_MD_FLBLOCKS | OBD_MD_LINKNAME))
struct obd_statfs {
__u64 os_type;
__u64 os_bavail;
__u64 os_files;
__u64 os_ffree;
- __u64 os_fsid;
+ __u8 os_fsid[40];
__u32 os_bsize;
__u32 os_namelen;
__u32 os_spare[12];
#define OST_REQ_HAS_OA1 0x1
struct ost_body {
- __u32 connid;
- __u32 data;
struct obdo oa;
};
#define MDS_DISCONNECT 8
#define MDS_GETSTATUS 9
#define MDS_STATFS 10
-#define MDS_LOVINFO 11
+#define MDS_GETLOVINFO 11
#define REINT_SETATTR 1
#define REINT_CREATE 2
__u32 repbuf;
};
+struct mds_fileh_body {
+ struct ll_fid f_fid;
+ struct lustre_handle f_handle;
+};
+
struct mds_conn_status {
struct ll_fid rootfid;
__u64 xid;
__u32 ino;
__u32 nlink;
__u32 generation;
- __u32 last_xid;
+ __u32 last_xidnomore;
};
/* MDS update records */
-struct mds_update_record_hdr {
- __u32 ur_opcode;
-};
+
+
+//struct mds_update_record_hdr {
+// __u32 ur_opcode;
+//};
struct mds_rec_setattr {
__u32 sa_opcode;
- struct ll_fid sa_fid;
__u32 sa_valid;
+ struct ll_fid sa_fid;
__u32 sa_mode;
__u32 sa_uid;
__u32 sa_gid;
+ __u32 sa_attr_flags;
__u64 sa_size;
__u64 sa_atime;
__u64 sa_mtime;
__u64 sa_ctime;
- __u32 sa_attr_flags;
};
struct mds_rec_create {
__u32 cr_opcode;
+ __u32 cr_mode;
struct ll_fid cr_fid;
__u32 cr_uid;
__u32 cr_gid;
__u64 cr_time;
- __u32 cr_mode;
__u64 cr_rdev;
};
struct mds_rec_link {
__u32 lk_opcode;
+ __u32 lk_reserved;
struct ll_fid lk_fid1;
struct ll_fid lk_fid2;
};
struct mds_rec_unlink {
__u32 ul_opcode;
+ __u32 ul_mode;
struct ll_fid ul_fid1;
struct ll_fid ul_fid2;
};
struct mds_rec_rename {
__u32 rn_opcode;
+ __u32 rn_reserved;
struct ll_fid rn_fid1;
struct ll_fid rn_fid2;
};
* LOV data structures
*/
-#define LOV_RAID0 0
+#define LOV_RAID0 0
+#define LOV_RAIDRR 1
+
struct lov_desc {
- __u32 ld_tgt_count; /* how many OBD's */
- __u32 ld_default_stripecount;
- __u32 ld_default_stripesize; /* in bytes */
- __u32 ld_pattern; /* RAID 0,1 etc */
+ __u32 ld_tgt_count; /* how many OBD's */
+ __u32 ld_default_stripe_count; /* how many objects are used */
+ __u64 ld_default_stripe_size; /* in bytes */
+ __u64 ld_default_stripe_offset; /* in bytes */
+ __u32 ld_pattern; /* RAID 0,1 etc */
uuid_t ld_uuid;
};
/*
* LDLM requests:
*/
-
-/* opcodes */
-#define LDLM_REPLY 0
-#define LDLM_ENQUEUE 1
-#define LDLM_CONVERT 2
-#define LDLM_CANCEL 3
-#define LDLM_CALLBACK 4
+/* opcodes -- MUST be distinct from OST/MDS opcodes */
+#define LDLM_ENQUEUE 101
+#define LDLM_CONVERT 102
+#define LDLM_CANCEL 103
+#define LDLM_BL_CALLBACK 104
+#define LDLM_CP_CALLBACK 105
#define RES_NAME_SIZE 3
#define RES_VERSION_SIZE 4
__u64 opc;
};
+/* Note this unaligned structure; as long as it's only used in ldlm_request
+ * below, we're probably fine. */
struct ldlm_resource_desc {
__u32 lr_type;
__u64 lr_name[RES_NAME_SIZE];
- __u64 lr_version[RES_VERSION_SIZE];
+ __u32 lr_version[RES_VERSION_SIZE];
};
struct ldlm_lock_desc {
struct ldlm_reply {
__u32 lock_flags;
- __u64 lock_resource_name[3];
+ __u32 lock_mode;
+ __u64 lock_resource_name[RES_NAME_SIZE];
struct lustre_handle lock_handle;
struct ldlm_extent lock_extent; /* XXX make this policy 1 &2 */
__u64 lock_policy_res1;
__u64 lock_policy_res2;
};
-
#endif