* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 2012, Intel Corporation.
+ * Copyright (c) 2011, 2013, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* Punch object's content
* precondition: regular object, not index
*/
- int (*do_declare_punch)(const struct lu_env *, struct dt_object *,
+ int (*dbo_declare_punch)(const struct lu_env *, struct dt_object *,
__u64, __u64, struct thandle *th);
- int (*do_punch)(const struct lu_env *env, struct dt_object *dt,
+ int (*dbo_punch)(const struct lu_env *env, struct dt_object *dt,
__u64 start, __u64 end, struct thandle *th,
struct lustre_capa *capa);
};
__u32 los_last_oid;
};
+static inline struct lu_device *dt2lu_dev(struct dt_device *d)
+{
+ return &d->dd_lu_dev;
+}
+
static inline struct dt_object *lu2dt(struct lu_object *l)
{
LASSERT(l == NULL || IS_ERR(l) || lu_device_is_dt(l->lo_dev));
{
LASSERT(dt);
LASSERT(dt->do_body_ops);
- LASSERT(dt->do_body_ops->do_declare_punch);
- return dt->do_body_ops->do_declare_punch(env, dt, start, end, th);
+ LASSERT(dt->do_body_ops->dbo_declare_punch);
+ return dt->do_body_ops->dbo_declare_punch(env, dt, start, end, th);
}
static inline int dt_punch(const struct lu_env *env, struct dt_object *dt,
{
LASSERT(dt);
LASSERT(dt->do_body_ops);
- LASSERT(dt->do_body_ops->do_punch);
- return dt->do_body_ops->do_punch(env, dt, start, end, th, capa);
+ LASSERT(dt->do_body_ops->dbo_punch);
+ return dt->do_body_ops->dbo_punch(env, dt, start, end, th, capa);
}
static inline int dt_fiemap_get(const struct lu_env *env, struct dt_object *d,