Lines Matching defs:key

45  * @key: key
47 * @ptrp: place to store the value associated to @key
49 * Description: nilfs_bmap_lookup_at_level() finds a record whose key
50 * matches @key in the block at @level of the bmap.
52 * Return Value: On success, 0 is returned and the record associated with @key
60 * %-ENOENT - A record associated with @key does not exist.
62 int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level,
69 ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp);
94 int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp,
100 ret = bmap->b_ops->bop_lookup_contig(bmap, key, ptrp, maxblocks);
106 static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr)
113 ret = bmap->b_ops->bop_check_insert(bmap, key);
120 bmap, key, ptr, keys, ptrs, n);
129 return bmap->b_ops->bop_insert(bmap, key, ptr);
133 * nilfs_bmap_insert - insert a new key-record pair into a bmap
135 * @key: key
138 * Description: nilfs_bmap_insert() inserts the new key-record pair specified
139 * by @key and @rec into @bmap.
148 * %-EEXIST - A record associated with @key already exist.
150 int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec)
155 ret = nilfs_bmap_do_insert(bmap, key, rec);
161 static int nilfs_bmap_do_delete(struct nilfs_bmap *bmap, __u64 key)
168 ret = bmap->b_ops->bop_check_delete(bmap, key);
175 bmap, key, keys, ptrs, n);
184 return bmap->b_ops->bop_delete(bmap, key);
188 * nilfs_bmap_seek_key - seek a valid entry and return its key
190 * @start: start key number
191 * @keyp: place to store valid key
193 * Description: nilfs_bmap_seek_key() seeks a valid key on @bmap
232 * nilfs_bmap_delete - delete a key-record pair from a bmap
234 * @key: key
236 * Description: nilfs_bmap_delete() deletes the key-record pair specified by
237 * @key from @bmap.
246 * %-ENOENT - A record associated with @key does not exist.
248 int nilfs_bmap_delete(struct nilfs_bmap *bmap, __u64 key)
253 ret = nilfs_bmap_do_delete(bmap, key);
259 static int nilfs_bmap_do_truncate(struct nilfs_bmap *bmap, __u64 key)
271 while (key <= lastkey) {
286 * nilfs_bmap_truncate - truncate a bmap to a specified key
288 * @key: key
290 * Description: nilfs_bmap_truncate() removes key-record pairs whose keys are
291 * greater than or equal to @key from @bmap.
300 int nilfs_bmap_truncate(struct nilfs_bmap *bmap, __u64 key)
305 ret = nilfs_bmap_do_truncate(bmap, key);
399 * @key: key
402 * Description: nilfs_bmap_mark() marks the block specified by @key and @level
412 int nilfs_bmap_mark(struct nilfs_bmap *bmap, __u64 key, int level)
420 ret = bmap->b_ops->bop_mark(bmap, key, level);
454 __u64 key;
456 key = page_index(bh->b_page) << (PAGE_SHIFT -
459 key++;
461 return key;
464 __u64 nilfs_bmap_find_target_seq(const struct nilfs_bmap *bmap, __u64 key)
468 diff = key - bmap->b_last_allocated_key;