#ifndef _MDD_INTERNAL_H
#define _MDD_INTERNAL_H
-#include <asm/semaphore.h>
-
#include <lustre_acl.h>
#include <lustre_eacl.h>
#include <obd.h>
}
#endif
+/* PDO lock is unnecessary for current MDT stack because operations
+ * are already protected by ldlm lock */
+#define MDD_DISABLE_PDO_LOCK 1
+
enum mdd_txn_op {
MDD_TXN_OBJECT_DESTROY_OP = 0,
MDD_TXN_OBJECT_CREATE_OP,
struct mdd_changelog {
cfs_spinlock_t mc_lock; /* for index */
- cfs_waitq_t mc_waitq;
int mc_flags;
int mc_mask;
__u64 mc_index;
void mdd_lov_create_finish(const struct lu_env *env, struct mdd_device *mdd,
struct lov_mds_md *lmm, int lmm_size,
const struct md_op_spec *spec);
+int mdd_file_lock(const struct lu_env *env, struct md_object *obj,
+ struct lov_mds_md *lmm, struct ldlm_extent *extent,
+ struct lustre_handle *lockh);
+int mdd_file_unlock(const struct lu_env *env, struct md_object *obj,
+ struct lov_mds_md *lmm, struct lustre_handle *lockh);
int mdd_get_md(const struct lu_env *env, struct mdd_object *obj,
void *md, int *md_size, const char *name);
int mdd_get_md_locked(const struct lu_env *env, struct mdd_object *obj,
struct md_attr *ma);
int mdd_iattr_get(const struct lu_env *env, struct mdd_object *mdd_obj,
struct md_attr *ma);
+int mdd_attr_get_internal(const struct lu_env *env, struct mdd_object *mdd_obj,
+ struct md_attr *ma);
int mdd_attr_get_internal_locked(const struct lu_env *env,
struct mdd_object *mdd_obj,
struct md_attr *ma);
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_changelog(const struct lu_env *env, enum changelog_rec_type type,
+ int flags, struct md_object *obj);
/* mdd_quota.c*/
#ifdef HAVE_QUOTA_SUPPORT
int mdd_quota_notify(const struct lu_env *env, struct md_device *m);