lquota entries are allocated with OBD_SLAB_ALLOC_PTR() and should be
freed with OBD_SLAB_FREE_PTR() instead of OBD_FREE_PTR().
This issue has no real side effect since the Linux VM picks up the
correct slab.
This patch also fixes some incorrect error messages.
Signed-off-by: Johann Lombardi <johann.lombardi@intel.com>
Change-Id: I07effa69ae877537b5339fe1c20fabce44468822
Reviewed-on: http://review.whamcloud.com/11289
Tested-by: Jenkins
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
#define LQUOTA_BUMP_VER 0x1
#define LQUOTA_SET_VER 0x2
#define LQUOTA_BUMP_VER 0x1
#define LQUOTA_SET_VER 0x2
+extern struct kmem_cache *lqe_kmem;
+
/* helper routine to get/put reference on lquota_entry */
static inline void lqe_getref(struct lquota_entry *lqe)
{
/* helper routine to get/put reference on lquota_entry */
static inline void lqe_getref(struct lquota_entry *lqe)
{
LASSERT(lqe != NULL);
LASSERT(atomic_read(&lqe->lqe_ref) > 0);
if (atomic_dec_and_test(&lqe->lqe_ref))
LASSERT(lqe != NULL);
LASSERT(atomic_read(&lqe->lqe_ref) > 0);
if (atomic_dec_and_test(&lqe->lqe_ref))
+ OBD_SLAB_FREE_PTR(lqe, lqe_kmem);
}
static inline int lqe_is_master(struct lquota_entry *lqe)
}
static inline int lqe_is_master(struct lquota_entry *lqe)
void lquota_generate_fid(struct lu_fid *, int, int, int);
int lquota_extract_fid(const struct lu_fid *, int *, int *, int *);
const struct dt_index_features *glb_idx_feature(struct lu_fid *);
void lquota_generate_fid(struct lu_fid *, int, int, int);
int lquota_extract_fid(const struct lu_fid *, int *, int *, int *);
const struct dt_index_features *glb_idx_feature(struct lu_fid *);
-extern struct kmem_cache *lqe_kmem;
/* lquota_entry.c */
/* site create/destroy */
/* lquota_entry.c */
/* site create/destroy */
struct lu_env *env;
struct lquota_entry *lqe;
struct lu_env *env;
struct lquota_entry *lqe;
- LDLM_DEBUG(lock, "canceling global quota lock");
+ LDLM_DEBUG(lock, "canceling ID quota lock");
lqe = qsd_id_ast_data_get(lock, true);
if (lqe == NULL)
break;
lqe = qsd_id_ast_data_get(lock, true);
if (lqe == NULL)
break;
if (qqi->qqi_slv_ver != qti->qti_slv_ver) {
rc = qsd_reint_index(env, qqi, false);
if (rc) {
if (qqi->qqi_slv_ver != qti->qti_slv_ver) {
rc = qsd_reint_index(env, qqi, false);
if (rc) {
- CWARN("%s: Reint slave for "DFID" failed. %d\n",
+ CWARN("%s: reintegration for "DFID" failed with %d\n",
qsd->qsd_svname, PFID(&qqi->qqi_slv_fid), rc);
GOTO(out_lock, rc);
}
qsd->qsd_svname, PFID(&qqi->qqi_slv_fid), rc);
GOTO(out_lock, rc);
}
/* Step 4: start reconciliation for each enforced ID */
rc = qsd_reconciliation(env, qqi);
if (rc)
/* Step 4: start reconciliation for each enforced ID */
rc = qsd_reconciliation(env, qqi);
if (rc)
- CWARN("%s: reconciliation failed. "DFID", %d\n",
- qsd->qsd_svname, PFID(&qti->qti_fid), rc);
+ CWARN("%s: reconciliation for "DFID" failed with %d\n",
+ qsd->qsd_svname, PFID(&qqi->qqi_slv_fid), rc);