/fs/isofs/ |
D | rock.c | 30 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 …]
|
D | joliet.c | 18 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() 46 unsigned char len = 0; in get_joliet_filename() local 52 len = utf16s_to_utf8s((const wchar_t *) de->name, in get_joliet_filename() 56 len = uni16_to_x8(outname, (__be16 *) de->name, in get_joliet_filename() 59 if ((len > 2) && (outname[len-2] == ';') && (outname[len-1] == '1')) in get_joliet_filename() 60 len -= 2; in get_joliet_filename() 66 while (len >= 2 && (outname[len-1] == '.')) in get_joliet_filename() 67 len--; in get_joliet_filename() [all …]
|
/fs/cachefiles/ |
D | key.c | 38 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/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() 52 if (WARN_ON(olen < iname->len)) in fname_encrypt() 54 memcpy(out, iname->name, iname->len); in fname_encrypt() 55 memset(out + iname->len, 0, olen - iname->len); in fname_encrypt() 112 sg_init_one(&src_sg, iname->name, iname->len); in fname_decrypt() 113 sg_init_one(&dst_sg, oname->name, oname->len); in fname_decrypt() 114 skcipher_request_set_crypt(req, &src_sg, &dst_sg, iname->len, &iv); in fname_decrypt() 122 oname->len = strnlen(oname->name, iname->len); in fname_decrypt() 139 static int base64_encode(const u8 *src, int len, char *dst) in base64_encode() argument [all …]
|
/fs/hpfs/ |
D | name.c | 42 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/ |
D | dlmdebug.c | 33 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 += snprintf(buf + out, len - out, "%.*s%08x", in stringify_lockname() 251 out += snprintf(buf + out, len - out, "%.*s", in stringify_lockname() 257 char *buf, int len) in stringify_nodemap() argument 263 out += snprintf(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 += snprintf(buf + out, len - out, in dump_mle() [all …]
|
/fs/nfsd/ |
D | blocklayoutxdr.c | 21 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/f2fs/ |
D | sysfs.c | 116 int len = 0; in features_show() local 122 len += snprintf(buf, PAGE_SIZE - len, "%s", in features_show() 125 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 126 len ? ", " : "", "blkzoned"); in features_show() 128 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 129 len ? ", " : "", "extra_attr"); in features_show() 131 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 132 len ? ", " : "", "projquota"); in features_show() 134 len += snprintf(buf + len, PAGE_SIZE - len, "%s%s", in features_show() 135 len ? ", " : "", "inode_checksum"); in features_show() [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 | 123 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 …]
|
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(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 …]
|
D | smb2misc.c | 96 static __u32 get_neg_ctxt_len(struct smb2_sync_hdr *hdr, __u32 len, in get_neg_ctxt_len() argument 118 if (len < nc_offset + (neg_count * sizeof(struct smb2_neg_context))) { in get_neg_ctxt_len() 124 len - nc_offset, size_of_pad_before_neg_ctxts); in get_neg_ctxt_len() 127 return (len - nc_offset) + size_of_pad_before_neg_ctxts; in get_neg_ctxt_len() 131 smb2_check_message(char *buf, unsigned int len, struct TCP_Server_Info *srvr) in smb2_check_message() argument 168 if (len < pdu_size) { in smb2_check_message() 169 if ((len >= hdr_size) in smb2_check_message() 182 if (len > CIFSMaxBufSize + MAX_SMB2_HDR_SIZE) { in smb2_check_message() 224 clc_len += get_neg_ctxt_len(shdr, len, clc_len); in smb2_check_message() 226 if (len != clc_len) { in smb2_check_message() [all …]
|
/fs/ |
D | splice.c | 205 buf->len = spd->partial[page_nr].len; in splice_to_pipe() 212 ret += buf->len; in splice_to_pipe() 242 return buf->len; in add_to_pipe() 296 struct pipe_inode_info *pipe, size_t len, in generic_file_splice_read() argument 303 iov_iter_pipe(&to, READ, pipe, len); in generic_file_splice_read() 366 struct pipe_inode_info *pipe, size_t len, in default_file_splice_read() argument 386 iov_iter_pipe(&to, READ, pipe, len + offset); in default_file_splice_read() 388 res = iov_iter_get_pages_alloc(&to, &pages, len + offset, &base); in default_file_splice_read() 404 pipe->bufs[to.idx].len -= offset; in default_file_splice_read() 407 size_t this_len = min_t(size_t, len, PAGE_SIZE - offset); in default_file_splice_read() [all …]
|
/fs/btrfs/tests/ |
D | extent-map-tests.c | 24 em->start, em->len, em->block_start, in free_extent_map_tree() 55 u64 len = SZ_8K; in test_case_1() local 66 em->len = SZ_16K; in test_case_1() 87 em->len = SZ_4K; in test_case_1() 108 em->len = len; in test_case_1() 110 em->block_len = len; in test_case_1() 112 ret = btrfs_add_extent_mapping(fs_info, em_tree, &em, em->start, em->len); in test_case_1() 115 test_err("case1 [%llu %llu]: ret %d", start, start + len, ret); in test_case_1() 123 start, start + len, ret, em->start, em->len, in test_case_1() 154 em->len = SZ_1K; in test_case_2() [all …]
|
D | extent-io-tests.c | 272 unsigned long len) in check_eb_bitmap() argument 276 for (i = 0; i < len * BITS_PER_BYTE; i++) { in check_eb_bitmap() 297 unsigned long len) in __test_eb_bitmaps() argument 303 memset(bitmap, 0, len); in __test_eb_bitmaps() 304 memzero_extent_buffer(eb, 0, len); in __test_eb_bitmaps() 305 if (memcmp_extent_buffer(eb, bitmap, 0, len) != 0) { in __test_eb_bitmaps() 310 bitmap_set(bitmap, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() 311 extent_buffer_bitmap_set(eb, 0, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() 312 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 318 bitmap_clear(bitmap, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() [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 | 28 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 …]
|
D | io.c | 88 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 …]
|
D | recovery.c | 50 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/ext4/ |
D | hash.c | 103 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/xfs/libxfs/ |
D | xfs_rmap.c | 33 xfs_extlen_t len, in xfs_rmap_lookup_le() argument 40 cur->bc_rec.r.rm_blockcount = len; in xfs_rmap_lookup_le() 55 xfs_extlen_t len, in xfs_rmap_lookup_eq() argument 62 cur->bc_rec.r.rm_blockcount = len; in xfs_rmap_lookup_eq() 102 xfs_extlen_t len, in xfs_rmap_insert() argument 111 len, owner, offset, flags); in xfs_rmap_insert() 113 error = xfs_rmap_lookup_eq(rcur, agbno, len, owner, offset, flags, &i); in xfs_rmap_insert() 119 rcur->bc_rec.r.rm_blockcount = len; in xfs_rmap_insert() 138 xfs_extlen_t len, in xfs_rmap_delete() argument 147 len, owner, offset, flags); in xfs_rmap_delete() [all …]
|
D | xfs_ag_resv.c | 105 xfs_extlen_t len; in xfs_ag_resv_needed() local 107 len = pag->pag_meta_resv.ar_reserved + pag->pag_rmapbt_resv.ar_reserved; in xfs_ag_resv_needed() 111 len -= xfs_perag_resv(pag, type)->ar_reserved; in xfs_ag_resv_needed() 120 trace_xfs_ag_resv_needed(pag, type, len); in xfs_ag_resv_needed() 122 return len; in xfs_ag_resv_needed() 325 xfs_extlen_t len; in xfs_ag_resv_alloc_extent() local 328 trace_xfs_ag_resv_alloc_extent(pag, type, args->len); in xfs_ag_resv_alloc_extent() 343 xfs_trans_mod_sb(args->tp, field, -(int64_t)args->len); in xfs_ag_resv_alloc_extent() 347 len = min_t(xfs_extlen_t, args->len, resv->ar_reserved); in xfs_ag_resv_alloc_extent() 348 resv->ar_reserved -= len; in xfs_ag_resv_alloc_extent() [all …]
|
/fs/lockd/ |
D | xdr.c | 49 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/autofs/ |
D | waitq.c | 93 wq->name.len, wq->name.name, type); in autofs_notify_daemon() 109 mp->len = wq->name.len; in autofs_notify_daemon() 110 memcpy(mp->name, wq->name.name, wq->name.len); in autofs_notify_daemon() 111 mp->name[wq->name.len] = '\0'; in autofs_notify_daemon() 122 ep->len = wq->name.len; in autofs_notify_daemon() 123 memcpy(ep->name, wq->name.name, wq->name.len); in autofs_notify_daemon() 124 ep->name[wq->name.len] = '\0'; in autofs_notify_daemon() 142 packet->len = wq->name.len; in autofs_notify_daemon() 143 memcpy(packet->name, wq->name.name, wq->name.len); in autofs_notify_daemon() 144 packet->name[wq->name.len] = '\0'; in autofs_notify_daemon() [all …]
|
/fs/xfs/ |
D | xfs_stats.c | 22 int len = 0; in xfs_stats_format() local 60 len += snprintf(buf + len, PATH_MAX - len, "%s", in xfs_stats_format() 64 len += snprintf(buf + len, PATH_MAX - len, " %u", in xfs_stats_format() 66 len += snprintf(buf + len, PATH_MAX - len, "\n"); in xfs_stats_format() 75 len += snprintf(buf + len, PATH_MAX-len, "xpc %Lu %Lu %Lu\n", in xfs_stats_format() 77 len += snprintf(buf + len, PATH_MAX-len, "debug %u\n", in xfs_stats_format() 84 return len; in xfs_stats_format()
|