* fid constants
*/
enum {
+ /** LASTID file has zero OID */
+ LUSTRE_FID_LASTID_OID = 0UL,
/** initial fid id value */
LUSTRE_FID_INIT_OID = 1UL
};
static inline int fid_is_llog(const struct lu_fid *fid)
{
- /* file with OID == 1 is not llog but contains last oid */
- return fid_seq_is_llog(fid_seq(fid)) && fid_oid(fid) > 1;
+ /* file with OID == 0 is not llog but contains last oid */
+ return fid_seq_is_llog(fid_seq(fid)) && fid_oid(fid) > 0;
}
static inline int fid_seq_is_rsvd(const __u64 seq)
/* Check whether the fid is for LAST_ID */
static inline int fid_is_last_id(const struct lu_fid *fid)
{
- return (fid_is_idif(fid) || fid_is_norm(fid) || fid_is_echo(fid)) &&
- fid_oid(fid) == 0;
+ return (fid_oid(fid) == 0);
}
/**
extern void lustre_swab_llog_hdr (struct llog_log_hdr *h);
extern void lustre_swab_llogd_conn_body (struct llogd_conn_body *d);
extern void lustre_swab_llog_rec(struct llog_rec_hdr *rec);
+extern void lustre_swab_llog_id(struct llog_logid *lid);
struct lustre_cfg;
extern void lustre_swab_lustre_cfg(struct lustre_cfg *lcfg);