};
enum dt_index_flags {
- /** index supports variable sized keys */
- DT_IND_VARKEY = 1 << 0,
- /** index supports variable sized records */
- DT_IND_VARREC = 1 << 1,
- /** index can be modified */
- DT_IND_UPDATE = 1 << 2,
- /** index supports records with non-unique (duplicate) keys */
- DT_IND_NONUNQ = 1 << 3,
- /**
- * index support fixed-size keys sorted with natural numerical way
- * and is able to return left-side value if no exact value found
- */
- DT_IND_RANGE = 1 << 4,
+ /** index supports variable sized keys */
+ DT_IND_VARKEY = BIT(0),
+ /** index supports variable sized records */
+ DT_IND_VARREC = BIT(1),
+ /** index can be modified */
+ DT_IND_UPDATE = BIT(2),
+ /** index supports records with non-unique (duplicate) keys */
+ DT_IND_NONUNQ = BIT(3),
+ /**
+ * index support fixed-size keys sorted with natural numerical way
+ * and is able to return left-side value if no exact value found
+ */
+ DT_IND_RANGE = BIT(4),
};
/* for dt_read_lock() and dt_write_lock() object lock rule */
return o->do_ops->do_object_sync(env, o, start, end);
}
+static inline int dt_fid_alloc(const struct lu_env *env,
+ struct dt_device *d,
+ struct lu_fid *fid,
+ struct lu_object *parent,
+ const struct lu_name *name)
+{
+ struct lu_device *l = dt2lu_dev(d);
+
+ return l->ld_ops->ldo_fid_alloc(env, l, fid, parent, name);
+}
+
int dt_declare_version_set(const struct lu_env *env, struct dt_object *o,
struct thandle *th);
void dt_version_set(const struct lu_env *env, struct dt_object *o,