X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fquota%2Flquota_internal.h;h=f8f8340cdd6a4d3e6ec3a3978fa630b8d87db730;hb=416e67222b769df490a8be034ef987a596dd8dff;hp=f7d30b33998501024d18c6c408ffe1b447c8a44a;hpb=4ce3219eb8e6a07c5c37e4b425b29195488005c3;p=fs%2Flustre-release.git diff --git a/lustre/quota/lquota_internal.h b/lustre/quota/lquota_internal.h index f7d30b3..f8f8340 100644 --- a/lustre/quota/lquota_internal.h +++ b/lustre/quota/lquota_internal.h @@ -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 */