Home
last modified time | relevance | path

Searched refs:namelen (Results 1 – 25 of 113) sorted by relevance

12345

/fs/ocfs2/dlm/
Ddlmmaster.c58 unsigned int namelen) in dlm_mle_equal() argument
63 if (namelen != mle->mnamelen || in dlm_mle_equal()
64 memcmp(name, mle->mname, namelen) != 0) in dlm_mle_equal()
80 unsigned int namelen);
85 char *name, unsigned int namelen);
103 const char *name, unsigned int namelen,
255 unsigned int namelen) in dlm_init_mle() argument
286 memcpy(mle->mname, name, namelen); in dlm_init_mle()
287 mle->mnamelen = namelen; in dlm_init_mle()
288 mle->mnamehash = dlm_lockid_hash(name, namelen); in dlm_init_mle()
[all …]
Ddlmlock.c297 create.namelen = res->lockname.len; in dlm_send_remote_lock_request()
299 memcpy(create.name, res->lockname.name, create.namelen); in dlm_send_remote_lock_request()
308 "currently.\n", dlm->name, create.namelen, in dlm_send_remote_lock_request()
315 "node %u\n", dlm->name, create.namelen, create.name, in dlm_send_remote_lock_request()
452 unsigned int namelen; in dlm_create_lock_handler() local
460 namelen = create->namelen; in dlm_create_lock_handler()
465 dlm->name, create->node_idx, namelen, name); in dlm_create_lock_handler()
471 if (namelen > DLM_LOCKID_NAME_MAX) { in dlm_create_lock_handler()
493 res = dlm_lookup_lockres(dlm, name, namelen); in dlm_create_lock_handler()
544 const char *name, int namelen, dlm_astlockfunc_t *ast, in dlmlock() argument
[all …]
/fs/jffs2/
Dwrite.c207 uint32_t namelen, int alloc_mode) in jffs2_write_dirent() argument
226 if (strnlen(name, namelen) != namelen) { in jffs2_write_dirent()
240 vecs[1].iov_len = namelen; in jffs2_write_dirent()
242 fd = jffs2_alloc_full_dirent(namelen+1); in jffs2_write_dirent()
248 fd->nhash = full_name_hash(NULL, name, namelen); in jffs2_write_dirent()
250 memcpy(fd->name, name, namelen); in jffs2_write_dirent()
251 fd->name[namelen]=0; in jffs2_write_dirent()
270 if (ret || (retlen != sizeof(*rd) + namelen)) { in jffs2_write_dirent()
272 sizeof(*rd) + namelen, flash_ofs, ret, retlen); in jffs2_write_dirent()
275 jffs2_add_physical_node_ref(c, flash_ofs | REF_OBSOLETE, PAD(sizeof(*rd)+namelen), NULL); in jffs2_write_dirent()
[all …]
Ddir.c288 int namelen; in jffs2_symlink() local
307 namelen = dentry->d_name.len; in jffs2_symlink()
379 ret = jffs2_reserve_space(c, sizeof(*rd)+namelen, &alloclen, in jffs2_symlink()
380 ALLOC_NORMAL, JFFS2_SUMMARY_DIRENT_SIZE(namelen)); in jffs2_symlink()
397 rd->totlen = cpu_to_je32(sizeof(*rd) + namelen); in jffs2_symlink()
404 rd->nsize = namelen; in jffs2_symlink()
407 rd->name_crc = cpu_to_je32(crc32(0, dentry->d_name.name, namelen)); in jffs2_symlink()
409 fd = jffs2_write_dirent(c, dir_f, rd, dentry->d_name.name, namelen, ALLOC_NORMAL); in jffs2_symlink()
450 int namelen; in jffs2_mkdir() local
465 namelen = dentry->d_name.len; in jffs2_mkdir()
[all …]
/fs/xfs/libxfs/
Dxfs_dir2_sf.c62 int namelen; /* total name bytes */ in xfs_dir2_block_sfsize() local
77 count = i8count = namelen = 0; in xfs_dir2_block_sfsize()
97 isdot = dep->namelen == 1 && dep->name[0] == '.'; in xfs_dir2_block_sfsize()
99 dep->namelen == 2 && in xfs_dir2_block_sfsize()
108 namelen += dep->namelen + has_ftype; in xfs_dir2_block_sfsize()
116 namelen + /* name */ in xfs_dir2_block_sfsize()
199 if (dep->namelen == 1 && dep->name[0] == '.') in xfs_dir2_block_to_sf()
204 else if (dep->namelen == 2 && in xfs_dir2_block_to_sf()
212 sfep->namelen = dep->namelen; in xfs_dir2_block_to_sf()
216 memcpy(sfep->name, dep->name, dep->namelen); in xfs_dir2_block_to_sf()
[all …]
Dxfs_attr_leaf.c618 if (sfe->namelen != args->namelen) in xfs_attr_shortform_add()
620 if (memcmp(args->name, sfe->nameval, args->namelen) != 0) in xfs_attr_shortform_add()
629 size = XFS_ATTR_SF_ENTSIZE_BYNAME(args->namelen, args->valuelen); in xfs_attr_shortform_add()
634 sfe->namelen = args->namelen; in xfs_attr_shortform_add()
637 memcpy(sfe->nameval, args->name, args->namelen); in xfs_attr_shortform_add()
638 memcpy(&sfe->nameval[args->namelen], args->value, args->valuelen); in xfs_attr_shortform_add()
688 if (sfe->namelen != args->namelen) in xfs_attr_shortform_remove()
690 if (memcmp(sfe->nameval, args->name, args->namelen) != 0) in xfs_attr_shortform_remove()
755 if (sfe->namelen != args->namelen) in xfs_attr_shortform_lookup()
757 if (memcmp(args->name, sfe->nameval, args->namelen) != 0) in xfs_attr_shortform_lookup()
[all …]
/fs/nfs/
Dnamespace.c55 int namelen; in nfs_path() local
70 namelen = dentry->d_name.len; in nfs_path()
71 buflen -= namelen + 1; in nfs_path()
74 end -= namelen; in nfs_path()
75 memcpy(end, dentry->d_name.name, namelen); in nfs_path()
101 namelen = strlen(base); in nfs_path()
104 while (namelen > 0 && base[namelen - 1] == '/') in nfs_path()
105 namelen--; in nfs_path()
107 buflen -= namelen; in nfs_path()
113 end -= namelen; in nfs_path()
[all …]
Dnfs4idmap.c164 int nfs_map_string_to_numeric(const char *name, size_t namelen, __u32 *res) in nfs_map_string_to_numeric() argument
169 if (memchr(name, '@', namelen) != NULL || namelen >= sizeof(buf)) in nfs_map_string_to_numeric()
171 memcpy(buf, name, namelen); in nfs_map_string_to_numeric()
172 buf[namelen] = '\0'; in nfs_map_string_to_numeric()
257 static ssize_t nfs_idmap_get_desc(const char *name, size_t namelen, in nfs_idmap_get_desc() argument
261 size_t desclen = typelen + namelen + 2; in nfs_idmap_get_desc()
272 memcpy(cp, name, namelen); in nfs_idmap_get_desc()
273 cp += namelen; in nfs_idmap_get_desc()
278 static struct key *nfs_idmap_request_key(const char *name, size_t namelen, in nfs_idmap_request_key() argument
285 ret = nfs_idmap_get_desc(name, namelen, type, strlen(type), &desc); in nfs_idmap_request_key()
[all …]
Ddns_resolve.c18 ssize_t nfs_dns_resolve_name(struct net *net, char *name, size_t namelen, in nfs_dns_resolve_name() argument
25 ip_len = dns_query(net, NULL, name, namelen, NULL, &ip_addr, NULL, in nfs_dns_resolve_name()
65 size_t namelen; member
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()
101 new->namelen = 0; in nfs_dns_ent_init()
129 item->namelen = 0; in nfs_dns_ent_alloc()
172 if (a->namelen == 0 || a->namelen != b->namelen) in nfs_dns_match()
174 return memcmp(a->hostname, b->hostname, a->namelen) == 0; in nfs_dns_match()
254 key.namelen = len; in nfs_dns_parse()
[all …]
/fs/dlm/
Ddir.c66 uint16_t namelen; in dlm_recover_directory() local
114 namelen = be16_to_cpu(v); in dlm_recover_directory()
122 if (namelen == 0xFFFF) in dlm_recover_directory()
124 if (!namelen) in dlm_recover_directory()
127 if (namelen > left) in dlm_recover_directory()
130 if (namelen > DLM_RESNAME_MAXLEN) in dlm_recover_directory()
134 b, namelen, in dlm_recover_directory()
157 b, namelen); in dlm_recover_directory()
175 last_len = namelen; in dlm_recover_directory()
176 memcpy(last_name, b, namelen); in dlm_recover_directory()
[all …]
/fs/omfs/
Ddir.c12 static int omfs_hash(const char *name, int namelen, int mod) in omfs_hash() argument
15 for (i = 0; i < namelen; i++) in omfs_hash()
25 const char *name, int namelen, int *ofs) in omfs_get_bucket() argument
28 int bucket = omfs_hash(name, namelen, nbuckets); in omfs_get_bucket()
35 const char *name, int namelen, in omfs_scan_list() argument
56 if (strncmp(oi->i_name, name, namelen) == 0) in omfs_scan_list()
68 const char *name, int namelen) in omfs_find_entry() argument
74 bh = omfs_get_bucket(dir, name, namelen, &ofs); in omfs_find_entry()
81 return omfs_scan_list(dir, block, name, namelen, &dummy); in omfs_find_entry()
115 int namelen = dentry->d_name.len; in omfs_add_link() local
[all …]
/fs/efs/
Ddir.c65 int namelen; in efs_readdir() local
73 namelen = dirslot->namelen; in efs_readdir()
77 inodenum, nameptr, namelen); in efs_readdir()
78 if (!namelen) in efs_readdir()
84 if (nameptr - (char *) dirblock + namelen > EFS_DIRBSIZE) { in efs_readdir()
91 if (!dir_emit(ctx, nameptr, namelen, inodenum, DT_UNKNOWN)) { in efs_readdir()
/fs/xfs/
Dxfs_xattr.c125 int namelen) in __xfs_xattr_put_listent() argument
136 arraytop = context->count + prefix_len + namelen + 1; in __xfs_xattr_put_listent()
145 strncpy(offset, (char *)name, namelen); /* real name */ in __xfs_xattr_put_listent()
146 offset += namelen; in __xfs_xattr_put_listent()
150 context->count += prefix_len + namelen + 1; in __xfs_xattr_put_listent()
159 int namelen, in xfs_xattr_put_listent() argument
169 if (namelen == SGI_ACL_FILE_SIZE && in xfs_xattr_put_listent()
177 } else if (namelen == SGI_ACL_DEFAULT_SIZE && in xfs_xattr_put_listent()
206 namelen); in xfs_xattr_put_listent()
Dxfs_attr_list.c90 (int)sfe->namelen, in xfs_attr_shortform_list()
132 sbp->hash = xfs_da_hashname(sfe->nameval, sfe->namelen); in xfs_attr_shortform_list()
134 sbp->namelen = sfe->namelen; in xfs_attr_shortform_list()
180 sbp->namelen, in xfs_attr_shortform_list()
433 int namelen, valuelen; in xfs_attr3_leaf_list_int() local
449 namelen = name_loc->namelen; in xfs_attr3_leaf_list_int()
456 namelen = name_rmt->namelen; in xfs_attr3_leaf_list_int()
461 name, namelen, valuelen); in xfs_attr3_leaf_list_int()
532 #define ATTR_ENTSIZE(namelen) /* actual bytes used by an attr */ \ argument
533 ((ATTR_ENTBASESIZE + (namelen) + 1 + sizeof(uint32_t)-1) \
[all …]
/fs/jfs/
Dxattr.c98 return ea->namelen; in name_size()
100 return ea->namelen + XATTR_OS2_PREFIX_LEN; in name_size()
105 int len = ea->namelen; in copy_name()
112 memcpy(buffer, ea->name, ea->namelen); in copy_name()
113 buffer[ea->namelen] = 0; in copy_name()
664 int namelen = strlen(name); in __jfs_setxattr() local
684 if ((namelen == ea->namelen) && in __jfs_setxattr()
685 (memcmp(name, ea->name, namelen) == 0)) { in __jfs_setxattr()
710 new_size += sizeof (struct jfs_ea) + namelen + 1 + value_len; in __jfs_setxattr()
756 ea->namelen = namelen; in __jfs_setxattr()
[all …]
/fs/ocfs2/
Ddir.h43 int ocfs2_find_entry(const char *name, int namelen,
51 const char *name, int namelen,
71 int namelen);
75 int namelen,
80 int namelen, u64 *blkno);
87 int namelen,
/fs/afs/
Dxattr.c341 size_t namelen; in afs_xattr_get_cell() local
343 namelen = cell->name_len; in afs_xattr_get_cell()
345 return namelen; in afs_xattr_get_cell()
346 if (namelen > size) in afs_xattr_get_cell()
348 memcpy(buffer, cell->name, namelen); in afs_xattr_get_cell()
349 return namelen; in afs_xattr_get_cell()
406 size_t namelen; in afs_xattr_get_volume() local
408 namelen = strlen(volname); in afs_xattr_get_volume()
410 return namelen; in afs_xattr_get_volume()
411 if (namelen > size) in afs_xattr_get_volume()
[all …]
/fs/xfs/scrub/
Dattr.c111 int namelen, in xchk_xattr_listent() argument
132 if (!xfs_attr_namecheck(name, namelen)) { in xchk_xattr_listent()
159 args.namelen = namelen; in xchk_xattr_listent()
160 args.hashval = xfs_da_hashname(args.name, args.namelen); in xchk_xattr_listent()
279 namesize = xfs_attr_leaf_entsize_local(lentry->namelen, in xchk_xattr_entry()
282 if (lentry->namelen == 0) in xchk_xattr_entry()
286 namesize = xfs_attr_leaf_entsize_remote(rentry->namelen); in xchk_xattr_entry()
288 if (rentry->namelen == 0 || rentry->valueblk == 0) in xchk_xattr_entry()
449 if (lentry->namelen <= 0) { in xchk_xattr_rec()
453 calc_hash = xfs_da_hashname(lentry->nameval, lentry->namelen); in xchk_xattr_rec()
[all …]
/fs/nfsd/
Dnfs4idmap.c524 idmap_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen, in idmap_name_to_id() argument
533 if (namelen + 1 > sizeof(key.name)) in idmap_name_to_id()
535 memcpy(key.name, name, namelen); in idmap_name_to_id()
536 key.name[namelen] = '\0'; in idmap_name_to_id()
590 numeric_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen, u32 *id) in numeric_name_to_id() argument
595 if (namelen + 1 > sizeof(buf)) in numeric_name_to_id()
599 memcpy(buf, name, namelen); in numeric_name_to_id()
600 buf[namelen] = '\0'; in numeric_name_to_id()
606 do_name_to_id(struct svc_rqst *rqstp, int type, const char *name, u32 namelen, u32 *id) in do_name_to_id() argument
609 if (numeric_name_to_id(rqstp, type, name, namelen, id)) in do_name_to_id()
[all …]
/fs/hpfs/
Ddnode.c175 unsigned namelen, secno down_ptr) in hpfs_add_de() argument
179 unsigned d_size = de_size(namelen, down_ptr); in hpfs_add_de()
181 int c = hpfs_compare_names(s, name, namelen, de->name, de->namelen, de->last); in hpfs_add_de()
183 hpfs_error(s, "name (%c,%d) already exists in dnode %08x", *name, namelen, le32_to_cpu(d->self)); in hpfs_add_de()
195 de->not_8x3 = hpfs_is_name_long(name, namelen); in hpfs_add_de()
196 de->namelen = namelen; in hpfs_add_de()
197 memcpy(de->name, name, namelen); in hpfs_add_de()
238 const unsigned char *name, unsigned namelen, in hpfs_add_to_dnode() argument
257 if (namelen >= 256) { in hpfs_add_to_dnode()
258 hpfs_error(i->i_sb, "%s(): namelen == %d", __func__, namelen); in hpfs_add_to_dnode()
[all …]
Dea.c33 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove()
37 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove()
105 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_read_ea()
112 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), buf)) in hpfs_read_ea()
117 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_read_ea()
163 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_get_ea()
172 if (hpfs_ea_read(s, a, ano, pos + 4 + ea->namelen + 1, ea_valuelen(ea), ret)) { in hpfs_get_ea()
179 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_get_ea()
224 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 1 + (ea_indirect(ea) ? 8 : 0), ex + 4)) in hpfs_set_ea()
233 hpfs_ea_write(s, a, ano, pos + 4 + ea->namelen + 1, size, data); in hpfs_set_ea()
[all …]
/fs/cramfs/
Dinode.c727 int namelen; in cramfs_readdir() local
738 namelen = de->namelen << 2; in cramfs_readdir()
739 memcpy(buf, name, namelen); in cramfs_readdir()
743 nextoffset = offset + sizeof(*de) + namelen; in cramfs_readdir()
745 if (!namelen) { in cramfs_readdir()
749 if (buf[namelen-1]) in cramfs_readdir()
751 namelen--; in cramfs_readdir()
753 if (!dir_emit(ctx, buf, namelen, ino, mode >> 12)) in cramfs_readdir()
776 int namelen, retval; in cramfs_lookup() local
786 namelen = de->namelen << 2; in cramfs_lookup()
[all …]
/fs/cifs/
Dreaddir.c408 size_t namelen; member
418 de->namelen = cifs_unicode_bytelen(de->name); in cifs_fill_dirent_unix()
420 de->namelen = strnlen(de->name, PATH_MAX); in cifs_fill_dirent_unix()
429 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_dir()
437 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_full()
445 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_search()
454 de->namelen = le32_to_cpu(info->FileNameLength); in cifs_fill_dirent_both()
463 de->namelen = info->FileNameLength; in cifs_fill_dirent_std()
511 if (de->namelen == 2) { in cifs_entry_is_dot()
515 } else if (de->namelen == 4) { in cifs_entry_is_dot()
[all …]
/fs/qnx4/
Dnamei.c30 int namelen, thislen; in qnx4_match() local
39 namelen = QNX4_NAME_MAX; in qnx4_match()
41 namelen = QNX4_SHORT_NAME_MAX; in qnx4_match()
44 if ( thislen > namelen ) in qnx4_match()
45 thislen = namelen; in qnx4_match()
/fs/efivarfs/
Dinode.c73 int namelen, i = 0, err = 0; in efivarfs_create() local
84 namelen = dentry->d_name.len - EFI_VARIABLE_GUID_LEN - 1; in efivarfs_create()
86 err = guid_parse(dentry->d_name.name + namelen + 1, &var->var.VendorGuid); in efivarfs_create()
91 dentry->d_name.name, namelen)) in efivarfs_create()
100 for (i = 0; i < namelen; i++) in efivarfs_create()

12345