+static inline struct osd_oi *
+osd_fid2oi(struct osd_device *osd, const struct lu_fid *fid)
+{
+ if (!fid_is_norm(fid))
+ return NULL;
+
+ LASSERT(osd->od_oi_table != NULL && osd->od_oi_count >= 1);
+ /* It can work even od_oi_count equals to 1 although it's unexpected,
+ * the only reason we set it to 1 is for performance measurement */
+ return &osd->od_oi_table[fid->f_seq & (osd->od_oi_count - 1)];
+}
+