static const struct dt_index_features fld_index_features = {
.dif_flags = DT_IND_UPDATE,
- .dif_keysize_min = sizeof(seqno_t),
- .dif_keysize_max = sizeof(seqno_t),
+ .dif_keysize_min = sizeof(u64),
+ .dif_keysize_max = sizeof(u64),
.dif_recsize_min = sizeof(struct lu_seq_range),
.dif_recsize_max = sizeof(struct lu_seq_range),
.dif_ptrsize = 4
* changed between declare and create.
* Because the fld entry can only be increamental, so we will only check
* whether it can be merged from the left.
+ *
+ * Caller must hold fld->lsf_lock
**/
int fld_index_create(const struct lu_env *env, struct lu_server_fld *fld,
const struct lu_seq_range *new_range, struct thandle *th)
* \retval -ve other error;
*/
int fld_index_lookup(const struct lu_env *env, struct lu_server_fld *fld,
- seqno_t seq, struct lu_seq_range *range)
+ u64 seq, struct lu_seq_range *range)
{
struct lu_seq_range *fld_rec;
struct fld_thread_info *info;
RETURN(rc);
}
+/**
+ * insert entry in fld store.
+ *
+ * \param env relevant lu_env
+ * \param fld fld store
+ * \param range range to be inserted
+ *
+ * \retval 0 success
+ * \retval -ve error
+ *
+ * Caller must hold fld->lsf_lock
+ **/
+
int fld_insert_entry(const struct lu_env *env,
struct lu_server_fld *fld,
const struct lu_seq_range *range)
int rc;
ENTRY;
+ LASSERT(mutex_is_locked(&fld->lsf_lock));
+
th = dt_trans_create(env, lu2dt_dev(fld->lsf_obj->do_lu.lo_dev));
if (IS_ERR(th))
RETURN(PTR_ERR(th));