Home
last modified time | relevance | path

Searched refs:key (Results 1 – 25 of 150) sorted by relevance

123456

/fs/ubifs/
Dkey.h97 union ubifs_key *key, ino_t inum) in ino_key_init() argument
99 key->u32[0] = inum; in ino_key_init()
100 key->u32[1] = UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS; in ino_key_init()
112 union ubifs_key *key = k; in ino_key_init_flash() local
114 key->j32[0] = cpu_to_le32(inum); in ino_key_init_flash()
115 key->j32[1] = cpu_to_le32(UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS); in ino_key_init_flash()
126 union ubifs_key *key, ino_t inum) in lowest_ino_key() argument
128 key->u32[0] = inum; in lowest_ino_key()
129 key->u32[1] = 0; in lowest_ino_key()
139 union ubifs_key *key, ino_t inum) in highest_ino_key() argument
[all …]
Dtnc.c337 ubifs_assert(is_hash_key(c, &zbr->key)); in lnc_add()
413 ubifs_assert(is_hash_key(c, &zbr->key)); in tnc_read_node_nm()
499 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, in fallible_read_node() argument
504 dbg_tnc("LEB %d:%d, key %s", zbr->lnum, zbr->offs, DBGKEY(key)); in fallible_read_node()
506 ret = try_read_node(c, node, key_type(c, key), zbr->len, zbr->lnum, in fallible_read_node()
513 key_read(c, &dent->key, &node_key); in fallible_read_node()
514 if (keys_cmp(c, key, &node_key) != 0) in fallible_read_node()
519 zbr->lnum, zbr->offs, zbr->len, DBGKEY(key)); in fallible_read_node()
703 static int resolve_collision(struct ubifs_info *c, const union ubifs_key *key, in resolve_collision() argument
726 if (keys_cmp(c, &(*zn)->zbranch[*n].key, key)) { in resolve_collision()
[all …]
Dtnc_misc.c137 const union ubifs_key *key, int *n) in ubifs_search_zbranch() argument
147 cmp = keys_cmp(c, key, &zbr[mid].key); in ubifs_search_zbranch()
163 ubifs_assert(keys_cmp(c, key, &zbr[0].key) < 0); in ubifs_search_zbranch()
165 ubifs_assert(keys_cmp(c, key, &zbr[*n].key) > 0); in ubifs_search_zbranch()
167 ubifs_assert(keys_cmp(c, key, &zbr[*n + 1].key) < 0); in ubifs_search_zbranch()
308 key_read(c, &br->key, &zbr->key); in read_znode()
324 switch (key_type(c, &zbr->key)) { in read_znode()
332 DBGKEY(&zbr->key)); in read_znode()
340 type = key_type(c, &zbr->key); in read_znode()
368 key1 = &znode->zbranch[i].key; in read_znode()
[all …]
/fs/afs/
Dsecurity.c23 struct key *afs_request_key(struct afs_cell *cell) in afs_request_key()
25 struct key *key; in afs_request_key() local
30 key = request_key(&key_type_rxrpc, cell->anonymous_key->description, in afs_request_key()
32 if (IS_ERR(key)) { in afs_request_key()
33 if (PTR_ERR(key) != -ENOKEY) { in afs_request_key()
34 _leave(" = %ld", PTR_ERR(key)); in afs_request_key()
35 return key; in afs_request_key()
43 _leave(" = {%x} [auth]", key_serial(key)); in afs_request_key()
44 return key; in afs_request_key()
60 key_put(permits->permits[loop].key); in afs_zap_permits()
[all …]
Ddir.c190 struct key *key) in afs_dir_get_page() argument
194 .private_data = key, in afs_dir_get_page()
331 filldir_t filldir, struct key *key) in afs_dir_iterate() argument
356 page = afs_dir_get_page(dir, blkoff / PAGE_SIZE, key); in afs_dir_iterate()
448 struct afs_fid *fid, struct key *key) in afs_do_lookup() argument
467 key); in afs_do_lookup()
493 struct key *key; in afs_lookup() local
513 key = afs_request_key(vnode->volume->cell); in afs_lookup()
514 if (IS_ERR(key)) { in afs_lookup()
515 _leave(" = %ld [key]", PTR_ERR(key)); in afs_lookup()
[all …]
Dinternal.h48 struct key *key; /* key to use for secure mounting */ member
79 struct key *key; /* security for this call */ member
144 struct key *key; /* owner of this write */ member
193 struct key *anonymous_key; /* anonymous user key for this cell */
365 struct key *unlock_key; /* key to be used in unlocking */
383 struct key *key; /* RxRPC ticket holding a security context */ member
494 extern int afs_fs_fetch_file_status(struct afs_server *, struct key *,
499 extern int afs_fs_fetch_data(struct afs_server *, struct key *,
502 extern int afs_fs_create(struct afs_server *, struct key *,
507 extern int afs_fs_remove(struct afs_server *, struct key *,
[all …]
Dvnode.c266 struct afs_vnode *auth_vnode, struct key *key) in afs_vnode_fetch_status() argument
361 ret = afs_fs_fetch_file_status(server, key, vnode, NULL, in afs_vnode_fetch_status()
370 afs_cache_permit(vnode, key, acl_order); in afs_vnode_fetch_status()
396 int afs_vnode_fetch_data(struct afs_vnode *vnode, struct key *key, in afs_vnode_fetch_data() argument
407 key_serial(key)); in afs_vnode_fetch_data()
424 ret = afs_fs_fetch_data(server, key, vnode, offset, length, in afs_vnode_fetch_data()
451 int afs_vnode_create(struct afs_vnode *vnode, struct key *key, in afs_vnode_create() argument
464 key_serial(key), in afs_vnode_create()
480 ret = afs_fs_create(server, key, vnode, name, mode, newfid, in afs_vnode_create()
509 int afs_vnode_remove(struct afs_vnode *vnode, struct key *key, const char *name, in afs_vnode_remove() argument
[all …]
Dfile.c65 struct key *key; in afs_open() local
70 key = afs_request_key(vnode->volume->cell); in afs_open()
71 if (IS_ERR(key)) { in afs_open()
72 _leave(" = %ld [key]", PTR_ERR(key)); in afs_open()
73 return PTR_ERR(key); in afs_open()
76 ret = afs_validate(vnode, key); in afs_open()
82 file->private_data = key; in afs_open()
143 struct key *key; in afs_readpage() local
151 key = file->private_data; in afs_readpage()
152 ASSERT(key != NULL); in afs_readpage()
[all …]
Dinode.c33 static int afs_inode_map_status(struct afs_vnode *vnode, struct key *key) in afs_inode_map_status() argument
77 afs_mntpt_check_symlink(vnode, key); in afs_inode_map_status()
119 struct inode *afs_iget(struct super_block *sb, struct key *key, in afs_iget() argument
164 ret = afs_vnode_fetch_status(vnode, NULL, key); in afs_iget()
186 ret = afs_inode_map_status(vnode, key); in afs_iget()
230 int afs_validate(struct afs_vnode *vnode, struct key *key) in afs_validate() argument
236 key_serial(key)); in afs_validate()
262 ret = afs_vnode_fetch_status(vnode, NULL, key); in afs_validate()
364 struct key *key; in afs_setattr() local
384 key = attr->ia_file->private_data; in afs_setattr()
[all …]
Dfsclient.c270 struct key *key, in afs_fs_fetch_file_status() argument
279 key_serial(key), vnode->fid.vid, vnode->fid.vnode); in afs_fs_fetch_file_status()
285 call->key = key; in afs_fs_fetch_file_status()
442 struct key *key, in afs_fs_fetch_data64() argument
459 call->key = key; in afs_fs_fetch_data64()
485 struct key *key, in afs_fs_fetch_data() argument
495 return afs_fs_fetch_data64(server, key, vnode, offset, length, in afs_fs_fetch_data()
504 call->key = key; in afs_fs_fetch_data()
653 struct key *key, in afs_fs_create() argument
677 call->key = key; in afs_fs_create()
[all …]
Dflock.c113 struct key *key; in afs_lock_work() local
147 key = key_get(fl->fl_file->private_data); in afs_lock_work()
150 ret = afs_vnode_extend_lock(vnode, key); in afs_lock_work()
152 key_put(key); in afs_lock_work()
181 key = key_get(fl->fl_file->private_data); in afs_lock_work()
186 ret = afs_vnode_set_lock(vnode, key, type); in afs_lock_work()
217 afs_vnode_release_lock(vnode, key); in afs_lock_work()
223 key_put(key); in afs_lock_work()
239 static void afs_defer_unlock(struct afs_vnode *vnode, struct key *key) in afs_defer_unlock() argument
247 vnode->unlock_key = key_get(key); in afs_defer_unlock()
[all …]
/fs/btrfs/
Droot-tree.c77 struct btrfs_root_item *item, struct btrfs_key *key) in btrfs_find_last_root() argument
107 memcpy(key, &found_key, sizeof(found_key)); in btrfs_find_last_root()
118 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root() argument
129 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
136 (unsigned long long)key->objectid, key->type, in btrfs_update_root()
137 (unsigned long long)key->offset); in btrfs_update_root()
153 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_insert_root() argument
157 ret = btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
173 struct btrfs_key key; in btrfs_find_dead_roots() local
181 key.objectid = objectid; in btrfs_find_dead_roots()
[all …]
Dexport.c67 struct btrfs_key key; in btrfs_get_dentry() local
69 key.objectid = root_objectid; in btrfs_get_dentry()
70 btrfs_set_key_type(&key, BTRFS_ROOT_ITEM_KEY); in btrfs_get_dentry()
71 key.offset = (u64)-1; in btrfs_get_dentry()
73 root = btrfs_read_fs_root_no_name(btrfs_sb(sb)->fs_info, &key); in btrfs_get_dentry()
77 key.objectid = objectid; in btrfs_get_dentry()
78 btrfs_set_key_type(&key, BTRFS_INODE_ITEM_KEY); in btrfs_get_dentry()
79 key.offset = 0; in btrfs_get_dentry()
81 inode = btrfs_iget(sb, &key, root, NULL); in btrfs_get_dentry()
143 struct btrfs_key key; in btrfs_get_parent() local
[all …]
Ddir-item.c79 struct btrfs_key key, location; in btrfs_insert_xattr_item() local
84 key.objectid = dir; in btrfs_insert_xattr_item()
85 btrfs_set_key_type(&key, BTRFS_XATTR_ITEM_KEY); in btrfs_insert_xattr_item()
86 key.offset = btrfs_name_hash(name, name_len); in btrfs_insert_xattr_item()
95 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
141 struct btrfs_key key; in btrfs_insert_dir_item() local
145 key.objectid = dir; in btrfs_insert_dir_item()
146 btrfs_set_key_type(&key, BTRFS_DIR_ITEM_KEY); in btrfs_insert_dir_item()
147 key.offset = btrfs_name_hash(name, name_len); in btrfs_insert_dir_item()
150 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
[all …]
Dorphan.c26 struct btrfs_key key; in btrfs_insert_orphan_item() local
29 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_insert_orphan_item()
30 btrfs_set_key_type(&key, BTRFS_ORPHAN_ITEM_KEY); in btrfs_insert_orphan_item()
31 key.offset = offset; in btrfs_insert_orphan_item()
37 ret = btrfs_insert_empty_item(trans, root, path, &key, 0); in btrfs_insert_orphan_item()
47 struct btrfs_key key; in btrfs_del_orphan_item() local
50 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_del_orphan_item()
51 btrfs_set_key_type(&key, BTRFS_ORPHAN_ITEM_KEY); in btrfs_del_orphan_item()
52 key.offset = offset; in btrfs_del_orphan_item()
58 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_orphan_item()
Dfile-item.c249 struct btrfs_key key; in btrfs_lookup_csums_range() local
264 key.objectid = BTRFS_EXTENT_CSUM_OBJECTID; in btrfs_lookup_csums_range()
265 key.offset = start; in btrfs_lookup_csums_range()
266 key.type = BTRFS_EXTENT_CSUM_KEY; in btrfs_lookup_csums_range()
268 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); in btrfs_lookup_csums_range()
273 btrfs_item_key_to_cpu(leaf, &key, path->slots[0] - 1); in btrfs_lookup_csums_range()
274 if (key.objectid == BTRFS_EXTENT_CSUM_OBJECTID && in btrfs_lookup_csums_range()
275 key.type == BTRFS_EXTENT_CSUM_KEY) { in btrfs_lookup_csums_range()
276 offset = (start - key.offset) >> in btrfs_lookup_csums_range()
295 btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); in btrfs_lookup_csums_range()
[all …]
Dtree-log.c236 struct btrfs_key *key) in overwrite_item() argument
253 ret = btrfs_search_slot(NULL, root, key, path, 0, 0); in overwrite_item()
294 key, item_size); in overwrite_item()
323 if (key->type == BTRFS_INODE_ITEM_KEY && ret == -EEXIST) { in overwrite_item()
352 if (key->type == BTRFS_INODE_ITEM_KEY) { in overwrite_item()
407 struct btrfs_key *key) in replay_one_extent() argument
413 u64 start = key->offset; in replay_one_extent()
434 inode = read_one_inode(root, key->objectid); in replay_one_extent()
487 ret = btrfs_insert_empty_item(trans, root, path, key, in replay_one_extent()
514 trans->transid, key->objectid); in replay_one_extent()
[all …]
Dinode-item.c58 struct btrfs_key key; in btrfs_del_inode_ref() local
68 key.objectid = inode_objectid; in btrfs_del_inode_ref()
69 key.offset = ref_objectid; in btrfs_del_inode_ref()
70 btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY); in btrfs_del_inode_ref()
76 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_ref()
116 struct btrfs_key key; in btrfs_insert_inode_ref() local
122 key.objectid = inode_objectid; in btrfs_insert_inode_ref()
123 key.offset = ref_objectid; in btrfs_insert_inode_ref()
124 btrfs_set_key_type(&key, BTRFS_INODE_REF_KEY); in btrfs_insert_inode_ref()
130 ret = btrfs_insert_empty_item(trans, root, path, &key, in btrfs_insert_inode_ref()
[all …]
Dextent-tree.c91 if (block_group->key.objectid < cache->key.objectid) { in btrfs_add_block_group_cache()
93 } else if (block_group->key.objectid > cache->key.objectid) { in btrfs_add_block_group_cache()
127 end = cache->key.objectid + cache->key.offset - 1; in block_group_cache_tree_search()
128 start = cache->key.objectid; in block_group_cache_tree_search()
131 if (!contains && (!ret || start < ret->key.objectid)) in block_group_cache_tree_search()
205 cache->key.objectid, bytenr, 0, in remove_sb_from_cache()
222 struct btrfs_key key; in cache_block_group() local
246 last = max_t(u64, block_group->key.objectid, BTRFS_SUPER_INFO_OFFSET); in cache_block_group()
247 key.objectid = last; in cache_block_group()
248 key.offset = 0; in cache_block_group()
[all …]
Dfile.c383 struct btrfs_key key; in btrfs_drop_extents() local
428 btrfs_item_key_to_cpu(leaf, &key, slot); in btrfs_drop_extents()
429 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY && in btrfs_drop_extents()
430 key.offset >= end) { in btrfs_drop_extents()
433 if (btrfs_key_type(&key) > BTRFS_EXTENT_DATA_KEY || in btrfs_drop_extents()
434 key.objectid != inode->i_ino) { in btrfs_drop_extents()
438 search_start = max(key.offset, start); in btrfs_drop_extents()
441 if (btrfs_key_type(&key) == BTRFS_EXTENT_DATA_KEY) { in btrfs_drop_extents()
459 extent_end = key.offset + in btrfs_drop_extents()
466 extent_end = key.offset + in btrfs_drop_extents()
[all …]
Dtree-defrag.c35 struct btrfs_key key; in btrfs_defrag_leaves() local
85 memset(&key, 0, sizeof(key)); in btrfs_defrag_leaves()
87 memcpy(&key, &root->defrag_progress, sizeof(key)); in btrfs_defrag_leaves()
94 ret = btrfs_search_forward(root, &key, NULL, path, in btrfs_defrag_leaves()
103 wret = btrfs_search_slot(trans, root, &key, path, 0, 1); in btrfs_defrag_leaves()
114 next_key_ret = btrfs_find_next_key(root, path, &key, 1, cache_only, in btrfs_defrag_leaves()
122 memcpy(&root->defrag_progress, &key, sizeof(key)); in btrfs_defrag_leaves()
Dvolumes.c597 struct btrfs_key key; in find_free_dev_extent() local
626 key.objectid = device->devid; in find_free_dev_extent()
627 key.offset = search_start; in find_free_dev_extent()
628 key.type = BTRFS_DEV_EXTENT_KEY; in find_free_dev_extent()
629 ret = btrfs_search_slot(trans, root, &key, path, 0, 0); in find_free_dev_extent()
632 ret = btrfs_previous_item(root, path, 0, key.type); in find_free_dev_extent()
636 btrfs_item_key_to_cpu(l, &key, path->slots[0]); in find_free_dev_extent()
664 btrfs_item_key_to_cpu(l, &key, slot); in find_free_dev_extent()
666 if (key.objectid < device->devid) in find_free_dev_extent()
669 if (key.objectid > device->devid) in find_free_dev_extent()
[all …]
/fs/cifs/
Dsmbdes.c192 dohash(char *out, char *in, char *key, int forw) in dohash() argument
219 permute(pk1, key, perm1, 56); in dohash()
304 str_to_key(unsigned char *str, unsigned char *key) in str_to_key() argument
308 key[0] = str[0] >> 1; in str_to_key()
309 key[1] = ((str[0] & 0x01) << 6) | (str[1] >> 2); in str_to_key()
310 key[2] = ((str[1] & 0x03) << 5) | (str[2] >> 3); in str_to_key()
311 key[3] = ((str[2] & 0x07) << 4) | (str[3] >> 4); in str_to_key()
312 key[4] = ((str[3] & 0x0F) << 3) | (str[4] >> 5); in str_to_key()
313 key[5] = ((str[4] & 0x1F) << 2) | (str[5] >> 6); in str_to_key()
314 key[6] = ((str[5] & 0x3F) << 1) | (str[6] >> 7); in str_to_key()
[all …]
/fs/reiserfs/
Dprints.c17 static char *reiserfs_cpu_offset(struct cpu_key *key) in reiserfs_cpu_offset() argument
19 if (cpu_key_k_type(key) == TYPE_DIRENTRY) in reiserfs_cpu_offset()
22 GET_HASH_VALUE(cpu_key_k_offset(key)), in reiserfs_cpu_offset()
24 GET_GENERATION_NUMBER(cpu_key_k_offset(key))); in reiserfs_cpu_offset()
27 (unsigned long long)cpu_key_k_offset(key)); in reiserfs_cpu_offset()
31 static char *le_offset(struct reiserfs_key *key) in le_offset() argument
35 version = le_key_version(key); in le_offset()
36 if (le_key_k_type(version, key) == TYPE_DIRENTRY) in le_offset()
39 GET_HASH_VALUE(le_key_k_offset(version, key)), in le_offset()
41 GET_GENERATION_NUMBER(le_key_k_offset(version, key))); in le_offset()
[all …]
Ditem_ops.c22 static void sd_decrement_key(struct cpu_key *key) in sd_decrement_key() argument
24 key->on_disk_key.k_objectid--; in sd_decrement_key()
25 set_cpu_key_k_type(key, TYPE_ANY); in sd_decrement_key()
26 set_cpu_key_k_offset(key, (loff_t)(~0ULL >> 1)); in sd_decrement_key()
29 static int sd_is_left_mergeable(struct reiserfs_key *key, unsigned long bsize) in sd_is_left_mergeable() argument
128 static void direct_decrement_key(struct cpu_key *key) in direct_decrement_key() argument
130 cpu_key_k_offset_dec(key); in direct_decrement_key()
131 if (cpu_key_k_offset(key) == 0) in direct_decrement_key()
132 set_cpu_key_k_type(key, TYPE_STAT_DATA); in direct_decrement_key()
135 static int direct_is_left_mergeable(struct reiserfs_key *key, in direct_is_left_mergeable() argument
[all …]

123456