X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Flustre%2Flustre_idl.h;h=9ad76d44db321fc912000e3257cd4db3b9697e5f;hp=be6b8d1819828f2c47b5e16b13541b67a7593306;hb=c1f6b32958c799412c830f35f8d16ed7275407ea;hpb=911e5fd5a3a3d98a1b7d8a30065722a3c05855bb diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/lustre_idl.h index be6b8d1..9ad76d4 100644 --- a/lustre/include/lustre/lustre_idl.h +++ b/lustre/include/lustre/lustre_idl.h @@ -54,15 +54,7 @@ #include -#if defined(__linux__) -#include -#elif defined(__APPLE__) -#include -#elif defined(__WINNT__) -#include -#else -#error Unsupported operating system. -#endif +#include /* Defn's shared with user-space. */ #include @@ -351,16 +343,18 @@ static inline int lu_fid_eq(const struct lu_fid *f0, */ 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]; }; @@ -398,7 +392,7 @@ static inline int lu_dirent_size(struct lu_dirent *ent) return le16_to_cpu(ent->lde_reclen); } -#define DIR_END_OFF 0xfffffffeUL +#define DIR_END_OFF 0xfffffffffffffffeULL struct lustre_handle { __u64 cookie; @@ -578,7 +572,7 @@ extern void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); 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) @@ -607,14 +601,25 @@ struct obd_connect_data { __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 */ @@ -674,6 +679,13 @@ typedef uint32_t obd_count; #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. @@ -853,6 +865,8 @@ struct obd_statfs { }; 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 */ @@ -1652,6 +1666,8 @@ typedef enum { LCK_MAXMODE } ldlm_mode_t; +#define LCK_MODE_NUM 7 + typedef enum { LDLM_PLAIN = 10, LDLM_EXTENT = 11, @@ -1668,6 +1684,12 @@ struct ldlm_extent { __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; };