*/
struct lu_dirent {
struct lu_fid lde_fid;
- __u32 lde_hash;
+ __u64 lde_hash;
__u16 lde_reclen;
__u16 lde_namelen;
+ __u32 lde_pad0;
char lde_name[0];
};
struct lu_dirpage {
- __u32 ldp_hash_start;
- __u32 ldp_hash_end;
+ __u64 ldp_hash_start;
+ __u64 ldp_hash_end;
__u16 ldp_flags;
+ __u16 ldp_pad;
__u32 ldp_pad0;
struct lu_dirent ldp_entries[0];
};
return le16_to_cpu(ent->lde_reclen);
}
-#define DIR_END_OFF 0xfffffffeUL
+#define DIR_END_OFF 0xfffffffffffffffeULL
struct lustre_handle {
__u64 cookie;
#define OBD_CONNECT_LRU_RESIZE 0x02000000ULL /* Lru resize feature. */
#define OBD_CONNECT_MDS_MDS 0x04000000ULL /* MDS-MDS connection*/
#define OBD_CONNECT_REAL 0x08000000ULL /* real connection */
-#define OBD_CONNECT_FID 0x10000000ULL /* FID is supported by server */
+#define OBD_CONNECT_CHANGE_QS 0x10000000ULL /*shrink/enlarge qunit size
+ *b=10600 */
#define OBD_CONNECT_CKSUM 0x20000000ULL /* support several cksum algos */
+#define OBD_CONNECT_FID 0x40000000ULL /* FID is supported by server */
/* also update obd_connect_names[] for lprocfs_rd_connect_flags()
* and lustre/utils/wirecheck.c */
OBD_CONNECT_TRUNCLOCK | OBD_CONNECT_INDEX | \
OBD_CONNECT_BRW_SIZE | OBD_CONNECT_QUOTA64 | \
OBD_CONNECT_OSS_CAPA | OBD_CONNECT_CANCELSET | \
- OBD_CONNECT_FID | \
+ OBD_CONNECT_FID | OBD_CONNECT_CKSUM | \
LRU_RESIZE_CONNECT_FLAG)
#define ECHO_CONNECT_SUPPORTED (0)
#define MGS_CONNECT_SUPPORTED (OBD_CONNECT_VERSION | OBD_CONNECT_FID)
__u32 ocd_nllg; /* non-local-lustre-group */
__u64 ocd_transno; /* first transno from client to be replayed */
__u32 ocd_group; /* MDS group on OST */
- __u32 padding1; /* also fix lustre_swab_connect */
+ __u32 ocd_cksum_types; /* supported checksum algorithms */
+ __u64 padding1; /* also fix lustre_swab_connect */
__u64 padding2; /* also fix lustre_swab_connect */
- __u64 padding3; /* also fix lustre_swab_connect */
};
extern void lustre_swab_connect(struct obd_connect_data *ocd);
/*
+ * Supported checksum algorithms. Up to 32 checksum types are supported.
+ * (32-bit mask stored in obd_connect_data::ocd_cksum_types)
+ * Please update DECLARE_CKSUM_NAME/OBD_CKSUM_ALL in obd.h when adding a new
+ * algorithm and also the OBD_FL_CKSUM* flags.
+ */
+typedef enum {
+ OBD_CKSUM_CRC32 = 0x00000001,
+ OBD_CKSUM_ADLER = 0x00000002,
+} cksum_type_t;
+
+/*
* OST requests: OBDO & OBD request records
*/
#define OBD_FL_TRUNCLOCK (0x00000800)
/*
+ * Checksum types
+ */
+#define OBD_FL_CKSUM_CRC32 (0x00001000)
+#define OBD_FL_CKSUM_ADLER (0x00002000)
+#define OBD_FL_CKSUM_ALL (OBD_FL_CKSUM_CRC32 | OBD_FL_CKSUM_ADLER)
+
+/*
* This should not be smaller than sizeof(struct lustre_handle) + sizeof(struct
* llog_cookie) + sizeof(struct ll_fid). Nevertheless struct ll_fid is not
* longer stored in o_inline, we keep this just for case.
};
extern void lustre_swab_obd_statfs (struct obd_statfs *os);
+#define OBD_STATFS_NODELAY 0x0001 /* requests should be send without delay
+ * and resends for avoid deadlocks */
/* ost_body.data values for OST_BRW */
LCK_MAXMODE
} ldlm_mode_t;
+#define LCK_MODE_NUM 7
+
typedef enum {
LDLM_PLAIN = 10,
LDLM_EXTENT = 11,
__u64 gid;
};
+static inline int ldlm_extent_overlap(struct ldlm_extent *ex1,
+ struct ldlm_extent *ex2)
+{
+ return (ex1->start <= ex2->end) && (ex2->start <= ex1->end);
+}
+
struct ldlm_inodebits {
__u64 bits;
};