struct qsd_type_info;
struct qsd_fsinfo;
+extern struct kmem_cache *upd_kmem;
+
/*
* A QSD instance implements quota enforcement support for a given OSD.
* The instance can be created via qsd_init() and then freed with qsd_fini().
/* name of service which created this qsd instance */
char qsd_svname[MAX_OBD_NAME];
- /* pool ID is always 0 for now */
- int qsd_pool_id;
-
/* dt_device associated with this qsd instance */
struct dt_device *qsd_dev;
spinlock_t qsd_adjust_lock;
/* dedicated thread for updating slave index files. */
- struct ptlrpc_thread qsd_upd_thread;
+ struct task_struct *qsd_upd_task;
/* list of update tasks */
struct list_head qsd_upd_list;
struct lquota_site *qqi_site;
/* Reintegration thread */
- struct ptlrpc_thread qqi_reint_thread;
+ struct task_struct *qqi_reint_task;
/* statistics on operations performed by this slave */
struct lprocfs_stats *qqi_stats;
static inline
struct qsd_thread_info *qsd_info(const struct lu_env *env)
{
- struct qsd_thread_info *info;
-
- info = lu_context_key_get(&env->le_ctx, &qsd_thread_key);
- if (info == NULL) {
- lu_env_refill((struct lu_env *)env);
- info = lu_context_key_get(&env->le_ctx, &qsd_thread_key);
- }
- LASSERT(info);
- return info;
+ return lu_env_info(env, &qsd_thread_key);
}
/* helper function to check whether a given quota type is enabled */
pool = qsd->qsd_is_md ? LQUOTA_RES_MD : LQUOTA_RES_DT;
enabled = qsd->qsd_fsinfo->qfs_enabled[pool - LQUOTA_FIRST_RES];
- return enabled & (1 << type);
+ return enabled & BIT(type);
}
/* helper function to set new qunit and compute associated qtune value */