Home
last modified time | relevance | path

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

12345678910

/fs/ubifs/
Dkey.h91 union ubifs_key *key, ino_t inum) in ino_key_init() argument
93 key->u32[0] = inum; in ino_key_init()
94 key->u32[1] = UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS; in ino_key_init()
106 union ubifs_key *key = k; in ino_key_init_flash() local
108 key->j32[0] = cpu_to_le32(inum); in ino_key_init_flash()
109 key->j32[1] = cpu_to_le32(UBIFS_INO_KEY << UBIFS_S_KEY_BLOCK_BITS); in ino_key_init_flash()
120 union ubifs_key *key, ino_t inum) in lowest_ino_key() argument
122 key->u32[0] = inum; in lowest_ino_key()
123 key->u32[1] = 0; in lowest_ino_key()
133 union ubifs_key *key, ino_t inum) in highest_ino_key() argument
[all …]
Dtnc.c27 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key,
314 ubifs_assert(c, is_hash_key(c, &zbr->key)); in lnc_add()
389 ubifs_assert(c, is_hash_key(c, &zbr->key)); in tnc_read_hashed_node()
399 err = fallible_read_node(c, &zbr->key, zbr, node); in tnc_read_hashed_node()
497 static int fallible_read_node(struct ubifs_info *c, const union ubifs_key *key, in fallible_read_node() argument
502 dbg_tnck(key, "LEB %d:%d, key ", zbr->lnum, zbr->offs); in fallible_read_node()
504 ret = try_read_node(c, node, key_type(c, key), zbr); in fallible_read_node()
510 key_read(c, &dent->key, &node_key); in fallible_read_node()
511 if (keys_cmp(c, key, &node_key) != 0) in fallible_read_node()
515 dbg_mntk(key, "dangling branch LEB %d:%d len %d, key ", in fallible_read_node()
[all …]
/fs/btrfs/
Dfree-space-tree.c30 num_bitmaps = div_u64(cache->key.offset + bitmap_range - 1, in set_free_space_tree_thresholds()
53 struct btrfs_key key; in add_new_free_space_info() local
57 key.objectid = block_group->key.objectid; in add_new_free_space_info()
58 key.type = BTRFS_FREE_SPACE_INFO_KEY; in add_new_free_space_info()
59 key.offset = block_group->key.offset; in add_new_free_space_info()
61 ret = btrfs_insert_empty_item(trans, root, path, &key, sizeof(*info)); in add_new_free_space_info()
86 struct btrfs_key key; in search_free_space_info() local
89 key.objectid = block_group->key.objectid; in search_free_space_info()
90 key.type = BTRFS_FREE_SPACE_INFO_KEY; in search_free_space_info()
91 key.offset = block_group->key.offset; in search_free_space_info()
[all …]
Dtree-checker.c78 struct btrfs_key key; in file_extent_err() local
82 btrfs_item_key_to_cpu(eb, &key, slot); in file_extent_err()
92 key.objectid, key.offset, &vaf); in file_extent_err()
111 struct btrfs_key *key, in file_extent_end() argument
119 end = ALIGN(key->offset + len, leaf->fs_info->sectorsize); in file_extent_end()
122 end = key->offset + len; in file_extent_end()
128 struct btrfs_key *key, int slot, in check_extent_data_item() argument
137 if (!IS_ALIGNED(key->offset, sectorsize)) { in check_extent_data_item()
140 key->offset, sectorsize); in check_extent_data_item()
173 if (key->offset) { in check_extent_data_item()
[all …]
Dexport.c67 struct btrfs_key key; in btrfs_get_dentry() local
74 key.objectid = root_objectid; in btrfs_get_dentry()
75 key.type = BTRFS_ROOT_ITEM_KEY; in btrfs_get_dentry()
76 key.offset = (u64)-1; in btrfs_get_dentry()
80 root = btrfs_read_fs_root_no_name(fs_info, &key); in btrfs_get_dentry()
86 key.objectid = objectid; in btrfs_get_dentry()
87 key.type = BTRFS_INODE_ITEM_KEY; in btrfs_get_dentry()
88 key.offset = 0; in btrfs_get_dentry()
90 inode = btrfs_iget(sb, &key, root, NULL); in btrfs_get_dentry()
163 struct btrfs_key key; in btrfs_get_parent() local
[all …]
Ddir-item.c64 struct btrfs_key key, location; in btrfs_insert_xattr_item() local
72 key.objectid = objectid; in btrfs_insert_xattr_item()
73 key.type = BTRFS_XATTR_ITEM_KEY; in btrfs_insert_xattr_item()
74 key.offset = btrfs_name_hash(name, name_len); in btrfs_insert_xattr_item()
77 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_xattr_item()
119 struct btrfs_key key; in btrfs_insert_dir_item() local
123 key.objectid = btrfs_ino(dir); in btrfs_insert_dir_item()
124 key.type = BTRFS_DIR_ITEM_KEY; in btrfs_insert_dir_item()
125 key.offset = btrfs_name_hash(name, name_len); in btrfs_insert_dir_item()
135 dir_item = insert_with_overflow(trans, root, path, &key, data_size, in btrfs_insert_dir_item()
[all …]
Droot-tree.c121 *root, struct btrfs_key *key, struct btrfs_root_item in btrfs_update_root() argument
136 ret = btrfs_search_slot(trans, root, key, path, 0, 1); in btrfs_update_root()
143 key->objectid, key->type, key->offset, in btrfs_update_root()
162 ret = btrfs_search_slot(trans, root, key, path, in btrfs_update_root()
176 key, sizeof(*item)); in btrfs_update_root()
200 const struct btrfs_key *key, struct btrfs_root_item *item) in btrfs_insert_root() argument
206 return btrfs_insert_item(trans, root, key, item, sizeof(*item)); in btrfs_insert_root()
214 struct btrfs_key key; in btrfs_find_orphan_roots() local
224 key.objectid = BTRFS_ORPHAN_OBJECTID; in btrfs_find_orphan_roots()
225 key.type = BTRFS_ORPHAN_ITEM_KEY; in btrfs_find_orphan_roots()
[all …]
Duuid-tree.c14 static void btrfs_uuid_to_key(u8 *uuid, u8 type, struct btrfs_key *key) in btrfs_uuid_to_key() argument
16 key->type = type; in btrfs_uuid_to_key()
17 key->objectid = get_unaligned_le64(uuid); in btrfs_uuid_to_key()
18 key->offset = get_unaligned_le64(uuid + sizeof(u64)); in btrfs_uuid_to_key()
31 struct btrfs_key key; in btrfs_uuid_tree_lookup() local
44 btrfs_uuid_to_key(uuid, type, &key); in btrfs_uuid_tree_lookup()
45 ret = btrfs_search_slot(NULL, uuid_root, &key, path, 0, 0); in btrfs_uuid_tree_lookup()
89 struct btrfs_key key; in btrfs_uuid_tree_add() local
104 btrfs_uuid_to_key(uuid, type, &key); in btrfs_uuid_tree_add()
112 ret = btrfs_insert_empty_item(trans, uuid_root, path, &key, in btrfs_uuid_tree_add()
[all …]
Dinode-item.c82 struct btrfs_key key; in btrfs_lookup_inode_extref() local
84 key.objectid = inode_objectid; in btrfs_lookup_inode_extref()
85 key.type = BTRFS_INODE_EXTREF_KEY; in btrfs_lookup_inode_extref()
86 key.offset = btrfs_extref_hash(ref_objectid, name, name_len); in btrfs_lookup_inode_extref()
88 ret = btrfs_search_slot(trans, root, &key, path, ins_len, cow); in btrfs_lookup_inode_extref()
105 struct btrfs_key key; in btrfs_del_inode_extref() local
114 key.objectid = inode_objectid; in btrfs_del_inode_extref()
115 key.type = BTRFS_INODE_EXTREF_KEY; in btrfs_del_inode_extref()
116 key.offset = btrfs_extref_hash(ref_objectid, name, name_len); in btrfs_del_inode_extref()
124 ret = btrfs_search_slot(trans, root, &key, path, -1, 1); in btrfs_del_inode_extref()
[all …]
Dtree-log.c346 struct btrfs_key *key) in overwrite_item() argument
355 bool inode_item = key->type == BTRFS_INODE_ITEM_KEY; in overwrite_item()
364 ret = btrfs_search_slot(NULL, root, key, path, 0, 0); in overwrite_item()
459 key, item_size); in overwrite_item()
486 if (key->type == BTRFS_INODE_ITEM_KEY && ret == -EEXIST) { in overwrite_item()
535 if (key->type == BTRFS_INODE_ITEM_KEY) { in overwrite_item()
556 struct btrfs_key key; in read_one_inode() local
559 key.objectid = objectid; in read_one_inode()
560 key.type = BTRFS_INODE_ITEM_KEY; in read_one_inode()
561 key.offset = 0; in read_one_inode()
[all …]
/fs/nilfs2/
Ddirect.c24 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()
[all …]
Dbmap.c62 int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level, in nilfs_bmap_lookup_at_level() argument
69 ret = bmap->b_ops->bop_lookup(bmap, key, level, ptrp); in nilfs_bmap_lookup_at_level()
86 int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp, in nilfs_bmap_lookup_contig() argument
92 ret = bmap->b_ops->bop_lookup_contig(bmap, key, ptrp, maxblocks); in nilfs_bmap_lookup_contig()
98 static int nilfs_bmap_do_insert(struct nilfs_bmap *bmap, __u64 key, __u64 ptr) in nilfs_bmap_do_insert() argument
105 ret = bmap->b_ops->bop_check_insert(bmap, key); in nilfs_bmap_do_insert()
112 bmap, key, ptr, keys, ptrs, n); in nilfs_bmap_do_insert()
121 return bmap->b_ops->bop_insert(bmap, key, ptr); in nilfs_bmap_do_insert()
142 int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec) in nilfs_bmap_insert() argument
147 ret = nilfs_bmap_do_insert(bmap, key, rec); in nilfs_bmap_insert()
[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_net(&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()
51 struct key *afs_request_key_rcu(struct afs_cell *cell) in afs_request_key_rcu()
[all …]
Dfile.c73 key_put(wbk->key); in afs_put_wb_key()
89 wbk->key = af->key; in afs_cache_wb_key()
93 if (p->key == wbk->key) in afs_cache_wb_key()
97 key_get(wbk->key); in afs_cache_wb_key()
118 struct key *key; in afs_open() local
123 key = afs_request_key(vnode->volume->cell); in afs_open()
124 if (IS_ERR(key)) { in afs_open()
125 ret = PTR_ERR(key); in afs_open()
134 af->key = key; in afs_open()
136 ret = afs_validate(vnode, key); in afs_open()
[all …]
Dxattr.c49 struct key *key; in afs_xattr_get_acl() local
56 key = afs_request_key(vnode->volume->cell); in afs_xattr_get_acl()
57 if (IS_ERR(key)) { in afs_xattr_get_acl()
58 ret = PTR_ERR(key); in afs_xattr_get_acl()
63 if (afs_begin_vnode_operation(&fc, vnode, key, true)) { in afs_xattr_get_acl()
88 key_put(key); in afs_xattr_get_acl()
107 struct key *key; in afs_xattr_set_acl() local
121 key = afs_request_key(vnode->volume->cell); in afs_xattr_set_acl()
122 if (IS_ERR(key)) { in afs_xattr_set_acl()
123 ret = PTR_ERR(key); in afs_xattr_set_acl()
[all …]
Ddir.c214 static struct afs_read *afs_read_dir(struct afs_vnode *dvnode, struct key *key) in afs_read_dir() argument
311 ret = afs_fetch_data(dvnode, key, req); in afs_read_dir()
443 struct key *key, afs_dataversion_t *_dir_version) in afs_dir_iterate() argument
460 req = afs_read_dir(dvnode, key); in afs_dir_iterate()
562 struct afs_fid *fid, struct key *key, in afs_do_lookup_one() argument
576 ret = afs_dir_iterate(dir, &cookie.ctx, key, _dir_version); in afs_do_lookup_one()
639 struct key *key) in afs_do_lookup() argument
678 ret = afs_dir_iterate(dir, &cookie->ctx, key, &data_version); in afs_do_lookup()
736 if (afs_begin_vnode_operation(&fc, dvnode, key, true)) { in afs_do_lookup()
771 if (afs_begin_vnode_operation(&fc, dvnode, key, true)) { in afs_do_lookup()
[all …]
/fs/nfs/
Dfscache.c53 struct nfs_server_key key; in nfs_fscache_get_client_cookie() local
54 uint16_t len = sizeof(key.hdr); in nfs_fscache_get_client_cookie()
56 memset(&key, 0, sizeof(key)); in nfs_fscache_get_client_cookie()
57 key.hdr.nfsversion = clp->rpc_ops->version; in nfs_fscache_get_client_cookie()
58 key.hdr.family = clp->cl_addr.ss_family; in nfs_fscache_get_client_cookie()
62 key.hdr.port = sin->sin_port; in nfs_fscache_get_client_cookie()
63 key.ipv4_addr = sin->sin_addr; in nfs_fscache_get_client_cookie()
64 len += sizeof(key.ipv4_addr); in nfs_fscache_get_client_cookie()
68 key.hdr.port = sin6->sin6_port; in nfs_fscache_get_client_cookie()
69 key.ipv6_addr = sin6->sin6_addr; in nfs_fscache_get_client_cookie()
[all …]
Ddns_resolve.c77 struct nfs_dns_ent *key; in nfs_dns_ent_update() local
80 key = container_of(ckey, struct nfs_dns_ent, h); in nfs_dns_ent_update()
82 memcpy(&new->addr, &key->addr, key->addrlen); in nfs_dns_ent_update()
83 new->addrlen = key->addrlen; in nfs_dns_ent_update()
90 struct nfs_dns_ent *key; in nfs_dns_ent_init() local
93 key = container_of(ckey, struct nfs_dns_ent, h); in nfs_dns_ent_init()
96 new->hostname = kstrndup(key->hostname, key->namelen, GFP_KERNEL); in nfs_dns_ent_init()
98 new->namelen = key->namelen; in nfs_dns_ent_init()
136 static unsigned int nfs_dns_hash(const struct nfs_dns_ent *key) in nfs_dns_hash() argument
138 return hash_str(key->hostname, NFS_DNS_HASHBITS); in nfs_dns_hash()
[all …]
/fs/sdcardfs/
Dpackagelist.c37 struct qstr key; member
72 static appid_t __get_appid(const struct qstr *key) in __get_appid() argument
75 unsigned int hash = key->hash; in __get_appid()
80 if (qstr_case_eq(key, &hash_cur->key)) { in __get_appid()
90 appid_t get_appid(const char *key) in get_appid() argument
94 qstr_init(&q, key); in get_appid()
98 static appid_t __get_ext_gid(const struct qstr *key) in __get_ext_gid() argument
101 unsigned int hash = key->hash; in __get_ext_gid()
106 if (qstr_case_eq(key, &hash_cur->key)) { in __get_ext_gid()
116 appid_t get_ext_gid(const char *key) in get_ext_gid() argument
[all …]
/fs/crypto/
Dkeyring.c62 static int fscrypt_key_instantiate(struct key *key, in fscrypt_key_instantiate() argument
65 key->payload.data[0] = (struct fscrypt_master_key *)prep->data; in fscrypt_key_instantiate()
69 static void fscrypt_key_destroy(struct key *key) in fscrypt_key_destroy() argument
71 free_master_key(key->payload.data[0]); in fscrypt_key_destroy()
74 static void fscrypt_key_describe(const struct key *key, struct seq_file *m) in fscrypt_key_describe() argument
76 seq_puts(m, key->description); in fscrypt_key_describe()
78 if (key_is_positive(key)) { in fscrypt_key_describe()
79 const struct fscrypt_master_key *mk = key->payload.data[0]; in fscrypt_key_describe()
100 static int fscrypt_user_key_instantiate(struct key *key, in fscrypt_user_key_instantiate() argument
108 return key_payload_reserve(key, FSCRYPT_MAX_KEY_SIZE); in fscrypt_user_key_instantiate()
[all …]
Dkeysetup_v1.c91 static struct key *
98 struct key *key; in find_and_lock_process_key() local
107 key = request_key(&key_type_logon, description, NULL); in find_and_lock_process_key()
109 if (IS_ERR(key)) in find_and_lock_process_key()
110 return key; in find_and_lock_process_key()
112 down_read(&key->sem); in find_and_lock_process_key()
113 ukp = user_key_payload_locked(key); in find_and_lock_process_key()
124 key->description); in find_and_lock_process_key()
131 key->description, payload->size, min_keysize); in find_and_lock_process_key()
136 return key; in find_and_lock_process_key()
[all …]
/fs/btrfs/tests/
Dextent-buffer-tests.c25 struct btrfs_key key; in test_btrfs_split_item() local
59 key.objectid = 0; in test_btrfs_split_item()
60 key.type = BTRFS_EXTENT_CSUM_KEY; in test_btrfs_split_item()
61 key.offset = 0; in test_btrfs_split_item()
63 setup_items_for_insert(root, path, &key, &value_len, value_len, in test_btrfs_split_item()
69 key.offset = 3; in test_btrfs_split_item()
76 ret = btrfs_split_item(NULL, root, path, &key, 17); in test_btrfs_split_item()
86 btrfs_item_key_to_cpu(eb, &key, 0); in test_btrfs_split_item()
87 if (key.objectid != 0 || key.type != BTRFS_EXTENT_CSUM_KEY || in test_btrfs_split_item()
88 key.offset != 0) { in test_btrfs_split_item()
[all …]
Dfree-space-tree-tests.c27 struct btrfs_key key; in __check_free_space_extents() local
51 end = cache->key.objectid + cache->key.offset; in __check_free_space_extents()
54 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents()
55 if (key.type != BTRFS_FREE_SPACE_BITMAP_KEY) in __check_free_space_extents()
57 offset = key.objectid; in __check_free_space_extents()
58 while (offset < key.objectid + key.offset) { in __check_free_space_extents()
90 btrfs_item_key_to_cpu(path->nodes[0], &key, path->slots[0]); in __check_free_space_extents()
91 if (key.type != BTRFS_FREE_SPACE_EXTENT_KEY || in __check_free_space_extents()
92 key.objectid != extents[i].start || in __check_free_space_extents()
93 key.offset != extents[i].length) in __check_free_space_extents()
[all …]
/fs/cachefiles/
Dkey.c37 char *key; in cachefiles_cook_key() local
77 key = kmalloc(max, cachefiles_gfp); in cachefiles_cook_key()
78 if (!key) in cachefiles_cook_key()
84 sprintf(key, "@%02x%c+", (unsigned) csum, 0); in cachefiles_cook_key()
92 key[len + 1] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
94 key[len] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key()
100 key[len++] = '\0'; in cachefiles_cook_key()
102 key[len++] = '+'; in cachefiles_cook_key()
106 key[len++] = *raw++; in cachefiles_cook_key()
119 key[len++] = '\0'; in cachefiles_cook_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 …]

12345678910