+int fid_is_on_ost(struct osd_thread_info *info, struct osd_device *osd,
+ const struct lu_fid *fid)
+{
+ struct lu_seq_range *range = &info->oti_seq_range;
+ int rc;
+ ENTRY;
+
+ if (fid_is_idif(fid) || fid_is_last_id(fid))
+ RETURN(1);
+
+ rc = osd_fld_lookup(info->oti_env, osd, fid, range);
+ if (rc != 0) {
+ CERROR("%s: Can not lookup fld for "DFID"\n",
+ osd2lu_dev(osd)->ld_obd->obd_name, PFID(fid));
+ RETURN(rc);
+ }
+
+ CDEBUG(D_INFO, "fid "DFID" range "DRANGE"\n", PFID(fid),
+ PRANGE(range));
+
+ if (range->lsr_flags == LU_SEQ_RANGE_OST)
+ RETURN(1);
+
+ RETURN(0);
+}
+