Details
-
Improvement
-
Resolution: Unresolved
-
Minor
-
None
-
None
-
None
-
3
-
9223372036854775807
Description
/**
* Initialize position using cookie/hash.
*
* Initializes the current position of the iterator to one
* described by the cookie/hash as returned by ->store()
* previously.
*
* \param[in] env execution environment for this thread
* \param[in] di iterator
* \param[in] hash cookie/hash value
*
* \retval positive if current position points to
* record with least cookie not larger
* than cookie
* \retval 0 if current position matches cookie
* \retval negative negated errno on error
*/
int (*load)(const struct lu_env *env,
const struct dt_it *di,
__u64 hash);
dt_index_walk():
rc = iops->load(env, it, rdpg->rp_hash);
if (rc == 0) {
/*
* Iterator didn't find record with exactly the key requested.
*
* It is currently either
*
* - positioned above record with key less than
* requested---skip it.
* - or not positioned at all (is in IAM_IT_SKEWED
* state)---position it on the next item.
*/
rc = iops->next(env, it);
} else if (rc > 0) {
rc = 0;
} else {
if (rc == -ENODATA)
rc = 0;
GOTO(out, rc);
}