#include <dt_object.h>
#include <lustre_lfsck.h>
#include <lustre_fid.h>
-#include <lustre_capa.h>
#include <lprocfs_status.h>
#include <lustre_log.h>
#include <lustre_linkea.h>
extern const char orph_index_name[];
int mdd_la_get(const struct lu_env *env, struct mdd_object *obj,
- struct lu_attr *la, struct lustre_capa *capa);
+ struct lu_attr *la);
int mdd_attr_get(const struct lu_env *env, struct md_object *obj,
struct md_attr *ma);
int mdd_attr_set(const struct lu_env *env, struct md_object *obj,
int mdd_permission(const struct lu_env *env,
struct md_object *pobj, struct md_object *cobj,
struct md_attr *ma, int mask);
-int mdd_capa_get(const struct lu_env *env, struct md_object *obj,
- struct lustre_capa *capa, int renewal);
int mdd_generic_thread_start(struct mdd_generic_thread *thread,
int (*func)(void *), void *data, char *name);
void mdd_generic_thread_stop(struct mdd_generic_thread *thread);
return mdd2lu_dev(mdd)->ld_site->ld_seq_site;
}
-static inline struct lustre_capa *mdd_object_capa(const struct lu_env *env,
- const struct mdd_object *obj)
-{
- struct lu_capainfo *lci = lu_capainfo_get(env);
- const struct lu_fid *fid = mdo2fid(obj);
- int i;
-
- /* NB: in mdt_init0 */
- if (lci == NULL)
- return BYPASS_CAPA;
-
- for (i = 0; i < LU_CAPAINFO_MAX; i++)
- if (lu_fid_eq(&lci->lci_fid[i], fid))
- return lci->lci_capa[i];
- return NULL;
-}
-
-static inline void mdd_set_capainfo(const struct lu_env *env, int offset,
- const struct mdd_object *obj,
- struct lustre_capa *capa)
-{
- struct lu_capainfo *lci = lu_capainfo_get(env);
- const struct lu_fid *fid = mdo2fid(obj);
-
- LASSERT(offset >= 0 && offset < LU_CAPAINFO_MAX);
- /* NB: in mdt_init0 */
- if (lci == NULL)
- return;
-
- lci->lci_fid[offset] = *fid;
- lci->lci_capa[offset] = capa;
-}
-
static inline const char *mdd_obj_dev_name(const struct mdd_object *obj)
{
return lu_dev_name(obj->mod_obj.mo_lu.lo_dev);
/* mdd inline func for calling osd_dt_object ops */
static inline int mdo_attr_get(const struct lu_env *env, struct mdd_object *obj,
- struct lu_attr *la, struct lustre_capa *capa)
+ struct lu_attr *la)
{
struct dt_object *next = mdd_object_child(obj);
- return dt_attr_get(env, next, la, capa);
+ return dt_attr_get(env, next, la);
}
static inline int mdo_declare_attr_set(const struct lu_env *env,
static inline int mdo_attr_set(const struct lu_env *env,
struct mdd_object *obj,
const struct lu_attr *la,
- struct thandle *handle,
- struct lustre_capa *capa)
+ struct thandle *handle)
{
struct dt_object *next = mdd_object_child(obj);
if (!mdd_object_exists(obj))
return -ENOENT;
- return dt_attr_set(env, next, la, handle, capa);
+ return dt_attr_set(env, next, la, handle);
}
static inline int mdo_xattr_get(const struct lu_env *env,struct mdd_object *obj,
- struct lu_buf *buf, const char *name,
- struct lustre_capa *capa)
+ struct lu_buf *buf, const char *name)
{
struct dt_object *next = mdd_object_child(obj);
- return dt_xattr_get(env, next, buf, name, capa);
+ return dt_xattr_get(env, next, buf, name);
}
static inline int mdo_declare_xattr_set(const struct lu_env *env,
static inline int mdo_xattr_set(const struct lu_env *env,struct mdd_object *obj,
const struct lu_buf *buf, const char *name,
- int fl, struct thandle *handle,
- struct lustre_capa *capa)
+ int fl, struct thandle *handle)
{
struct dt_object *next = mdd_object_child(obj);
if (!mdd_object_exists(obj))
return -ENOENT;
- return dt_xattr_set(env, next, buf, name, fl, handle, capa);
+ return dt_xattr_set(env, next, buf, name, fl, handle);
}
static inline int mdo_declare_xattr_del(const struct lu_env *env,
}
static inline int mdo_xattr_del(const struct lu_env *env,struct mdd_object *obj,
- const char *name, struct thandle *handle,
- struct lustre_capa *capa)
+ const char *name, struct thandle *handle)
{
struct dt_object *next = mdd_object_child(obj);
if (!mdd_object_exists(obj))
return -ENOENT;
- return dt_xattr_del(env, next, name, handle, capa);
+ return dt_xattr_del(env, next, name, handle);
}
static inline int
mdo_xattr_list(const struct lu_env *env, struct mdd_object *obj,
- struct lu_buf *buf, struct lustre_capa *capa)
+ struct lu_buf *buf)
{
struct dt_object *next = mdd_object_child(obj);
if (!mdd_object_exists(obj))
return -ENOENT;
- return dt_xattr_list(env, next, buf, capa);
+ return dt_xattr_list(env, next, buf);
}
static inline
return dt_destroy(env, next, handle);
}
-static inline struct obd_capa *
-mdo_capa_get(const struct lu_env *env, struct mdd_object *obj,
- struct lustre_capa *old, __u64 opc)
-{
- struct dt_object *next = mdd_object_child(obj);
-
- if (!mdd_object_exists(obj))
- return ERR_PTR(-ENOENT);
-
- return dt_capa_get(env, next, old, opc);
-}
-
#endif