/** index can be modified */
DT_IND_UPDATE = 1 << 2,
/** index supports records with non-unique (duplicate) keys */
- DT_IND_NONUNQ = 1 << 3
+ 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,
};
/**
const char *filename,
struct lu_fid *fid);
+struct dt_object *dt_find_or_create(const struct lu_env *env,
+ struct dt_device *dt,
+ const struct lu_fid *fid,
+ struct dt_object_format *dof,
+ struct lu_attr *attr);
+
struct dt_object *dt_locate(const struct lu_env *env,
struct dt_device *dev,
const struct lu_fid *fid);
+static inline int dt_object_sync(const struct lu_env *env,
+ struct dt_object *o)
+{
+ LASSERT(o);
+ LASSERT(o->do_ops);
+ LASSERT(o->do_ops->do_object_sync);
+ return o->do_ops->do_object_sync(env, o);
+}
+
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,
ret = -ENOENT;
return ret;
}
+
+#define LU221_BAD_TIME (0x80000000U + 24 * 3600)
+
#endif /* __LUSTRE_DT_OBJECT_H */