X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosp%2Fosp_object.c;h=f474f43cfe73717090e99809594cb92cab6653cd;hb=refs%2Fchanges%2F62%2F7062%2F37;hp=61fe85bb76c558d08e2b0ca65623c2e5f328c09d;hpb=11db1a551172f596d1d284e8496530f9ce24ac81;p=fs%2Flustre-release.git diff --git a/lustre/osp/osp_object.c b/lustre/osp/osp_object.c index 61fe85b..f474f43 100644 --- a/lustre/osp/osp_object.c +++ b/lustre/osp/osp_object.c @@ -244,6 +244,7 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt, if (!o->opo_reserved) { /* special case, id was assigned outside of transaction * see comments in osp_declare_attr_set */ + LASSERT(d->opd_pre != NULL); spin_lock(&d->opd_pre_lock); osp_update_last_fid(d, fid); spin_unlock(&d->opd_pre_lock); @@ -267,6 +268,7 @@ static int osp_object_create(const struct lu_env *env, struct dt_object *dt, /* we might have lost precreated objects */ if (unlikely(d->opd_gap_count) > 0) { + LASSERT(d->opd_pre != NULL); spin_lock(&d->opd_pre_lock); if (d->opd_gap_count > 0) { int count = d->opd_gap_count; @@ -402,6 +404,7 @@ static void osp_object_release(const struct lu_env *env, struct lu_object *o) * this may require lu_object_put() in LOD */ if (unlikely(po->opo_reserved)) { + LASSERT(d->opd_pre != NULL); LASSERT(d->opd_pre_reserved > 0); spin_lock(&d->opd_pre_lock); d->opd_pre_reserved--; @@ -410,6 +413,14 @@ static void osp_object_release(const struct lu_env *env, struct lu_object *o) /* not needed in cache any more */ set_bit(LU_OBJECT_HEARD_BANSHEE, &o->lo_header->loh_flags); } + + if (is_ost_obj(o)) + /* XXX: Currently, NOT cache OST-object on MDT because: + * 1. it is not often accessed on MDT. + * 2. avoid up layer (such as LFSCK) to load too many + * once-used OST-objects. */ + set_bit(LU_OBJECT_HEARD_BANSHEE, &o->lo_header->loh_flags); + EXIT; }