Home
last modified time | relevance | path

Searched refs:len (Results 1 – 25 of 744) sorted by relevance

12345678910>>...30

/fs/isofs/
Drock.c30 int len; member
56 rs->len = sizeof(struct iso_directory_record) + de->name_len[0]; in setup_rock_ridge()
57 if (rs->len & 1) in setup_rock_ridge()
58 (rs->len)++; in setup_rock_ridge()
59 rs->chr = (unsigned char *)de + rs->len; in setup_rock_ridge()
60 rs->len = *((unsigned char *)de) - rs->len; in setup_rock_ridge()
61 if (rs->len < 0) in setup_rock_ridge()
62 rs->len = 0; in setup_rock_ridge()
65 rs->len -= ISOFS_SB(inode->i_sb)->s_rock_offset; in setup_rock_ridge()
67 if (rs->len < 0) in setup_rock_ridge()
[all …]
Djoliet.c18 uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls) in uni16_to_x8() argument
26 while ((ch = get_unaligned(ip)) && len) { in uni16_to_x8()
35 len--; in uni16_to_x8()
45 unsigned char len = 0; in get_joliet_filename() local
50 len = utf16s_to_utf8s((const wchar_t *) de->name, in get_joliet_filename()
54 len = uni16_to_x8(outname, (__be16 *) de->name, in get_joliet_filename()
57 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) in get_joliet_filename()
58 len -= 2; in get_joliet_filename()
64 while (len >= 2 && (outname[len-1] == '.')) in get_joliet_filename()
65 len--; in get_joliet_filename()
[all …]
/fs/cachefiles/
Dkey.c38 int loop, len, max, seg, mark, print; in cachefiles_cook_key() local
81 len = 0; in cachefiles_cook_key()
85 len = 5; in cachefiles_cook_key()
86 mark = len - 1; 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()
95 len += 2; in cachefiles_cook_key()
100 key[len++] = '\0'; in cachefiles_cook_key()
101 mark = len; in cachefiles_cook_key()
102 key[len++] = '+'; in cachefiles_cook_key()
[all …]
/fs/hpfs/
Dname.c42 int hpfs_chk_name(const unsigned char *name, unsigned *len) in hpfs_chk_name() argument
45 if (*len > 254) return -ENAMETOOLONG; in hpfs_chk_name()
46 hpfs_adjust_length(name, len); in hpfs_chk_name()
47 if (!*len) return -EINVAL; in hpfs_chk_name()
48 for (i = 0; i < *len; i++) if (not_allowed_char(name[i])) return -EINVAL; in hpfs_chk_name()
49 if (*len == 1) if (name[0] == '.') return -EINVAL; in hpfs_chk_name()
50 if (*len == 2) if (name[0] == '.' && name[1] == '.') return -EINVAL; in hpfs_chk_name()
55 unsigned len, int lc, int lng) in hpfs_translate_name() argument
59 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { in hpfs_translate_name()
61 for (i = 0; i < len; i++) in hpfs_translate_name()
[all …]
/fs/ocfs2/dlm/
Ddlmdebug.c33 int len);
89 stringify_lockname(res->lockname.name, res->lockname.len, in __dlm_print_one_lock_resource()
237 int len) in stringify_lockname() argument
247 out += scnprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname()
251 out += scnprintf(buf + out, len - out, "%.*s", in stringify_lockname()
257 char *buf, int len) in stringify_nodemap() argument
263 out += scnprintf(buf + out, len - out, "%d ", i); in stringify_nodemap()
268 static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) in dump_mle() argument
280 out += stringify_lockname(mle->mname, mle->mnamelen, buf + out, len - out); in dump_mle()
281 out += scnprintf(buf + out, len - out, in dump_mle()
[all …]
/fs/nfsd/
Dblocklayoutxdr.c21 int len = sizeof(__be32) + 5 * sizeof(__be64) + sizeof(__be32); in nfsd4_block_encode_layoutget() local
24 p = xdr_reserve_space(xdr, sizeof(__be32) + len); in nfsd4_block_encode_layoutget()
28 *p++ = cpu_to_be32(len); in nfsd4_block_encode_layoutget()
34 p = xdr_encode_hyper(p, b->len); in nfsd4_block_encode_layoutget()
44 int len; in nfsd4_block_encode_volume() local
48 len = 4 + 4 + 8 + 4 + (XDR_QUADLEN(b->simple.sig_len) << 2); in nfsd4_block_encode_volume()
49 p = xdr_reserve_space(xdr, len); in nfsd4_block_encode_volume()
59 len = 4 + 4 + 4 + 4 + (XDR_QUADLEN(b->scsi.designator_len) << 2) + 8; in nfsd4_block_encode_volume()
60 p = xdr_reserve_space(xdr, len); in nfsd4_block_encode_volume()
74 return len; in nfsd4_block_encode_volume()
[all …]
/fs/crypto/
Dfname.c66 if (str->len == 1 && str->name[0] == '.') in fscrypt_is_dot_dotdot()
69 if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.') in fscrypt_is_dot_dotdot()
101 if (WARN_ON(olen < iname->len)) in fscrypt_fname_encrypt()
103 memcpy(out, iname->name, iname->len); in fscrypt_fname_encrypt()
104 memset(out + iname->len, 0, olen - iname->len); in fscrypt_fname_encrypt()
164 sg_init_one(&src_sg, iname->name, iname->len); in fname_decrypt()
165 sg_init_one(&dst_sg, oname->name, oname->len); in fname_decrypt()
166 skcipher_request_set_crypt(req, &src_sg, &dst_sg, iname->len, &iv); in fname_decrypt()
174 oname->len = strnlen(oname->name, iname->len); in fname_decrypt()
194 static int base64_encode(const u8 *src, int len, char *dst) in base64_encode() argument
[all …]
/fs/hfs/
Dstring.c57 unsigned int hash, len = this->len; in hfs_hash_dentry() local
59 if (len > HFS_NAMELEN) in hfs_hash_dentry()
60 len = HFS_NAMELEN; in hfs_hash_dentry()
63 for (; len; len--) in hfs_hash_dentry()
79 int len, tmp; in hfs_strcmp() local
81 len = (len1 > len2) ? len2 : len1; in hfs_strcmp()
83 while (len--) { in hfs_strcmp()
96 unsigned int len, const char *str, const struct qstr *name) in hfs_compare_dentry() argument
100 if (len >= HFS_NAMELEN) { in hfs_compare_dentry()
101 if (name->len < HFS_NAMELEN) in hfs_compare_dentry()
[all …]
/fs/f2fs/
Dhash.c42 static void str2hashbuf(const unsigned char *msg, size_t len, in str2hashbuf() argument
48 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf()
52 if (len > num * 4) in str2hashbuf()
53 len = num * 4; in str2hashbuf()
54 for (i = 0; i < len; i++) { in str2hashbuf()
70 static u32 TEA_hash_name(const u8 *p, size_t len) in TEA_hash_name() argument
81 str2hashbuf(p, len, in, 4); in TEA_hash_name()
84 if (len <= 16) in TEA_hash_name()
86 len -= 16; in TEA_hash_name()
99 size_t len = fname->disk_name.len; in f2fs_hash_filename() local
[all …]
Dsysfs.c132 int len = 0; in features_show() local
135 len += scnprintf(buf, PAGE_SIZE - len, "%s", in features_show()
138 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
139 len ? ", " : "", "blkzoned"); in features_show()
141 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
142 len ? ", " : "", "extra_attr"); in features_show()
144 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
145 len ? ", " : "", "projquota"); in features_show()
147 len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show()
148 len ? ", " : "", "inode_checksum"); in features_show()
[all …]
/fs/
Dremap_range.c100 static int remap_verify_area(struct file *file, loff_t pos, loff_t len, in remap_verify_area() argument
105 if (unlikely(pos < 0 || len < 0)) in remap_verify_area()
108 if (unlikely((loff_t) (pos + len) < 0)) in remap_verify_area()
112 loff_t end = len ? pos + len - 1 : OFFSET_MAX; in remap_verify_area()
138 loff_t *len, in generic_remap_check_len() argument
142 loff_t new_len = *len; in generic_remap_check_len()
144 if ((*len & blkmask) == 0) in generic_remap_check_len()
147 if (pos_out + *len < i_size_read(inode_out)) in generic_remap_check_len()
150 if (new_len == *len) in generic_remap_check_len()
154 *len = new_len; in generic_remap_check_len()
[all …]
Dsplice.c205 buf->len = spd->partial[page_nr].len; in splice_to_pipe()
213 ret += buf->len; in splice_to_pipe()
245 return buf->len; in add_to_pipe()
299 struct pipe_inode_info *pipe, size_t len, in generic_file_splice_read() argument
307 iov_iter_pipe(&to, READ, pipe, len); in generic_file_splice_read()
360 if (sd->len < sd->total_len && in pipe_to_sendpage()
365 sd->len, &pos, more); in pipe_to_sendpage()
407 sd->len = buf->len; in splice_from_pipe_feed()
408 if (sd->len > sd->total_len) in splice_from_pipe_feed()
409 sd->len = sd->total_len; in splice_from_pipe_feed()
[all …]
/fs/ubifs/
Dio.c88 int len, int even_ebadmsg) in ubifs_leb_read() argument
92 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read()
99 len, lnum, offs, err); in ubifs_leb_read()
106 int len) in ubifs_leb_write() argument
114 err = ubi_leb_write(c->ubi, lnum, buf, offs, len); in ubifs_leb_write()
116 err = dbg_leb_write(c, lnum, buf, offs, len); in ubifs_leb_write()
119 len, lnum, offs, err); in ubifs_leb_write()
126 int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len) in ubifs_leb_change() argument
134 err = ubi_leb_change(c->ubi, lnum, buf, len); in ubifs_leb_change()
136 err = dbg_leb_change(c, lnum, buf, len); in ubifs_leb_change()
[all …]
Dscan.c28 static int scan_padding_bytes(void *buf, int len) in scan_padding_bytes() argument
30 int pad_len = 0, max_pad_len = min_t(int, UBIFS_PAD_NODE_SZ, len); in scan_padding_bytes()
57 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument
71 return scan_padding_bytes(buf, len); in ubifs_scan_a_node()
73 if (len < UBIFS_CH_SZ) in ubifs_scan_a_node()
85 int node_len = le32_to_cpu(ch->len); in ubifs_scan_a_node()
195 snod->len = le32_to_cpu(ch->len); in ubifs_add_snod()
228 int len; in ubifs_scanned_corruption() local
231 len = c->leb_size - offs; in ubifs_scanned_corruption()
232 if (len > 8192) in ubifs_scanned_corruption()
[all …]
Drecovery.c50 static int is_empty(void *buf, int len) in is_empty() argument
55 for (i = 0; i < len; i++) in is_empty()
69 static int first_non_ff(void *buf, int len) in first_non_ff() argument
74 for (i = 0; i < len; i++) in first_non_ff()
101 int err, offs, len; in get_master_node() local
115 len = c->leb_size; in get_master_node()
123 len -= sz; in get_master_node()
131 len += sz; in get_master_node()
132 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node()
137 len += sz; in get_master_node()
[all …]
/fs/exfat/
Dnls.c409 int len; in exfat_convert_char_to_ucs2() local
418 len = nls->char2uni(ch, ch_len, ucs2); in exfat_convert_char_to_ucs2()
419 if (len < 0) { in exfat_convert_char_to_ucs2()
426 return len; in exfat_convert_char_to_ucs2()
432 int len; in exfat_convert_ucs2_to_char() local
441 len = nls->uni2char(ucs2, ch, MAX_CHARSET_SIZE); in exfat_convert_ucs2_to_char()
442 if (len < 0) { in exfat_convert_ucs2_to_char()
449 return len; in exfat_convert_ucs2_to_char()
469 unsigned short *b, unsigned int len) in exfat_uniname_ncmp() argument
473 for (i = 0; i < len; i++, a++, b++) in exfat_uniname_ncmp()
[all …]
/fs/nfs/
Dnfs4namespace.c36 ssize_t len = 0; in nfs4_pathname_len() local
42 if (component->len > NAME_MAX) in nfs4_pathname_len()
44 len += 1 + component->len; /* Adding "/foo" */ in nfs4_pathname_len()
45 if (len > PATH_MAX) in nfs4_pathname_len()
48 return len; in nfs4_pathname_len()
60 ssize_t len; in nfs4_pathname_string() local
64 len = nfs4_pathname_len(pathname); in nfs4_pathname_string()
65 if (len < 0) in nfs4_pathname_string()
66 return ERR_PTR(len); in nfs4_pathname_string()
67 *_len = len; in nfs4_pathname_string()
[all …]
/fs/cifs/
Ddns_resolve.c51 int len, rc; in dns_resolve_server_name_to_ip() local
56 len = strlen(unc); in dns_resolve_server_name_to_ip()
57 if (len < 3) { in dns_resolve_server_name_to_ip()
63 len -= 2; in dns_resolve_server_name_to_ip()
67 sep = memchr(hostname, '/', len); in dns_resolve_server_name_to_ip()
69 len = sep - hostname; in dns_resolve_server_name_to_ip()
75 rc = cifs_convert_address((struct sockaddr *)&ss, hostname, len); in dns_resolve_server_name_to_ip()
80 rc = dns_query(current->nsproxy->net_ns, NULL, hostname, len, in dns_resolve_server_name_to_ip()
84 __func__, len, len, hostname); in dns_resolve_server_name_to_ip()
87 __func__, len, len, hostname, *ip_addr); in dns_resolve_server_name_to_ip()
[all …]
Dcifs_unicode.c123 int len = 1; in cifs_mapchar() local
129 return len; in cifs_mapchar()
132 return len; in cifs_mapchar()
135 len = cp->uni2char(src_char, target, NLS_MAX_CHARSET_SIZE); in cifs_mapchar()
136 if (len <= 0) in cifs_mapchar()
139 return len; in cifs_mapchar()
145 len = utf16s_to_utf8s(from, 3, UTF16_LITTLE_ENDIAN, target, 6); in cifs_mapchar()
146 if (len <= 0) in cifs_mapchar()
148 return len; in cifs_mapchar()
152 len = 1; in cifs_mapchar()
[all …]
/fs/xfs/
Dxfs_stats.c22 int len = 0; in xfs_stats_format() local
61 len += scnprintf(buf + len, PATH_MAX - len, "%s", in xfs_stats_format()
65 len += scnprintf(buf + len, PATH_MAX - len, " %u", in xfs_stats_format()
67 len += scnprintf(buf + len, PATH_MAX - len, "\n"); in xfs_stats_format()
77 len += scnprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n", in xfs_stats_format()
79 len += scnprintf(buf + len, PATH_MAX-len, "defer_relog %llu\n", in xfs_stats_format()
81 len += scnprintf(buf + len, PATH_MAX-len, "debug %u\n", in xfs_stats_format()
88 return len; in xfs_stats_format()
/fs/ext4/
Dhash.c103 static __u32 dx_hack_hash_unsigned(const char *name, int len) in dx_hack_hash_unsigned() argument
108 while (len--) { in dx_hack_hash_unsigned()
119 static __u32 dx_hack_hash_signed(const char *name, int len) in dx_hack_hash_signed() argument
124 while (len--) { in dx_hack_hash_signed()
135 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument
141 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf_signed()
145 if (len > num*4) in str2hashbuf_signed()
146 len = num * 4; in str2hashbuf_signed()
147 for (i = 0; i < len; i++) { in str2hashbuf_signed()
161 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument
[all …]
/fs/reiserfs/
Dhashes.c44 u32 keyed_hash(const signed char *msg, int len) in keyed_hash() argument
55 pad = (u32) len | ((u32) len << 8); in keyed_hash()
58 while (len >= 16) { in keyed_hash()
72 len -= 16; in keyed_hash()
76 if (len >= 12) { in keyed_hash()
86 for (i = 12; i < len; i++) { in keyed_hash()
90 } else if (len >= 8) { in keyed_hash()
97 for (i = 8; i < len; i++) { in keyed_hash()
101 } else if (len >= 4) { in keyed_hash()
106 for (i = 4; i < len; i++) { in keyed_hash()
[all …]
/fs/lockd/
Dxdr.c49 unsigned int len; in nlm_decode_cookie() local
51 len = ntohl(*p++); in nlm_decode_cookie()
53 if(len==0) in nlm_decode_cookie()
55 c->len=4; in nlm_decode_cookie()
58 else if(len<=NLM_MAXCOOKIELEN) in nlm_decode_cookie()
60 c->len=len; in nlm_decode_cookie()
61 memcpy(c->data, p, len); in nlm_decode_cookie()
62 p+=XDR_QUADLEN(len); in nlm_decode_cookie()
68 len, NLM_MAXCOOKIELEN); in nlm_decode_cookie()
77 *p++ = htonl(c->len); in nlm_encode_cookie()
[all …]
/fs/xfs/libxfs/
Dxfs_ag_resv.c107 xfs_extlen_t len; in xfs_ag_resv_needed() local
109 len = pag->pag_meta_resv.ar_reserved + pag->pag_rmapbt_resv.ar_reserved; in xfs_ag_resv_needed()
113 len -= xfs_perag_resv(pag, type)->ar_reserved; in xfs_ag_resv_needed()
122 trace_xfs_ag_resv_needed(pag, type, len); in xfs_ag_resv_needed()
124 return len; in xfs_ag_resv_needed()
327 xfs_extlen_t len; in xfs_ag_resv_alloc_extent() local
330 trace_xfs_ag_resv_alloc_extent(pag, type, args->len); in xfs_ag_resv_alloc_extent()
345 xfs_trans_mod_sb(args->tp, field, -(int64_t)args->len); in xfs_ag_resv_alloc_extent()
349 len = min_t(xfs_extlen_t, args->len, resv->ar_reserved); in xfs_ag_resv_alloc_extent()
350 resv->ar_reserved -= len; in xfs_ag_resv_alloc_extent()
[all …]
/fs/autofs/
Dwaitq.c94 wq->name.len, wq->name.name, type); in autofs_notify_daemon()
110 mp->len = wq->name.len; in autofs_notify_daemon()
111 memcpy(mp->name, wq->name.name, wq->name.len); in autofs_notify_daemon()
112 mp->name[wq->name.len] = '\0'; in autofs_notify_daemon()
123 ep->len = wq->name.len; in autofs_notify_daemon()
124 memcpy(ep->name, wq->name.name, wq->name.len); in autofs_notify_daemon()
125 ep->name[wq->name.len] = '\0'; in autofs_notify_daemon()
143 packet->len = wq->name.len; in autofs_notify_daemon()
144 memcpy(packet->name, wq->name.name, wq->name.len); in autofs_notify_daemon()
145 packet->name[wq->name.len] = '\0'; in autofs_notify_daemon()
[all …]

12345678910>>...30