+int osd_oi_update(struct osd_thread_info *info, struct osd_device *osd,
+ const struct lu_fid *fid, const struct osd_inode_id *id,
+ handle_t *th, enum oi_check_flags flags)
+{
+ struct lu_fid *oi_fid = &info->oti_fid2;
+ struct osd_inode_id *oi_id = &info->oti_id2;
+ int rc = 0;
+
+ if (unlikely(fid_is_last_id(fid)))
+ return osd_obj_spec_update(info, osd, fid, id, th);
+
+ if (fid_is_on_ost(info, osd, fid, flags) || fid_is_llog(fid))
+ return osd_obj_map_update(info, osd, fid, id, th);
+
+ fid_cpu_to_be(oi_fid, fid);
+ osd_id_pack(oi_id, id);
+ rc = osd_oi_iam_refresh(info, osd_fid2oi(osd, fid),
+ (const struct dt_rec *)oi_id,
+ (const struct dt_key *)oi_fid, th, false);
+ if (rc != 0)
+ return rc;
+
+ if (unlikely(fid_seq(fid) == FID_SEQ_LOCAL_FILE))
+ rc = osd_obj_spec_update(info, osd, fid, id, th);
+ return rc;
+}
+