Lines Matching full:key

24 nilfs_direct_get_ptr(const struct nilfs_bmap *direct, __u64 key)  in nilfs_direct_get_ptr()  argument
26 return le64_to_cpu(*(nilfs_direct_dptrs(direct) + key)); in nilfs_direct_get_ptr()
30 __u64 key, __u64 ptr) in nilfs_direct_set_ptr() argument
32 *(nilfs_direct_dptrs(direct) + key) = cpu_to_le64(ptr); in nilfs_direct_set_ptr()
36 __u64 key, int level, __u64 *ptrp) in nilfs_direct_lookup() argument
40 if (key > NILFS_DIRECT_KEY_MAX || level != 1) in nilfs_direct_lookup()
42 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup()
51 __u64 key, __u64 *ptrp, in nilfs_direct_lookup_contig() argument
59 if (key > NILFS_DIRECT_KEY_MAX) in nilfs_direct_lookup_contig()
61 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_lookup_contig()
74 NILFS_DIRECT_KEY_MAX - key + 1); in nilfs_direct_lookup_contig()
76 (ptr2 = nilfs_direct_get_ptr(direct, key + cnt)) != in nilfs_direct_lookup_contig()
98 nilfs_direct_find_target_v(const struct nilfs_bmap *direct, __u64 key) in nilfs_direct_find_target_v() argument
102 ptr = nilfs_bmap_find_target_seq(direct, key); in nilfs_direct_find_target_v()
111 static int nilfs_direct_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) in nilfs_direct_insert() argument
118 if (key > NILFS_DIRECT_KEY_MAX) in nilfs_direct_insert()
120 if (nilfs_direct_get_ptr(bmap, key) != NILFS_BMAP_INVALID_PTR) in nilfs_direct_insert()
124 req.bpr_ptr = nilfs_direct_find_target_v(bmap, key); in nilfs_direct_insert()
134 nilfs_direct_set_ptr(bmap, key, req.bpr_ptr); in nilfs_direct_insert()
140 nilfs_bmap_set_target_v(bmap, key, req.bpr_ptr); in nilfs_direct_insert()
147 static int nilfs_direct_delete(struct nilfs_bmap *bmap, __u64 key) in nilfs_direct_delete() argument
153 if (key > NILFS_DIRECT_KEY_MAX || in nilfs_direct_delete()
154 nilfs_direct_get_ptr(bmap, key) == NILFS_BMAP_INVALID_PTR) in nilfs_direct_delete()
158 req.bpr_ptr = nilfs_direct_get_ptr(bmap, key); in nilfs_direct_delete()
163 nilfs_direct_set_ptr(bmap, key, NILFS_BMAP_INVALID_PTR); in nilfs_direct_delete()
172 __u64 key; in nilfs_direct_seek_key() local
174 for (key = start; key <= NILFS_DIRECT_KEY_MAX; key++) { in nilfs_direct_seek_key()
175 if (nilfs_direct_get_ptr(direct, key) != in nilfs_direct_seek_key()
177 *keyp = key; in nilfs_direct_seek_key()
186 __u64 key, lastkey; in nilfs_direct_last_key() local
189 for (key = NILFS_DIRECT_KEY_MIN; key <= NILFS_DIRECT_KEY_MAX; key++) in nilfs_direct_last_key()
190 if (nilfs_direct_get_ptr(direct, key) != in nilfs_direct_last_key()
192 lastkey = key; in nilfs_direct_last_key()
202 static int nilfs_direct_check_insert(const struct nilfs_bmap *bmap, __u64 key) in nilfs_direct_check_insert() argument
204 return key > NILFS_DIRECT_KEY_MAX; in nilfs_direct_check_insert()
210 __u64 key; in nilfs_direct_gather_data() local
217 for (key = 0; key < nitems; key++) { in nilfs_direct_gather_data()
218 ptr = nilfs_direct_get_ptr(direct, key); in nilfs_direct_gather_data()
220 keys[n] = key; in nilfs_direct_gather_data()
229 __u64 key, __u64 *keys, __u64 *ptrs, int n) in nilfs_direct_delete_and_convert() argument
237 ret = bmap->b_ops->bop_delete(bmap, key); in nilfs_direct_delete_and_convert()
249 dptrs[i] = (i != key) ? in nilfs_direct_delete_and_convert()
266 __u64 key; in nilfs_direct_propagate() local
274 key = nilfs_bmap_data_get_key(bmap, bh); in nilfs_direct_propagate()
275 ptr = nilfs_direct_get_ptr(bmap, key); in nilfs_direct_propagate()
285 nilfs_direct_set_ptr(bmap, key, newreq.pr_entry_nr); in nilfs_direct_propagate()
293 __u64 key, __u64 ptr, in nilfs_direct_assign_v() argument
307 binfo->bi_v.bi_blkoff = cpu_to_le64(key); in nilfs_direct_assign_v()
313 __u64 key, __u64 ptr, in nilfs_direct_assign_p() argument
318 nilfs_direct_set_ptr(direct, key, blocknr); in nilfs_direct_assign_p()
320 binfo->bi_dat.bi_blkoff = cpu_to_le64(key); in nilfs_direct_assign_p()
332 __u64 key; in nilfs_direct_assign() local
335 key = nilfs_bmap_data_get_key(bmap, *bh); in nilfs_direct_assign()
336 if (unlikely(key > NILFS_DIRECT_KEY_MAX)) { in nilfs_direct_assign()
338 "%s (ino=%lu): invalid key: %llu", in nilfs_direct_assign()
340 bmap->b_inode->i_ino, (unsigned long long)key); in nilfs_direct_assign()
343 ptr = nilfs_direct_get_ptr(bmap, key); in nilfs_direct_assign()
353 nilfs_direct_assign_v(bmap, key, ptr, bh, blocknr, binfo) : in nilfs_direct_assign()
354 nilfs_direct_assign_p(bmap, key, ptr, bh, blocknr, binfo); in nilfs_direct_assign()