X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_internal.h;h=8e2345832b91f897b657cb04731f1d4fc18fed0d;hp=2b2b23ea6635c0a9b069cb83b83a4e6175fef740;hb=666f6ae30ed7f0c5015f659cd274685a08bd27bc;hpb=5a8d36f40484b070cf16e17ad0ca49c6397009e3 diff --git a/lustre/mdd/mdd_internal.h b/lustre/mdd/mdd_internal.h index 2b2b23e..8e23458 100644 --- a/lustre/mdd/mdd_internal.h +++ b/lustre/mdd/mdd_internal.h @@ -26,7 +26,7 @@ * GPL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved + * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. */ /* @@ -67,6 +67,10 @@ static inline void mdd_quota_wrapper(struct lu_attr *la, unsigned int *qids) } #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, @@ -102,13 +106,12 @@ struct mdd_txn_op_descr { #define CLM_PURGE 0x40000 struct mdd_changelog { - spinlock_t mc_lock; /* for index */ - cfs_waitq_t mc_waitq; + cfs_spinlock_t mc_lock; /* for index */ int mc_flags; int mc_mask; __u64 mc_index; __u64 mc_starttime; - spinlock_t mc_user_lock; + cfs_spinlock_t mc_user_lock; int mc_lastuser; }; @@ -132,6 +135,7 @@ struct mdd_device { unsigned long mdd_atime_diff; struct mdd_object *mdd_dot_lustre; struct mdd_dot_lustre_objs mdd_dot_lustre_objs; + unsigned int mdd_sync_permission; }; enum mod_flags { @@ -184,7 +188,6 @@ struct mdd_thread_info { struct lu_name mti_name; struct obdo mti_oa; char mti_xattr_buf[LUSTRE_POSIX_ACL_MAX_SIZE]; - struct lu_fid_pack mti_pack; struct dt_allocation_hint mti_hint; struct lov_mds_md *mti_max_lmm; int mti_max_lmm_size; @@ -374,8 +377,7 @@ 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 *size); +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); @@ -387,7 +389,7 @@ int mdd_quota_setup(const struct lu_env *env, struct md_device *m, 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, - struct obd_export *exp, __u32 type); + __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, @@ -546,16 +548,7 @@ static inline const struct lu_fid *mdo2fid(const struct mdd_object *obj) return lu_object_fid(&obj->mod_obj.mo_lu); } -static inline const struct dt_rec *__mdd_fid_rec(const struct lu_env *env, - const struct lu_fid *fid) -{ - struct lu_fid_pack *pack = &mdd_env_info(env)->mti_pack; - - fid_pack(pack, fid, &mdd_env_info(env)->mti_fid2); - return (const struct dt_rec *)pack; -} - -static inline umode_t mdd_object_type(const struct mdd_object *obj) +static inline cfs_umode_t mdd_object_type(const struct mdd_object *obj) { return lu_object_attr(&obj->mod_obj.mo_lu); }