Home
last modified time | relevance | path

Searched refs:length (Results 1 – 25 of 135) sorted by relevance

123456

/fs/squashfs/
Dblock.c47 u64 *cur_index, int *offset, int *length) in get_block_length() argument
57 *length = (unsigned char) bh->b_data[*offset]; in get_block_length()
62 *length |= (unsigned char) bh->b_data[0] << 8; in get_block_length()
65 *length = (unsigned char) bh->b_data[*offset] | in get_block_length()
83 int length, u64 *next_index, int srclength, int pages) in squashfs_read_data() argument
97 if (length) { in squashfs_read_data()
102 compressed = SQUASHFS_COMPRESSED_BLOCK(length); in squashfs_read_data()
103 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); in squashfs_read_data()
105 *next_index = index + length; in squashfs_read_data()
108 index, compressed ? "" : "un", length, srclength); in squashfs_read_data()
[all …]
Dcache.c67 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
120 entry->length = squashfs_read_data(sb, entry->data, in squashfs_cache_get()
121 block, length, &entry->next_index, in squashfs_cache_get()
126 if (entry->length < 0) in squashfs_cache_get()
127 entry->error = entry->length; in squashfs_cache_get()
295 int offset, int length) in squashfs_copy_data() argument
297 int remaining = length; in squashfs_copy_data()
299 if (length == 0) in squashfs_copy_data()
302 return min(length, entry->length - offset); in squashfs_copy_data()
304 while (offset < entry->length) { in squashfs_copy_data()
[all …]
Ddir.c57 int err, i, index, length = 0; in get_dir_index_using_offset() local
90 length = index; in get_dir_index_using_offset()
95 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_offset()
100 return length + 3; in get_dir_index_using_offset()
109 int offset = squashfs_i(inode)->offset, length = 0, dir_count, size, in squashfs_readdir() local
158 length = get_dir_index_using_offset(inode->i_sb, &block, &offset, in squashfs_readdir()
164 while (length < i_size_read(inode)) { in squashfs_readdir()
173 length += sizeof(dirh); in squashfs_readdir()
192 length += sizeof(*dire) + size; in squashfs_readdir()
194 if (file->f_pos >= length) in squashfs_readdir()
[all …]
Dnamei.c81 int i, size, length = 0, err; in get_dir_index_using_name() local
116 length = le32_to_cpu(index->index); in get_dir_index_using_name()
121 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_name()
131 return length + 3; in get_dir_index_using_name()
146 int err, length = 0, dir_count, size; in squashfs_lookup() local
161 length = get_dir_index_using_name(dir->i_sb, &block, &offset, in squashfs_lookup()
166 while (length < i_size_read(dir)) { in squashfs_lookup()
175 length += sizeof(dirh); in squashfs_lookup()
194 length += sizeof(*dire) + size; in squashfs_lookup()
Dsymlink.c54 int length = min_t(int, i_size_read(inode) - index, PAGE_CACHE_SIZE); in squashfs_symlink_readpage() local
83 for (bytes = 0; bytes < length; offset = 0, bytes += copied) { in squashfs_symlink_readpage()
95 length - bytes); in squashfs_symlink_readpage()
96 if (copied == length - bytes) in squashfs_symlink_readpage()
97 memset(pageaddr + length, 0, PAGE_CACHE_SIZE - length); in squashfs_symlink_readpage()
Did.c73 unsigned int length = SQUASHFS_ID_BLOCK_BYTES(no_ids); in squashfs_read_id_index_table() local
77 TRACE("In read_id_index_table, length %d\n", length); in squashfs_read_id_index_table()
80 id_table = kmalloc(length, GFP_KERNEL); in squashfs_read_id_index_table()
86 err = squashfs_read_table(sb, id_table, id_table_start, length); in squashfs_read_id_index_table()
Dexport.c126 unsigned int length = SQUASHFS_LOOKUP_BLOCK_BYTES(inodes); in squashfs_read_inode_lookup_table() local
130 TRACE("In read_inode_lookup_table, length %d\n", length); in squashfs_read_inode_lookup_table()
133 inode_lookup_table = kmalloc(length, GFP_KERNEL); in squashfs_read_inode_lookup_table()
140 length); in squashfs_read_inode_lookup_table()
Dfragment.c78 unsigned int length = SQUASHFS_FRAGMENT_INDEX_BYTES(fragments); in squashfs_read_fragment_index_table() local
83 fragment_index = kmalloc(length, GFP_KERNEL); in squashfs_read_fragment_index_table()
90 length); in squashfs_read_fragment_index_table()
/fs/ntfs/
Drunlist.c165 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable()
169 ((dst->lcn + dst->length) == src->lcn)) in ntfs_are_rl_mergeable()
191 dst->length += src->length; in __ntfs_rl_merge()
252 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_append()
256 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_append()
306 merged_length = dst[loc - 1].length; in ntfs_rl_insert()
308 merged_length += src->length; in ntfs_rl_insert()
339 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_insert()
342 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; in ntfs_rl_insert()
347 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; in ntfs_rl_insert()
[all …]
Dlcnalloc.c59 for (; rl->length; rl++) { in ntfs_cluster_free_from_rl_nolock()
64 err = ntfs_bitmap_clear_run(lcnbmp_vi, rl->lcn, rl->length); in ntfs_cluster_free_from_rl_nolock()
383 rl[rlpos - 1].length); in ntfs_cluster_alloc()
384 rl[rlpos - 1].length = ++prev_run_len; in ntfs_cluster_alloc()
390 rl[rlpos - 1].length, in ntfs_cluster_alloc()
401 rl[rlpos - 1].length); in ntfs_cluster_alloc()
410 rl[rlpos].length = prev_run_len = 1; in ntfs_cluster_alloc()
566 rl[rlpos - 1].length; in ntfs_cluster_alloc()
609 rl[rlpos - 1].length; in ntfs_cluster_alloc()
650 rl[rlpos - 1].length; in ntfs_cluster_alloc()
[all …]
Ddebug.c168 (long long)(rl + i)->length, in ntfs_debug_dump_runlist()
169 (rl + i)->length ? "" : in ntfs_debug_dump_runlist()
175 (long long)(rl + i)->length, in ntfs_debug_dump_runlist()
176 (rl + i)->length ? "" : in ntfs_debug_dump_runlist()
178 if (!(rl + i)->length) in ntfs_debug_dump_runlist()
Dindex.c183 for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) { in ntfs_index_lookup()
187 (u8*)ie + le16_to_cpu(ie->length) > index_end) in ntfs_index_lookup()
201 le16_to_cpu(ie->length)) in ntfs_index_lookup()
260 vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8)); in ntfs_index_lookup()
347 for (;; ie = (INDEX_ENTRY*)((u8*)ie + le16_to_cpu(ie->length))) { in ntfs_index_lookup()
351 (u8*)ie + le16_to_cpu(ie->length) > index_end) { in ntfs_index_lookup()
368 le16_to_cpu(ie->length)) { in ntfs_index_lookup()
421 vcn = sle64_to_cpup((sle64*)((u8*)ie + le16_to_cpu(ie->length) - 8)); in ntfs_index_lookup()
/fs/xfs/
Dxfs_dir2_data.c86 if (!bf[0].length) { in xfs_dir2_data_check()
90 if (!bf[1].length) { in xfs_dir2_data_check()
94 if (!bf[2].length) { in xfs_dir2_data_check()
98 ASSERT(be16_to_cpu(bf[0].length) >= be16_to_cpu(bf[1].length)); in xfs_dir2_data_check()
99 ASSERT(be16_to_cpu(bf[1].length) >= be16_to_cpu(bf[2].length)); in xfs_dir2_data_check()
120 ASSERT(be16_to_cpu(dup->length) <= in xfs_dir2_data_check()
121 be16_to_cpu(bf[2].length)); in xfs_dir2_data_check()
123 p += be16_to_cpu(dup->length); in xfs_dir2_data_check()
202 ASSERT(!dfp->length); in xfs_dir2_data_freefind()
209 ASSERT(dfp->length == dup->length); in xfs_dir2_data_freefind()
[all …]
Dxfs_dir2_leaf.c143 bestsp[0] = block->hdr.bestfree[0].length; in xfs_dir2_block_to_leaf()
177 int length; /* length of new entry */ in xfs_dir2_leaf_addname() local
214 length = xfs_dir2_data_entsize(args->namelen); in xfs_dir2_leaf_addname()
229 if (be16_to_cpu(bestsp[i]) >= length) { in xfs_dir2_leaf_addname()
244 else if (be16_to_cpu(bestsp[i]) >= length) { in xfs_dir2_leaf_addname()
373 bestsp[use_block] = data->hdr.bestfree[0].length; in xfs_dir2_leaf_addname()
396 ASSERT(be16_to_cpu(dup->length) >= length); in xfs_dir2_leaf_addname()
402 (xfs_dir2_data_aoff_t)((char *)dup - (char *)data), length, in xfs_dir2_leaf_addname()
428 if (be16_to_cpu(bestsp[use_block]) != be16_to_cpu(data->hdr.bestfree[0].length)) { in xfs_dir2_leaf_addname()
429 bestsp[use_block] = data->hdr.bestfree[0].length; in xfs_dir2_leaf_addname()
[all …]
/fs/ncpfs/
Dsymlink.c46 int error, length, len; in ncp_symlink_readpage() local
59 0,NCP_MAX_SYMLINK_SIZE,rawlink,&length); in ncp_symlink_readpage()
68 if (length<NCP_MIN_SYMLINK_SIZE || in ncp_symlink_readpage()
73 length -= 8; in ncp_symlink_readpage()
79 error = ncp_vol2io(NCP_SERVER(inode), buf, &len, link, length, 0); in ncp_symlink_readpage()
110 int length, err, i, outlen; in ncp_symlink() local
145 length = strlen(symname); in ncp_symlink()
149 err = ncp_io2vol(NCP_SERVER(dir), rawlink + hdr, &outlen, symname, length, 0); in ncp_symlink()
/fs/coda/
Dupcall.c130 const char *name, int length, int * type, in venus_lookup() argument
139 insize = max_t(unsigned int, offset + length +1, OUTSIZE(lookup)); in venus_lookup()
146 memcpy((char *)(inp) + offset, name, length); in venus_lookup()
147 *((char *)inp + offset + length) = '\0'; in venus_lookup()
201 const char *name, int length, in venus_mkdir() argument
210 insize = max_t(unsigned int, offset + length + 1, OUTSIZE(mkdir)); in venus_mkdir()
217 memcpy((char *)(inp) + offset, name, length); in venus_mkdir()
218 *((char *)inp + offset + length) = '\0'; in venus_mkdir()
269 const char *name, int length, int excl, int mode, in venus_create() argument
278 insize = max_t(unsigned int, offset + length + 1, OUTSIZE(create)); in venus_create()
[all …]
/fs/
Dopen.c198 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, in do_truncate() argument
205 if (length < 0) in do_truncate()
208 newattrs.ia_size = length; in do_truncate()
224 static long do_sys_truncate(const char __user *pathname, loff_t length) in do_sys_truncate() argument
231 if (length < 0) /* sorry, but loff_t says... */ in do_sys_truncate()
272 error = locks_verify_truncate(inode, NULL, length); in do_sys_truncate()
274 error = security_path_truncate(&path, length, 0); in do_sys_truncate()
277 error = do_truncate(path.dentry, length, 0, NULL); in do_sys_truncate()
290 SYSCALL_DEFINE2(truncate, const char __user *, path, unsigned long, length) in SYSCALL_DEFINE2() argument
293 return do_sys_truncate(path, (long)length); in SYSCALL_DEFINE2()
[all …]
Dioctl.c258 long long length = 0, map_len = 0; in __generic_block_fiemap() local
268 length = (long long)min_t(u64, len, i_size_read(inode)); in __generic_block_fiemap()
269 map_len = length; in __generic_block_fiemap()
289 if (length <= 0) { in __generic_block_fiemap()
297 length -= blk_to_logical(inode, 1); in __generic_block_fiemap()
300 if (length <= 0) in __generic_block_fiemap()
305 if (length <= 0 && size) { in __generic_block_fiemap()
318 length -= tmp.b_size; in __generic_block_fiemap()
328 if (length <= 0) in __generic_block_fiemap()
/fs/configfs/
Dsymlink.c48 int length = 1; in item_path_length() local
50 length += strlen(config_item_name(p)) + 1; in item_path_length()
53 return length; in item_path_length()
56 static void fill_item_path(struct config_item * item, char * buffer, int length) in fill_item_path() argument
60 --length; in fill_item_path()
65 length -= cur; in fill_item_path()
66 strncpy(buffer + length,config_item_name(p),cur); in fill_item_path()
67 *(buffer + --length) = '/'; in fill_item_path()
/fs/gfs2/
Drgrp.c256 u32 length = rgd->rd_length; in gfs2_rgrp_verify() local
263 for (buf = 0; buf < length; buf++) { in gfs2_rgrp_verify()
421 u32 length = rgd->rd_length; /* # blocks in hdr & bitmap */ in compute_bitstructs() local
425 if (!length) in compute_bitstructs()
428 rgd->rd_bits = kcalloc(length, sizeof(struct gfs2_bitmap), GFP_NOFS); in compute_bitstructs()
434 for (x = 0; x < length; x++) { in compute_bitstructs()
438 if (length == 1) { in compute_bitstructs()
450 } else if (x + 1 == length) { in compute_bitstructs()
471 bi = rgd->rd_bits + (length - 1); in compute_bitstructs()
734 unsigned int length = rgd->rd_length; in gfs2_rgrp_bh_get() local
[all …]
/fs/jfs/
Djfs_unicode.c118 int length = dentry->d_name.len; in get_UCSname() local
120 if (length > JFS_NAME_MAX) in get_UCSname()
124 kmalloc((length + 1) * sizeof(wchar_t), GFP_NOFS); in get_UCSname()
130 length, nls_tab); in get_UCSname()
/fs/hpfs/
Danode.c38 btree->u.external[i].file_secno + btree->u.external[i].length > sec) { in hpfs_bplus_lookup()
48 hpfs_inode->i_n_secs = btree->u.external[i].length; in hpfs_bplus_lookup()
97 if (btree->u.external[n].file_secno + btree->u.external[n].length != fsecno) { in hpfs_add_sector_to_btree()
99 btree->u.external[n].file_secno + btree->u.external[n].length, fsecno, in hpfs_add_sector_to_btree()
104 …if (hpfs_alloc_if_possible(s, se = btree->u.external[n].disk_secno + btree->u.external[n].length))… in hpfs_add_sector_to_btree()
105 btree->u.external[n].length++; in hpfs_add_sector_to_btree()
122 fs = n < 0 ? 0 : btree->u.external[n].file_secno + btree->u.external[n].length; in hpfs_add_sector_to_btree()
159 btree->u.external[n].length = 1; in hpfs_add_sector_to_btree()
293 hpfs_free_sectors(s, btree1->u.external[i].disk_secno, btree1->u.external[i].length); in hpfs_remove_btree()
449 if (btree->u.external[i].file_secno + btree->u.external[i].length >= secs) goto ff; in hpfs_truncate_btree()
[all …]
/fs/jffs2/
Dxattr.c204 uint32_t crc, length; in do_load_xattr_datum() local
210 length = xd->name_len + 1 + xd->value_len; in do_load_xattr_datum()
211 data = kmalloc(length, GFP_KERNEL); in do_load_xattr_datum()
216 length, &readlen, data); in do_load_xattr_datum()
218 if (ret || length!=readlen) { in do_load_xattr_datum()
220 ret, length, readlen, ref_offset(xd->node)); in do_load_xattr_datum()
226 crc = crc32(0, data, length); in do_load_xattr_datum()
240 c->xdatum_mem_usage += length; in do_load_xattr_datum()
284 size_t length; in save_xattr_datum() local
312 rc = jffs2_flash_writev(c, vecs, 2, phys_ofs, &length, 0); in save_xattr_datum()
[all …]
/fs/cifs/
Dconnect.c322 int length; in cifs_demultiplex_thread() local
342 length = atomic_inc_return(&tcpSesAllocCount); in cifs_demultiplex_thread()
343 if (length > 1) in cifs_demultiplex_thread()
344 mempool_resize(cifs_req_poolp, length + cifs_min_rcv, in cifs_demultiplex_thread()
385 length = in cifs_demultiplex_thread()
397 } else if ((length == -ERESTARTSYS) || (length == -EAGAIN)) { in cifs_demultiplex_thread()
410 } else if (length <= 0) { in cifs_demultiplex_thread()
419 if (!try_to_freeze() && (length == -EINTR)) { in cifs_demultiplex_thread()
424 length)); in cifs_demultiplex_thread()
429 } else if (length < pdu_length) { in cifs_demultiplex_thread()
[all …]
/fs/udf/
Dmisc.c265 void udf_update_tag(char *data, int length) in udf_update_tag() argument
268 length -= sizeof(tag); in udf_update_tag()
270 tptr->descCRCLength = cpu_to_le16(length); in udf_update_tag()
271 tptr->descCRC = cpu_to_le16(crc_itu_t(0, data + sizeof(tag), length)); in udf_update_tag()
276 uint32_t loc, int length) in udf_new_tag() argument
283 udf_update_tag(data, length); in udf_new_tag()

123456