When destroying MDT objects with IGIF FIDs, the following assertion
may occur:
LustreError: 28147:0:(osd_internal.h:665:osd_fid2oi()) ASSERTION(
!fid_is_igif(fid) ) failed:
LustreError: 28147:0:(osd_internal.h:665:osd_fid2oi()) LBUG
Pid: 28147, comm: mdt_00
With call traces like this:
osd_oi_delete()
osd_object_destroy()
mdd_object_kill()
mdd_finish_unlink()
mdd_unlink()
This patch fixes osd_oi_delete() to avoid trying to delete IGIF FIDs
from OI. Also, the assertion is enhanced to print more debugging
information.
Signed-off-by: Li Wei <liwei@whamcloud.com>
Change-Id: I95fe9db8aec53a496a8dc84c87594ed81f3fe106
Signed-off-by: Li Wei <liwei@whamcloud.com>
Reviewed-on: http://review.whamcloud.com/3120
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Hudson
static inline struct osd_oi *osd_fid2oi(struct osd_device *osd,
const struct lu_fid *fid)
{
static inline struct osd_oi *osd_fid2oi(struct osd_device *osd,
const struct lu_fid *fid)
{
- LASSERT(!fid_is_idif(fid));
- LASSERT(!fid_is_igif(fid));
- 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 */
+ LASSERTF(!fid_is_idif(fid), DFID"\n", PFID(fid));
+ LASSERTF(!fid_is_igif(fid), DFID"\n", PFID(fid));
+ 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[osd_oi_fid2idx(osd, fid)];
}
return osd->od_oi_table[osd_oi_fid2idx(osd, fid)];
}
{
struct lu_fid *oi_fid = &info->oti_fid2;
{
struct lu_fid *oi_fid = &info->oti_fid2;
+ if (fid_is_igif(fid))
+ return 0;
+
LASSERT(fid_seq(fid) != FID_SEQ_LOCAL_FILE);
if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)
LASSERT(fid_seq(fid) != FID_SEQ_LOCAL_FILE);
if (fid_is_idif(fid) || fid_seq(fid) == FID_SEQ_LLOG)