Whamcloud - gitweb
LU-15283 quota: deadlock between reint & lquota_wb
[fs/lustre-release.git] / lustre / quota / qsd_internal.h
index d0654c8..b590b84 100644 (file)
@@ -84,7 +84,7 @@ struct qsd_instance {
        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;
@@ -111,7 +111,9 @@ struct qsd_instance {
                                qsd_prepared:1, /* qsd_prepare() successfully
                                                  * called */
                                qsd_exp_valid:1,/* qsd_exp is now valid */
-                               qsd_stopping:1; /* qsd_instance is stopping */
+                               qsd_stopping:1, /* qsd_instance is stopping */
+                               qsd_updating:1, /* qsd is updating record */
+                               qsd_exclusive:1; /* upd exclusive with reint */
 
 };
 
@@ -281,7 +283,7 @@ static inline int qsd_type_enabled(struct qsd_instance *qsd, int type)
        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 */
@@ -333,7 +335,7 @@ static inline int qsd_wait_timeout(struct qsd_instance *qsd)
 }
 
 /* qsd_entry.c */
-extern struct lquota_entry_operations qsd_lqe_ops;
+extern const struct lquota_entry_operations qsd_lqe_ops;
 int qsd_refresh_usage(const struct lu_env *, struct lquota_entry *);
 int qsd_update_index(const struct lu_env *, struct qsd_qtype_info *,
                     union lquota_id *, bool, __u64, void *);