struct ofd_seq {
cfs_list_t os_list;
- struct ost_id os_oi;
+ struct ost_id os_oi;
spinlock_t os_last_oid_lock;
struct mutex os_create_lock;
cfs_atomic_t os_refc;
unsigned long os_destroys_in_progress:1;
};
-#define os_seq os_oi.oi_seq
-#define os_last_oid os_oi.oi_id
-
struct ofd_device {
struct dt_device ofd_dt_dev;
struct dt_device *ofd_osd;
return info;
}
-/* The same as osc_build_res_name() */
-static inline void ofd_build_resid(const struct lu_fid *fid,
- struct ldlm_res_id *resname)
-{
- struct ost_id oid;
-
- if (fid_is_idif(fid)) {
- oid.oi_id = fid_idif_id(fid_seq(fid), fid_oid(fid),
- fid_ver(fid));
- oid.oi_seq = FID_SEQ_OST_MDT0;
- } else {
- oid.oi_id = fid_oid(fid);
- oid.oi_seq = fid_seq(fid);
- }
- ostid_build_res_name(&oid, resname);
-}
-
-static inline void ofd_fid_from_resid(struct lu_fid *fid,
- const struct ldlm_res_id *name)
-{
- /* To keep compatiblity, res[0] = oi_id, res[1] = oi_seq. */
- struct ost_id ostid;
-
- ostid.oi_id = name->name[LUSTRE_RES_ID_SEQ_OFF];
- ostid.oi_seq = name->name[LUSTRE_RES_ID_VER_OID_OFF];
- fid_ostid_unpack(fid, &ostid, 0);
-}
-
static inline void ofd_oti2info(struct ofd_thread_info *info,
struct obd_trans_info *oti)
{
static inline void ofd_prepare_fidea(struct filter_fid *ff, struct obdo *oa)
{
if (!(oa->o_valid & OBD_MD_FLGROUP))
- oa->o_seq = 0;
+ ostid_set_seq_mdt0(&oa->o_oi);
/* packing fid and converting it to LE for storing into EA.
* Here ->o_stripe_idx should be filled by LOV and rest of
* fields - by client. */