/fs/isofs/ |
D | rock.c | 29 int len; member 55 rs->len = sizeof(struct iso_directory_record) + de->name_len[0]; in setup_rock_ridge() 56 if (rs->len & 1) in setup_rock_ridge() 57 (rs->len)++; in setup_rock_ridge() 58 rs->chr = (unsigned char *)de + rs->len; in setup_rock_ridge() 59 rs->len = *((unsigned char *)de) - rs->len; in setup_rock_ridge() 60 if (rs->len < 0) in setup_rock_ridge() 61 rs->len = 0; in setup_rock_ridge() 64 rs->len -= ISOFS_SB(inode->i_sb)->s_rock_offset; in setup_rock_ridge() 66 if (rs->len < 0) in setup_rock_ridge() [all …]
|
D | joliet.c | 17 uni16_to_x8(unsigned char *ascii, __be16 *uni, int len, struct nls_table *nls) in uni16_to_x8() argument 25 while ((ch = get_unaligned(ip)) && len) { in uni16_to_x8() 34 len--; in uni16_to_x8() 45 unsigned char len = 0; in get_joliet_filename() local 51 len = utf16s_to_utf8s((const wchar_t *) de->name, in get_joliet_filename() 55 len = uni16_to_x8(outname, (__be16 *) de->name, in get_joliet_filename() 58 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) in get_joliet_filename() 59 len -= 2; in get_joliet_filename() 65 while (len >= 2 && (outname[len-1] == '.')) in get_joliet_filename() 66 len--; in get_joliet_filename() [all …]
|
/fs/crypto/ |
D | fname.c | 20 if (str->len == 1 && str->name[0] == '.') in fscrypt_is_dot_dotdot() 23 if (str->len == 2 && str->name[0] == '.' && str->name[1] == '.') in fscrypt_is_dot_dotdot() 51 if (WARN_ON(olen < iname->len)) in fname_encrypt() 53 memcpy(out, iname->name, iname->len); in fname_encrypt() 54 memset(out + iname->len, 0, olen - iname->len); in fname_encrypt() 105 if (iname->len <= 0 || iname->len > lim) in fname_decrypt() 123 sg_init_one(&src_sg, iname->name, iname->len); in fname_decrypt() 124 sg_init_one(&dst_sg, oname->name, oname->len); in fname_decrypt() 125 skcipher_request_set_crypt(req, &src_sg, &dst_sg, iname->len, iv); in fname_decrypt() 134 oname->len = strnlen(oname->name, iname->len); in fname_decrypt() [all …]
|
/fs/cachefiles/ |
D | key.c | 42 int loop, len, max, seg, mark, print; in cachefiles_cook_key() local 85 len = 0; in cachefiles_cook_key() 89 len = 5; in cachefiles_cook_key() 90 mark = len - 1; in cachefiles_cook_key() 96 key[len + 1] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key() 98 key[len] = cachefiles_charmap[acc & 63]; in cachefiles_cook_key() 99 len += 2; in cachefiles_cook_key() 104 key[len++] = '\0'; in cachefiles_cook_key() 105 mark = len; in cachefiles_cook_key() 106 key[len++] = '+'; in cachefiles_cook_key() [all …]
|
/fs/hpfs/ |
D | name.c | 41 int hpfs_chk_name(const unsigned char *name, unsigned *len) in hpfs_chk_name() argument 44 if (*len > 254) return -ENAMETOOLONG; in hpfs_chk_name() 45 hpfs_adjust_length(name, len); in hpfs_chk_name() 46 if (!*len) return -EINVAL; in hpfs_chk_name() 47 for (i = 0; i < *len; i++) if (not_allowed_char(name[i])) return -EINVAL; in hpfs_chk_name() 48 if (*len == 1) if (name[0] == '.') return -EINVAL; in hpfs_chk_name() 49 if (*len == 2) if (name[0] == '.' && name[1] == '.') return -EINVAL; in hpfs_chk_name() 54 unsigned len, int lc, int lng) in hpfs_translate_name() argument 58 if (hpfs_sb(s)->sb_chk >= 2) if (hpfs_is_name_long(from, len) != lng) { in hpfs_translate_name() 60 for (i = 0; i < len; i++) in hpfs_translate_name() [all …]
|
/fs/nfsd/ |
D | blocklayoutxdr.c | 20 int len = sizeof(__be32) + 5 * sizeof(__be64) + sizeof(__be32); in nfsd4_block_encode_layoutget() local 23 p = xdr_reserve_space(xdr, sizeof(__be32) + len); in nfsd4_block_encode_layoutget() 27 *p++ = cpu_to_be32(len); in nfsd4_block_encode_layoutget() 33 p = xdr_encode_hyper(p, b->len); in nfsd4_block_encode_layoutget() 43 int len; in nfsd4_block_encode_volume() local 47 len = 4 + 4 + 8 + 4 + (XDR_QUADLEN(b->simple.sig_len) << 2); in nfsd4_block_encode_volume() 48 p = xdr_reserve_space(xdr, len); in nfsd4_block_encode_volume() 58 len = 4 + 4 + 4 + 4 + (XDR_QUADLEN(b->scsi.designator_len) << 2) + 8; in nfsd4_block_encode_volume() 59 p = xdr_reserve_space(xdr, len); in nfsd4_block_encode_volume() 73 return len; in nfsd4_block_encode_volume() [all …]
|
/fs/ocfs2/dlm/ |
D | dlmdebug.c | 48 int len); 104 stringify_lockname(res->lockname.name, res->lockname.len, in __dlm_print_one_lock_resource() 252 int len) in stringify_lockname() argument 262 out += snprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname() 266 out += snprintf(buf + out, len - out, "%.*s", in stringify_lockname() 272 char *buf, int len) in stringify_nodemap() argument 278 out += snprintf(buf + out, len - out, "%d ", i); in stringify_nodemap() 283 static int dump_mle(struct dlm_master_list_entry *mle, char *buf, int len) in dump_mle() argument 295 out += stringify_lockname(mle->mname, mle->mnamelen, buf + out, len - out); in dump_mle() 296 out += snprintf(buf + out, len - out, in dump_mle() [all …]
|
/fs/ext4/ |
D | hash.c | 37 static __u32 dx_hack_hash_unsigned(const char *name, int len) in dx_hack_hash_unsigned() argument 42 while (len--) { in dx_hack_hash_unsigned() 53 static __u32 dx_hack_hash_signed(const char *name, int len) in dx_hack_hash_signed() argument 58 while (len--) { in dx_hack_hash_signed() 69 static void str2hashbuf_signed(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_signed() argument 75 pad = (__u32)len | ((__u32)len << 8); in str2hashbuf_signed() 79 if (len > num*4) in str2hashbuf_signed() 80 len = num * 4; in str2hashbuf_signed() 81 for (i = 0; i < len; i++) { in str2hashbuf_signed() 97 static void str2hashbuf_unsigned(const char *msg, int len, __u32 *buf, int num) in str2hashbuf_unsigned() argument [all …]
|
/fs/hfs/ |
D | string.c | 57 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/cifs/ |
D | cifs_unicode.c | 135 int len = 1; in cifs_mapchar() local 141 return len; in cifs_mapchar() 144 return len; in cifs_mapchar() 147 len = cp->uni2char(src_char, target, NLS_MAX_CHARSET_SIZE); in cifs_mapchar() 148 if (len <= 0) in cifs_mapchar() 151 return len; in cifs_mapchar() 157 len = utf16s_to_utf8s(from, 3, UTF16_LITTLE_ENDIAN, target, 6); in cifs_mapchar() 158 if (len <= 0) in cifs_mapchar() 160 return len; in cifs_mapchar() 164 len = 1; in cifs_mapchar() [all …]
|
D | dns_resolve.c | 51 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(NULL, hostname, len, NULL, ip_addr, NULL); in dns_resolve_server_name_to_ip() 83 __func__, len, len, hostname); in dns_resolve_server_name_to_ip() 86 __func__, len, len, hostname, *ip_addr); in dns_resolve_server_name_to_ip() [all …]
|
D | smb2misc.c | 101 __u32 len = get_rfc1002_length(buf); in smb2_check_message() local 107 __func__, length, len); in smb2_check_message() 151 if (len > CIFSMaxBufSize + MAX_SMB2_HDR_SIZE - 4) { in smb2_check_message() 189 if (4 + len != length) { in smb2_check_message() 191 length, 4 + len, mid); in smb2_check_message() 197 if (4 + len != clc_len) { in smb2_check_message() 199 clc_len, 4 + len, mid); in smb2_check_message() 205 if (clc_len + 20 == len && command == SMB2_OPLOCK_BREAK_HE) in smb2_check_message() 208 if (clc_len == 4 + len + 1) in smb2_check_message() 218 if (clc_len < 4 /* RFC1001 header size */ + len) { in smb2_check_message() [all …]
|
/fs/f2fs/ |
D | sysfs.c | 90 int len = 0; in features_show() local 96 len += snprintf(buf, PAGE_SIZE - len, "%s", in features_show() 99 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 100 len ? ", " : "", "blkzoned"); in features_show() 102 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 103 len ? ", " : "", "extra_attr"); in features_show() 105 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 106 len ? ", " : "", "projquota"); in features_show() 108 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 109 len ? ", " : "", "inode_checksum"); in features_show() [all …]
|
/fs/ |
D | splice.c | 203 buf->len = spd->partial[page_nr].len; in splice_to_pipe() 210 ret += buf->len; in splice_to_pipe() 240 return buf->len; in add_to_pipe() 298 struct pipe_inode_info *pipe, size_t len, in generic_file_splice_read() argument 305 iov_iter_pipe(&to, ITER_PIPE | READ, pipe, len); in generic_file_splice_read() 386 struct pipe_inode_info *pipe, size_t len, in default_file_splice_read() argument 406 iov_iter_pipe(&to, ITER_PIPE | READ, pipe, len + offset); in default_file_splice_read() 408 res = iov_iter_get_pages_alloc(&to, &pages, len + offset, &dummy); in default_file_splice_read() 425 pipe->bufs[to.idx].len -= offset; in default_file_splice_read() 428 size_t this_len = min_t(size_t, len, PAGE_SIZE - offset); in default_file_splice_read() [all …]
|
/fs/affs/ |
D | namei.c | 18 unsigned int len, const char *str, const struct qstr *name); 22 unsigned int len, const char *str, const struct qstr *name); 69 u32 len; in __affs_hash_dentry() local 71 retval = affs_check_name(qstr->name, qstr->len, notruncate); in __affs_hash_dentry() 76 len = min(qstr->len, AFFSNAMEMAX); in __affs_hash_dentry() 77 for (; len > 0; name++, len--) in __affs_hash_dentry() 100 static inline int __affs_compare_dentry(unsigned int len, in __affs_compare_dentry() argument 112 if (affs_check_name(name->name, name->len, notruncate)) in __affs_compare_dentry() 119 if (len >= AFFSNAMEMAX) { in __affs_compare_dentry() 120 if (name->len < AFFSNAMEMAX) in __affs_compare_dentry() [all …]
|
/fs/reiserfs/ |
D | hashes.c | 44 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/ubifs/ |
D | scan.c | 40 static int scan_padding_bytes(void *buf, int len) in scan_padding_bytes() argument 42 int pad_len = 0, max_pad_len = min_t(int, UBIFS_PAD_NODE_SZ, len); in scan_padding_bytes() 69 int ubifs_scan_a_node(const struct ubifs_info *c, void *buf, int len, int lnum, in ubifs_scan_a_node() argument 83 return scan_padding_bytes(buf, len); in ubifs_scan_a_node() 85 if (len < UBIFS_CH_SZ) in ubifs_scan_a_node() 97 int node_len = le32_to_cpu(ch->len); in ubifs_scan_a_node() 208 snod->len = le32_to_cpu(ch->len); in ubifs_add_snod() 241 int len; in ubifs_scanned_corruption() local 244 len = c->leb_size - offs; in ubifs_scanned_corruption() 245 if (len > 8192) in ubifs_scanned_corruption() [all …]
|
D | recovery.c | 62 static int is_empty(void *buf, int len) in is_empty() argument 67 for (i = 0; i < len; i++) in is_empty() 81 static int first_non_ff(void *buf, int len) in first_non_ff() argument 86 for (i = 0; i < len; i++) in first_non_ff() 113 int err, offs, len; in get_master_node() local 127 len = c->leb_size; in get_master_node() 135 len -= sz; in get_master_node() 143 len += sz; in get_master_node() 144 ret = ubifs_scan_a_node(c, buf, len, lnum, offs, 1); in get_master_node() 149 len += sz; in get_master_node() [all …]
|
D | io.c | 100 int len, int even_ebadmsg) in ubifs_leb_read() argument 104 err = ubi_read(c->ubi, lnum, buf, offs, len); in ubifs_leb_read() 111 len, lnum, offs, err); in ubifs_leb_read() 118 int len) in ubifs_leb_write() argument 126 err = ubi_leb_write(c->ubi, lnum, buf, offs, len); in ubifs_leb_write() 128 err = dbg_leb_write(c, lnum, buf, offs, len); in ubifs_leb_write() 131 len, lnum, offs, err); in ubifs_leb_write() 138 int ubifs_leb_change(struct ubifs_info *c, int lnum, const void *buf, int len) in ubifs_leb_change() argument 146 err = ubi_leb_change(c->ubi, lnum, buf, len); in ubifs_leb_change() 148 err = dbg_leb_change(c, lnum, buf, len); in ubifs_leb_change() [all …]
|
D | journal.c | 115 static int reserve_space(struct ubifs_info *c, int jhead, int len) in reserve_space() argument 136 if (wbuf->lnum != -1 && avail >= len) in reserve_space() 143 lnum = ubifs_find_free_space(c, len, &offs, squeeze); in reserve_space() 186 if (wbuf->lnum != -1 && avail >= len) { in reserve_space() 255 static int write_node(struct ubifs_info *c, int jhead, void *node, int len, in write_node() argument 266 dbg_jhead(jhead), *lnum, *offs, len); in write_node() 267 ubifs_prepare_node(c, node, len, 0); in write_node() 269 return ubifs_wbuf_write_nolock(wbuf, node, len); in write_node() 286 static int write_head(struct ubifs_info *c, int jhead, void *buf, int len, in write_head() argument 297 dbg_jhead(jhead), *lnum, *offs, len); in write_head() [all …]
|
/fs/btrfs/tests/ |
D | extent-io-tests.c | 277 unsigned long len) in check_eb_bitmap() argument 281 for (i = 0; i < len * BITS_PER_BYTE; i++) { in check_eb_bitmap() 302 unsigned long len) in __test_eb_bitmaps() argument 308 memset(bitmap, 0, len); in __test_eb_bitmaps() 309 memset_extent_buffer(eb, 0, 0, len); in __test_eb_bitmaps() 310 if (memcmp_extent_buffer(eb, bitmap, 0, len) != 0) { in __test_eb_bitmaps() 315 bitmap_set(bitmap, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() 316 extent_buffer_bitmap_set(eb, 0, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() 317 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 323 bitmap_clear(bitmap, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() [all …]
|
/fs/lockd/ |
D | xdr.c | 48 unsigned int len; in nlm_decode_cookie() local 50 len = ntohl(*p++); in nlm_decode_cookie() 52 if(len==0) in nlm_decode_cookie() 54 c->len=4; in nlm_decode_cookie() 57 else if(len<=NLM_MAXCOOKIELEN) in nlm_decode_cookie() 59 c->len=len; in nlm_decode_cookie() 60 memcpy(c->data, p, len); in nlm_decode_cookie() 61 p+=XDR_QUADLEN(len); in nlm_decode_cookie() 67 len, NLM_MAXCOOKIELEN); in nlm_decode_cookie() 76 *p++ = htonl(c->len); in nlm_encode_cookie() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_ag_resv.c | 127 xfs_extlen_t len; in xfs_ag_resv_needed() local 129 len = pag->pag_meta_resv.ar_reserved + pag->pag_agfl_resv.ar_reserved; in xfs_ag_resv_needed() 133 len -= xfs_perag_resv(pag, type)->ar_reserved; in xfs_ag_resv_needed() 142 trace_xfs_ag_resv_needed(pag, type, len); in xfs_ag_resv_needed() 144 return len; in xfs_ag_resv_needed() 322 xfs_extlen_t len; in xfs_ag_resv_alloc_extent() local 325 trace_xfs_ag_resv_alloc_extent(pag, type, args->len); in xfs_ag_resv_alloc_extent() 338 xfs_trans_mod_sb(args->tp, field, -(int64_t)args->len); in xfs_ag_resv_alloc_extent() 342 len = min_t(xfs_extlen_t, args->len, resv->ar_reserved); in xfs_ag_resv_alloc_extent() 343 resv->ar_reserved -= len; in xfs_ag_resv_alloc_extent() [all …]
|
D | xfs_rtbitmap.c | 126 xfs_rtblock_t len; /* length of inspected area */ in xfs_rtfind_back() local 147 len = start - limit + 1; in xfs_rtfind_back() 162 firstbit = XFS_RTMAX((xfs_srtblock_t)(bit - len + 1), 0); in xfs_rtfind_back() 183 if (--word == -1 && i < len) { in xfs_rtfind_back() 211 while (len - i >= XFS_NBWORD) { in xfs_rtfind_back() 229 if (--word == -1 && i < len) { in xfs_rtfind_back() 252 if (len - i) { in xfs_rtfind_back() 257 firstbit = XFS_NBWORD - (len - i); in xfs_rtfind_back() 258 mask = (((xfs_rtword_t)1 << (len - i)) - 1) << firstbit; in xfs_rtfind_back() 271 i = len; in xfs_rtfind_back() [all …]
|
/fs/xfs/ |
D | xfs_stats.c | 35 int len = 0; in xfs_stats_format() local 73 len += snprintf(buf + len, PATH_MAX - len, "%s", in xfs_stats_format() 77 len += snprintf(buf + len, PATH_MAX - len, " %u", in xfs_stats_format() 79 len += snprintf(buf + len, PATH_MAX - len, "\n"); in xfs_stats_format() 88 len += snprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n", in xfs_stats_format() 90 len += snprintf(buf + len, PATH_MAX-len, "debug %u\n", in xfs_stats_format() 97 return len; in xfs_stats_format()
|