-join:
- rc1 = osd_scrub_start(dev, flags);
- LCONSOLE_WARN("%.16s: trigger OI scrub by RPC "
- "for the "DFID" with flags 0x%x,"
- " rc = %d\n", osd_name(dev),
- PFID(fid), flags, rc1);
- if (rc1 == 0 || rc1 == -EALREADY) {
- if (inode != NULL && !IS_ERR(inode)) {
- LASSERT(remote);
-
- osd_add_oi_cache(info, dev, id,
- fid);
- osd_oii_insert(dev, oic, true);
- } else {
- result = -EINPROGRESS;
- }
- } else {
- result = -EREMCHG;
- }
- } else {
- result = -EREMCHG;
- }
+trigger:
+ /* We still have chance to get the valid inode: for the
+ * object which is referenced by remote name entry, the
+ * object on the local MDT will be linked under the dir
+ * of "/REMOTE_PARENT_DIR" with its FID string as name.
+ *
+ * We do not know whether the object for the given FID
+ * is referenced by some remote name entry or not, and
+ * especially for DNE II, a multiple-linked object may
+ * have many name entries reside on many MDTs.
+ *
+ * To simplify the operation, OSD will not distinguish
+ * more, just lookup "/REMOTE_PARENT_DIR". Usually, it
+ * only happened for the RPC from other MDT during the
+ * OI scrub, or for the client side RPC with FID only,
+ * such as FID to path, or from old connected client. */
+ if (!remote && !fid_is_on_ost(info, dev, fid, OI_CHECK_FLD)) {
+ rc1 = osd_lookup_in_remote_parent(info, dev, fid, id);
+ if (!rc1) {
+ remote = true;
+ trusted = true;
+ flags |= SS_AUTO_PARTIAL;
+ flags &= ~SS_AUTO_FULL;
+ goto iget;