+int accmode(const struct lu_env *env, struct lu_attr *la, int flags);
+extern struct lu_context_key mdd_thread_key;
+extern const struct lu_device_operations mdd_lu_ops;
+
+struct mdd_object *mdd_object_find(const struct lu_env *env,
+ struct mdd_device *d,
+ const struct lu_fid *f);
+int mdd_get_default_md(struct mdd_object *mdd_obj, struct lov_mds_md *lmm);
+int mdd_readpage(const struct lu_env *env, struct md_object *obj,
+ const struct lu_rdpg *rdpg);
+int mdd_declare_llog_record(const struct lu_env *env, struct mdd_device *mdd,
+ int reclen, struct thandle *handle);
+int mdd_declare_changelog_store(const struct lu_env *env,
+ struct mdd_device *mdd,
+ const struct lu_name *fname,
+ struct thandle *handle);
+int mdd_changelog(const struct lu_env *env, enum changelog_rec_type type,
+ int flags, struct md_object *obj);
+int mdd_declare_object_create_internal(const struct lu_env *env,
+ struct mdd_object *p,
+ struct mdd_object *c,
+ struct md_attr *ma,
+ struct thandle *handle,
+ const struct md_op_spec *spec);
+/* mdd_quota.c*/
+#ifdef HAVE_QUOTA_SUPPORT
+int mdd_quota_notify(const struct lu_env *env, struct md_device *m);
+int mdd_quota_setup(const struct lu_env *env, struct md_device *m,
+ void *data);
+int mdd_quota_cleanup(const struct lu_env *env, struct md_device *m);
+int mdd_quota_recovery(const struct lu_env *env, struct md_device *m);
+int mdd_quota_check(const struct lu_env *env, struct md_device *m,
+ __u32 type);
+int mdd_quota_on(const struct lu_env *env, struct md_device *m,
+ __u32 type);
+int mdd_quota_off(const struct lu_env *env, struct md_device *m,
+ __u32 type);
+int mdd_quota_setinfo(const struct lu_env *env, struct md_device *m,
+ __u32 type, __u32 id, struct obd_dqinfo *dqinfo);
+int mdd_quota_getinfo(const struct lu_env *env, const struct md_device *m,
+ __u32 type, __u32 id, struct obd_dqinfo *dqinfo);
+int mdd_quota_setquota(const struct lu_env *env, struct md_device *m,
+ __u32 type, __u32 id, struct obd_dqblk *dqblk);
+int mdd_quota_getquota(const struct lu_env *env, const struct md_device *m,
+ __u32 type, __u32 id, struct obd_dqblk *dqblk);
+int mdd_quota_getoinfo(const struct lu_env *env, const struct md_device *m,
+ __u32 type, __u32 id, struct obd_dqinfo *dqinfo);
+int mdd_quota_getoquota(const struct lu_env *env, const struct md_device *m,
+ __u32 type, __u32 id, struct obd_dqblk *dqblk);
+int mdd_quota_invalidate(const struct lu_env *env, struct md_device *m,
+ __u32 type);
+int mdd_quota_finvalidate(const struct lu_env *env, struct md_device *m,
+ __u32 type);
+#endif
+