Home
last modified time | relevance | path

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

12345678

/fs/squashfs/
Dblock.c45 u64 *cur_index, int *offset, int *length) in get_block_length() argument
55 *length = (unsigned char) bh->b_data[*offset]; in get_block_length()
60 *length |= (unsigned char) bh->b_data[0] << 8; in get_block_length()
63 *length = (unsigned char) bh->b_data[*offset] | in get_block_length()
90 int length, u64 *next_index, int srclength, int pages) in squashfs_read_data() argument
103 if (length) { in squashfs_read_data()
108 compressed = SQUASHFS_COMPRESSED_BLOCK(length); in squashfs_read_data()
109 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); in squashfs_read_data()
111 *next_index = index + length; in squashfs_read_data()
114 index, compressed ? "" : "un", length, srclength); in squashfs_read_data()
[all …]
Dcache.c65 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
122 entry->length = squashfs_read_data(sb, entry->data, in squashfs_cache_get()
123 block, length, &entry->next_index, in squashfs_cache_get()
128 if (entry->length < 0) in squashfs_cache_get()
129 entry->error = entry->length; in squashfs_cache_get()
299 int offset, int length) in squashfs_copy_data() argument
301 int remaining = length; in squashfs_copy_data()
303 if (length == 0) in squashfs_copy_data()
306 return min(length, entry->length - offset); in squashfs_copy_data()
308 while (offset < entry->length) { in squashfs_copy_data()
[all …]
Ddir.c56 int err, i, index, length = 0; in get_dir_index_using_offset() local
89 length = index; in get_dir_index_using_offset()
94 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_offset()
99 return length + 3; in get_dir_index_using_offset()
108 int offset = squashfs_i(inode)->offset, length, dir_count, size, in squashfs_readdir() local
157 length = get_dir_index_using_offset(inode->i_sb, &block, &offset, in squashfs_readdir()
163 while (length < i_size_read(inode)) { in squashfs_readdir()
172 length += sizeof(dirh); in squashfs_readdir()
199 length += sizeof(*dire) + size; in squashfs_readdir()
201 if (file->f_pos >= length) in squashfs_readdir()
[all …]
Dnamei.c82 int i, size, length = 0, err; in get_dir_index_using_name() local
117 length = le32_to_cpu(index->index); in get_dir_index_using_name()
122 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_name()
132 return length + 3; in get_dir_index_using_name()
147 int err, length, dir_count, size; in squashfs_lookup() local
162 length = get_dir_index_using_name(dir->i_sb, &block, &offset, in squashfs_lookup()
167 while (length < i_size_read(dir)) { in squashfs_lookup()
176 length += sizeof(dirh); in squashfs_lookup()
203 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()
Ddecompressor.c90 int length = 0; in squashfs_decompressor_init() local
100 length = squashfs_read_data(sb, &buffer, in squashfs_decompressor_init()
104 if (length < 0) { in squashfs_decompressor_init()
105 strm = ERR_PTR(length); in squashfs_decompressor_init()
110 strm = msblk->decompressor->init(msblk, buffer, length); in squashfs_decompressor_init()
Did.c71 unsigned int length = SQUASHFS_ID_BLOCK_BYTES(no_ids); in squashfs_read_id_index_table() local
74 TRACE("In read_id_index_table, length %d\n", length); in squashfs_read_id_index_table()
87 if (id_table_start + length > next_table) in squashfs_read_id_index_table()
90 table = squashfs_read_table(sb, id_table_start, length); in squashfs_read_id_index_table()
Dzlib_wrapper.c65 struct buffer_head **bh, int b, int offset, int length, int srclength, in zlib_uncompress() argument
79 int avail = min(length, msblk->devblksize - offset); in zlib_uncompress()
80 length -= avail; in zlib_uncompress()
128 length = stream->total_out; in zlib_uncompress()
130 return length; in zlib_uncompress()
/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()
/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()
203 ASSERT(!dfp->length); in xfs_dir2_data_freefind()
210 ASSERT(dfp->length == dup->length); in xfs_dir2_data_freefind()
[all …]
Dxfs_dir2_leaf.c138 bestsp[0] = hdr->bestfree[0].length; in xfs_dir2_block_to_leaf()
297 int length; /* length of new entry */ in xfs_dir2_leaf_addname() local
335 length = xfs_dir2_data_entsize(args->namelen); in xfs_dir2_leaf_addname()
350 if (be16_to_cpu(bestsp[i]) >= length) { in xfs_dir2_leaf_addname()
366 else if (be16_to_cpu(bestsp[i]) >= length) { in xfs_dir2_leaf_addname()
498 bestsp[use_block] = hdr->bestfree[0].length; in xfs_dir2_leaf_addname()
521 ASSERT(be16_to_cpu(dup->length) >= length); in xfs_dir2_leaf_addname()
527 (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr), length, in xfs_dir2_leaf_addname()
553 if (be16_to_cpu(bestsp[use_block]) != be16_to_cpu(hdr->bestfree[0].length)) { in xfs_dir2_leaf_addname()
554 bestsp[use_block] = hdr->bestfree[0].length; in xfs_dir2_leaf_addname()
[all …]
/fs/lockd/
Dclnt4xdr.c121 const u8 *data, const unsigned int length) in encode_netobj() argument
125 BUG_ON(length > XDR_MAX_NETOBJ); in encode_netobj()
126 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
127 xdr_encode_opaque(p, data, length); in encode_netobj()
133 u32 length; in decode_netobj() local
139 length = be32_to_cpup(p++); in decode_netobj()
140 if (unlikely(length > XDR_MAX_NETOBJ)) in decode_netobj()
142 obj->len = length; in decode_netobj()
146 dprintk("NFS: returned netobj was too long: %u\n", length); in decode_netobj()
166 u32 length; in decode_cookie() local
[all …]
Dclntxdr.c118 const u8 *data, const unsigned int length) in encode_netobj() argument
122 BUG_ON(length > XDR_MAX_NETOBJ); in encode_netobj()
123 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
124 xdr_encode_opaque(p, data, length); in encode_netobj()
130 u32 length; in decode_netobj() local
136 length = be32_to_cpup(p++); in decode_netobj()
137 if (unlikely(length > XDR_MAX_NETOBJ)) in decode_netobj()
139 obj->len = length; in decode_netobj()
143 dprintk("NFS: returned netobj was too long: %u\n", length); in decode_netobj()
163 u32 length; in decode_cookie() local
[all …]
/fs/exofs/
Dore.c238 bool is_reading, u64 offset, u64 length, in ore_get_rw_state() argument
246 if (layout->parity && length) { in ore_get_rw_state()
254 num_stripes = div_u64_rem(length, stripe_size, &remainder); in ore_get_rw_state()
286 if (length) { in ore_get_rw_state()
287 ore_calc_stripe_info(layout, offset, length, &ios->si); in ore_get_rw_state()
288 ios->length = ios->si.length; in ore_get_rw_state()
289 ios->nr_pages = (ios->length + PAGE_SIZE - 1) / PAGE_SIZE; in ore_get_rw_state()
439 _LLU(per_dev->length)); in ore_check_io()
447 u64 offset = (ios->offset + ios->length) - residual; in ore_check_io()
517 u64 length, struct ore_striping_info *si) in ore_calc_stripe_info() argument
[all …]
Dinode.c61 unsigned long length; member
82 pcol->length = 0; in _pcol_init()
95 pcol->length = 0; in _pcol_reset()
146 pcol->length += len; in pcol_add_page()
201 u64 length = 0; in __readpages_done() local
205 good_bytes = pcol->length; in __readpages_done()
213 pcol->inode->i_ino, _LLU(good_bytes), pcol->length, in __readpages_done()
224 if (likely(length < good_bytes)) in __readpages_done()
236 length += PAGE_SIZE; in __readpages_done()
279 unsigned long len_less = pcol_src->length - ios->length; in _maybe_not_all_in_one_io()
[all …]
/fs/ncpfs/
Dsymlink.c45 int error, length, len; in ncp_symlink_readpage() local
58 0,NCP_MAX_SYMLINK_SIZE,rawlink,&length); in ncp_symlink_readpage()
67 if (length<NCP_MIN_SYMLINK_SIZE || in ncp_symlink_readpage()
72 length -= 8; in ncp_symlink_readpage()
78 error = ncp_vol2io(NCP_SERVER(inode), buf, &len, link, length, 0); in ncp_symlink_readpage()
109 int length, err, i, outlen; in ncp_symlink() local
144 length = strlen(symname); in ncp_symlink()
148 err = ncp_io2vol(NCP_SERVER(dir), rawlink + hdr, &outlen, symname, length, 0); in ncp_symlink()
/fs/ceph/
Dlocks.c21 u64 length = 0; in ceph_lock_message() local
31 length = 0; in ceph_lock_message()
33 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message()
38 length, wait, fl->fl_type); in ceph_lock_message()
48 req->r_args.filelock_change.length = cpu_to_le64(length); in ceph_lock_message()
63 length = le64_to_cpu(req->r_reply_info.filelock_reply->start) + in ceph_lock_message()
64 le64_to_cpu(req->r_reply_info.filelock_reply->length); in ceph_lock_message()
65 if (length >= 1) in ceph_lock_message()
66 fl->fl_end = length -1; in ceph_lock_message()
75 length, wait, fl->fl_type, err); in ceph_lock_message()
[all …]
/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.c36 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, in do_truncate() argument
43 if (length < 0) in do_truncate()
46 newattrs.ia_size = length; in do_truncate()
64 static long do_sys_truncate(const char __user *pathname, loff_t length) in do_sys_truncate() argument
71 if (length < 0) /* sorry, but loff_t says... */ in do_sys_truncate()
112 error = locks_verify_truncate(inode, NULL, length); in do_sys_truncate()
116 error = do_truncate(path.dentry, length, 0, NULL); in do_sys_truncate()
128 SYSCALL_DEFINE2(truncate, const char __user *, path, long, length) in SYSCALL_DEFINE2() argument
130 return do_sys_truncate(path, length); in SYSCALL_DEFINE2()
133 static long do_sys_ftruncate(unsigned int fd, loff_t length, int small) in do_sys_ftruncate() argument
[all …]
/fs/nfs/blocklayout/
Dextents.c123 static int _set_range(struct my_tree *tree, int32_t tag, u64 s, u64 length) in _set_range() argument
127 dprintk("%s(%i, %llu, %llu) enter\n", __func__, tag, s, length); in _set_range()
128 for (i = normalize(s, tree->mtt_step_size); i < s + length; in _set_range()
137 u64 offset, u64 length) in _preload_range() argument
144 dprintk("%s(%llu, %llu) enter\n", __func__, offset, length); in _preload_range()
146 end = normalize_up(offset + length, tree->mtt_step_size); in _preload_range()
235 sector_t offset, sector_t length) in bl_mark_sectors_init() argument
240 __func__, (u64)offset, (u64)length); in bl_mark_sectors_init()
243 end = normalize_up(offset + length, marks->im_block_size); in bl_mark_sectors_init()
248 if (_set_range(&marks->im_tree, EXTENT_INITIALIZED, offset, length)) in bl_mark_sectors_init()
[all …]
/fs/nfs/
Dnfs2xdr.c387 const char *name, u32 length) in encode_filename() argument
391 BUG_ON(length > NFS2_MAXNAMLEN); in encode_filename()
392 p = xdr_reserve_space(xdr, 4 + length); in encode_filename()
393 xdr_encode_opaque(p, name, length); in encode_filename()
397 const char **name, u32 *length) in decode_filename_inline() argument
412 *length = count; in decode_filename_inline()
427 static void encode_path(struct xdr_stream *xdr, struct page **pages, u32 length) in encode_path() argument
431 BUG_ON(length > NFS2_MAXPATHLEN); in encode_path()
433 *p = cpu_to_be32(length); in encode_path()
434 xdr_write_pages(xdr, pages, 0, length); in encode_path()
[all …]
/fs/configfs/
Dsymlink.c49 int length = 1; in item_path_length() local
51 length += strlen(config_item_name(p)) + 1; in item_path_length()
54 return length; in item_path_length()
57 static void fill_item_path(struct config_item * item, char * buffer, int length) in fill_item_path() argument
61 --length; in fill_item_path()
66 length -= cur; in fill_item_path()
67 strncpy(buffer + length,config_item_name(p),cur); in fill_item_path()
68 *(buffer + --length) = '/'; in fill_item_path()
/fs/reiserfs/
Dxattr_security.c70 &sec->value, &sec->length); in reiserfs_security_init()
77 sec->length = 0; in reiserfs_security_init()
81 if (sec->length && reiserfs_xattrs_initialized(inode->i_sb)) { in reiserfs_security_init()
83 reiserfs_xattr_nblocks(inode, sec->length); in reiserfs_security_init()
100 sec->length, XATTR_CREATE); in reiserfs_security_write()

12345678