X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Finclude%2Fdt_object.h;h=e1d574a832ee50eef1e0df1f221718e9b12b20ae;hp=45b136ad9000f1800b4562303e8ff35aa796defe;hb=18cd3e1e28afd311e4743dab1011f85fba0e1765;hpb=a11c18cbab00d0300b8f025b45090b08ba748f5e diff --git a/lustre/include/dt_object.h b/lustre/include/dt_object.h index 45b136a..e1d574a 100644 --- a/lustre/include/dt_object.h +++ b/lustre/include/dt_object.h @@ -298,6 +298,17 @@ struct dt_device_operations { struct dt_device *dev); /** + * Wait pending quota update finish + * + * There might be a window that quota usage has been updated, + * but commit callback to reduce pending write have not been + * finished, this is used to wait all pending update done. + * + * \param[in] dev dt device + */ + void (*dt_wait_quota_pending)(struct dt_device *dev); + + /** * Start transaction commit asynchronously. * @@ -2697,6 +2708,14 @@ static inline int dt_ro(const struct lu_env *env, struct dt_device *dev) return dev->dd_ops->dt_ro(env, dev); } +static inline void dt_wait_quota_pending(struct dt_device *dev) +{ + LASSERT(dev); + LASSERT(dev->dd_ops); + if (dev->dd_ops->dt_wait_quota_pending) + dev->dd_ops->dt_wait_quota_pending(dev); +} + static inline int dt_declare_insert(const struct lu_env *env, struct dt_object *dt, const struct dt_rec *rec,