Whamcloud - gitweb
LU-16351 llite: Linux 6.1 prandom, folios_contig, vma_iterator
[fs/lustre-release.git] / lustre / quota / qsd_internal.h
index 7a015f2..b530943 100644 (file)
@@ -33,6 +33,8 @@
 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().
@@ -82,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;
@@ -109,7 +111,10 @@ 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 */
+                               qsd_root_prj_enable:1;
 
 };
 
@@ -153,7 +158,7 @@ struct qsd_qtype_info {
        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;
@@ -279,7 +284,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 */
@@ -331,7 +336,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 *);