MDS replay object destroys after recovery could meet non-existing
objects, skip it before following futile actions.
Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: Ibf233a07fa73d3226fdde5e2c020e73f51428f74
Reviewed-on: http://review.whamcloud.com/6266
Tested-by: Hudson
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
fo = ofd_object_find(env, ofd, fid);
if (IS_ERR(fo))
RETURN(PTR_ERR(fo));
fo = ofd_object_find(env, ofd, fid);
if (IS_ERR(fo))
RETURN(PTR_ERR(fo));
+ if (!ofd_object_exists(fo))
+ GOTO(out, rc = -ENOENT);
/* Tell the clients that the object is gone now and that they should
* throw away any cached pages. */
/* Tell the clients that the object is gone now and that they should
* throw away any cached pages. */
LASSERT(fo != NULL);
rc = ofd_object_destroy(env, fo, orphan);
LASSERT(fo != NULL);
rc = ofd_object_destroy(env, fo, orphan);
ofd_object_put(env, fo);
RETURN(rc);
}
ofd_object_put(env, fo);
RETURN(rc);
}