Whamcloud - gitweb
LU-1057 quota: speed up lookup in osc_quota_chkdq
[fs/lustre-release.git] / lustre / include / dt_object.h
index ff143fe..f95563a 100644 (file)
@@ -102,9 +102,14 @@ typedef void (*dt_cb_t)(struct lu_env *env, struct thandle *th,
  * Special per-transaction callback for cases when just commit callback
  * is needed and per-device callback are not convenient to use
  */
+#define TRANS_COMMIT_CB_MAGIC  0xa0a00a0a
+#define MAX_COMMIT_CB_STR_LEN  32
+
 struct dt_txn_commit_cb {
-        cfs_list_t dcb_linkage;
-        dt_cb_t    dcb_func;
+       cfs_list_t      dcb_linkage;
+       dt_cb_t         dcb_func;
+       __u32           dcb_magic;
+       char            dcb_name[MAX_COMMIT_CB_STR_LEN];
 };
 
 /**
@@ -215,6 +220,9 @@ enum dt_index_flags {
 extern const struct dt_index_features dt_directory_features;
 extern const struct dt_index_features dt_otable_features;
 
+/* index features supported by the accounting objects */
+extern const struct dt_index_features dt_acct_features;
+
 /**
  * This is a general purpose dt allocation hint.
  * It now contains the parent object.
@@ -827,10 +835,11 @@ static inline int dt_trans_stop(const struct lu_env *env,
 }
 
 static inline int dt_trans_cb_add(struct thandle *th,
-                                  struct dt_txn_commit_cb *dcb)
+                                 struct dt_txn_commit_cb *dcb)
 {
-        LASSERT(th->th_dev->dd_ops->dt_trans_cb_add);
-        return th->th_dev->dd_ops->dt_trans_cb_add(th, dcb);
+       LASSERT(th->th_dev->dd_ops->dt_trans_cb_add);
+       dcb->dcb_magic = TRANS_COMMIT_CB_MAGIC;
+       return th->th_dev->dd_ops->dt_trans_cb_add(th, dcb);
 }
 /** @} dt */