Whamcloud - gitweb
LU-12036 ofd: add "no_precreate" mount option
[fs/lustre-release.git] / lustre / quota / lquota_internal.h
index f7d30b3..f8f8340 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
  * Use is subject to license terms.
  */
 
@@ -80,8 +80,8 @@ struct lquota_entry_operations {
 
        /* Print debug information about a given lquota entry */
        void (*lqe_debug)(struct lquota_entry *, void *,
-                         struct libcfs_debug_msg_data *, const char *,
-                         va_list);
+                         struct libcfs_debug_msg_data *,
+                         struct va_format *vaf);
 };
 
 /* Per-ID information specific to the quota master target */
@@ -178,11 +178,12 @@ struct lquota_entry {
        } u;
 
        /* flags describing the state of the lquota_entry */
-       unsigned long   lqe_enforced:1,/* quota enforced or not */
-                       lqe_uptodate:1,/* successfully read from disk */
-                       lqe_edquot:1,  /* id out of quota space on QMT */
-                       lqe_gl:1,      /* glimpse is in progress */
-                       lqe_nopreacq:1;/* pre-acquire disabled */
+       unsigned long   lqe_enforced:1,   /* quota enforced or not */
+                       lqe_uptodate:1,   /* successfully read from disk */
+                       lqe_edquot:1,     /* id out of quota space on QMT */
+                       lqe_gl:1,         /* glimpse is in progress */
+                       lqe_nopreacq:1,   /* pre-acquire disabled */
+                       lqe_is_default:1; /* the default quota is used */
 };
 
 /* Compartment within which lquota_entry are unique.
@@ -333,15 +334,7 @@ extern struct lu_context_key lquota_thread_key;
 static inline
 struct lquota_thread_info *lquota_info(const struct lu_env *env)
 {
-       struct lquota_thread_info       *info;
-
-       info = lu_context_key_get(&env->le_ctx, &lquota_thread_key);
-       if (info == NULL) {
-               lu_env_refill((struct lu_env *)env);
-               info = lu_context_key_get(&env->le_ctx, &lquota_thread_key);
-       }
-       LASSERT(info);
-       return info;
+       return lu_env_info(env, &lquota_thread_key);
 }
 
 #define req_is_acq(flags)    ((flags & QUOTA_DQACQ_FL_ACQ) != 0)
@@ -393,8 +386,8 @@ void lquota_lqe_debug0(struct lquota_entry *lqe,
 /* lquota_lib.c */
 struct dt_object *acct_obj_lookup(const struct lu_env *, struct dt_device *,
                                  int);
-void lquota_generate_fid(struct lu_fid *, int, int, int);
-int lquota_extract_fid(const struct lu_fid *, int *, int *, int *);
+void lquota_generate_fid(struct lu_fid *, int, int);
+int lquota_extract_fid(const struct lu_fid *, int *, int *);
 const struct dt_index_features *glb_idx_feature(struct lu_fid *);
 
 /* lquota_entry.c */