Home
last modified time | relevance | path

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

12345678910

/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()
91 int squashfs_read_data(struct super_block *sb, u64 index, int length, in squashfs_read_data() argument
100 bh = kcalloc(((output->length + msblk->devblksize - 1) in squashfs_read_data()
105 if (length) { in squashfs_read_data()
110 compressed = SQUASHFS_COMPRESSED_BLOCK(length); in squashfs_read_data()
111 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); in squashfs_read_data()
113 *next_index = index + length; in squashfs_read_data()
[all …]
Dcache.c66 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
123 entry->length = squashfs_read_data(sb, block, length, in squashfs_cache_get()
128 if (entry->length < 0) in squashfs_cache_get()
129 entry->error = entry->length; in squashfs_cache_get()
307 int offset, int length) in squashfs_copy_data() argument
309 int remaining = length; in squashfs_copy_data()
311 if (length == 0) in squashfs_copy_data()
314 return min(length, entry->length - offset); in squashfs_copy_data()
316 while (offset < entry->length) { in squashfs_copy_data()
319 int bytes = min_t(int, entry->length - offset, in squashfs_copy_data()
[all …]
Ddir.c56 int err, i, index, length = 0; in get_dir_index_using_offset() local
96 length = index; in get_dir_index_using_offset()
101 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_offset()
106 return length + 3; in get_dir_index_using_offset()
115 int offset = squashfs_i(inode)->offset, length, err; 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 (ctx->pos >= length) in squashfs_readdir()
[all …]
Dnamei.c82 int i, length = 0, err; in get_dir_index_using_name() local
120 length = le32_to_cpu(index->index); in get_dir_index_using_name()
125 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_name()
135 return length + 3; in get_dir_index_using_name()
150 int err, length; in squashfs_lookup() local
166 length = get_dir_index_using_name(dir->i_sb, &block, &offset, in squashfs_lookup()
171 while (length < i_size_read(dir)) { in squashfs_lookup()
180 length += sizeof(dirh); in squashfs_lookup()
207 length += sizeof(*dire) + size; in squashfs_lookup()
Dsymlink.c54 int length = min_t(int, i_size_read(inode) - index, PAGE_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_SIZE - length); in squashfs_symlink_readpage()
Dpage_actor.c44 int pages, int length) in squashfs_page_actor_init() argument
51 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init()
84 int pages, int length) in squashfs_page_actor_init_special() argument
91 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init_special()
Dpage_actor.h15 int length; member
20 int pages, int length) in squashfs_page_actor_init() argument
27 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init()
61 int length; member
/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 …]
/fs/xfs/libxfs/
Dxfs_dir2_data.c110 if (!bf[0].length) { in __xfs_dir3_data_check()
114 if (!bf[1].length) { in __xfs_dir3_data_check()
118 if (!bf[2].length) { in __xfs_dir3_data_check()
123 XFS_WANT_CORRUPTED_RETURN(mp, be16_to_cpu(bf[0].length) >= in __xfs_dir3_data_check()
124 be16_to_cpu(bf[1].length)); in __xfs_dir3_data_check()
125 XFS_WANT_CORRUPTED_RETURN(mp, be16_to_cpu(bf[1].length) >= in __xfs_dir3_data_check()
126 be16_to_cpu(bf[2].length)); in __xfs_dir3_data_check()
140 p + be16_to_cpu(dup->length)); in __xfs_dir3_data_check()
152 be16_to_cpu(dup->length) <= in __xfs_dir3_data_check()
153 be16_to_cpu(bf[2].length)); in __xfs_dir3_data_check()
[all …]
Dxfs_cksum.h14 xfs_start_cksum_safe(char *buffer, size_t length, unsigned long cksum_offset) in xfs_start_cksum_safe() argument
27 length - (cksum_offset + sizeof(__be32))); in xfs_start_cksum_safe()
35 xfs_start_cksum_update(char *buffer, size_t length, unsigned long cksum_offset) in xfs_start_cksum_update() argument
41 return crc32c(XFS_CRC_SEED, buffer, length); in xfs_start_cksum_update()
64 xfs_update_cksum(char *buffer, size_t length, unsigned long cksum_offset) in xfs_update_cksum() argument
66 uint32_t crc = xfs_start_cksum_update(buffer, length, cksum_offset); in xfs_update_cksum()
75 xfs_verify_cksum(char *buffer, size_t length, unsigned long cksum_offset) in xfs_verify_cksum() argument
77 uint32_t crc = xfs_start_cksum_safe(buffer, length, cksum_offset); in xfs_verify_cksum()
/fs/
Diomap.c45 iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, in iomap_apply() argument
63 ret = ops->iomap_begin(inode, pos, length, flags, &iomap); in iomap_apply()
73 if (iomap.offset + iomap.length < pos + length) in iomap_apply()
74 length = iomap.offset + iomap.length - pos; in iomap_apply()
81 written = actor(inode, pos, length, data, &iomap); in iomap_apply()
88 ret = ops->iomap_end(inode, pos, length, in iomap_apply()
117 BUG_ON(pos + len > iomap->offset + iomap->length); in iomap_write_begin()
153 iomap_write_actor(struct inode *inode, loff_t pos, loff_t length, void *data, in iomap_write_actor() argument
171 if (bytes > length) in iomap_write_actor()
172 bytes = length; in iomap_write_actor()
[all …]
Dopen.c37 int do_truncate2(struct vfsmount *mnt, struct dentry *dentry, loff_t length, in do_truncate2() argument
44 if (length < 0) in do_truncate2()
47 newattrs.ia_size = length; in do_truncate2()
67 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, in do_truncate() argument
70 return do_truncate2(NULL, dentry, length, time_attrs, filp); in do_truncate()
73 long vfs_truncate(const struct path *path, loff_t length) in vfs_truncate() argument
123 error = locks_verify_truncate(inode, NULL, length); in vfs_truncate()
127 error = do_truncate2(mnt, path->dentry, length, 0, NULL); in vfs_truncate()
138 static long do_sys_truncate(const char __user *pathname, loff_t length) in do_sys_truncate() argument
144 if (length < 0) /* sorry, but loff_t says... */ in do_sys_truncate()
[all …]
/fs/exofs/
Dore.c243 bool is_reading, u64 offset, u64 length, in ore_get_rw_state() argument
251 if (layout->parity && length) { in ore_get_rw_state()
259 num_stripes = div_u64_rem(length, stripe_size, &remainder); in ore_get_rw_state()
291 if (length) { in ore_get_rw_state()
292 ore_calc_stripe_info(layout, offset, length, &ios->si); in ore_get_rw_state()
293 ios->length = ios->si.length; in ore_get_rw_state()
295 ios->length + PAGE_SIZE - 1) / PAGE_SIZE; in ore_get_rw_state()
449 _LLU(per_dev->length)); in ore_check_io()
457 u64 offset = (ios->offset + ios->length) - residual; in ore_check_io()
527 u64 length, struct ore_striping_info *si) in ore_calc_stripe_info() argument
[all …]
Dinode.c58 unsigned long length; member
79 pcol->length = 0; in _pcol_init()
92 pcol->length = 0; in _pcol_reset()
144 pcol->length += len; in pcol_add_page()
199 u64 length = 0; in __readpages_done() local
203 good_bytes = pcol->length; in __readpages_done()
211 pcol->inode->i_ino, _LLU(good_bytes), pcol->length, in __readpages_done()
222 if (likely(length < good_bytes)) in __readpages_done()
234 length += PAGE_SIZE; in __readpages_done()
277 unsigned long len_less = pcol_src->length - ios->length; in _maybe_not_all_in_one_io()
[all …]
/fs/xfs/
Dxfs_dir2_readdir.c204 ptr += be16_to_cpu(dup->length); in xfs_dir2_block_getdents()
371 int length; /* temporary length value */ in xfs_dir2_leaf_getdents() local
435 length = be16_to_cpu(dup->length); in xfs_dir2_leaf_getdents()
436 ptr += length; in xfs_dir2_leaf_getdents()
440 length = in xfs_dir2_leaf_getdents()
442 ptr += length; in xfs_dir2_leaf_getdents()
465 length = be16_to_cpu(dup->length); in xfs_dir2_leaf_getdents()
466 ptr += length; in xfs_dir2_leaf_getdents()
467 curoff += length; in xfs_dir2_leaf_getdents()
472 length = dp->d_ops->data_entsize(dep->namelen); in xfs_dir2_leaf_getdents()
[all …]
Dxfs_pnfs.c86 u64 length, in xfs_fs_map_blocks() argument
135 if (offset > limit - length) in xfs_fs_map_blocks()
136 length = limit - offset; in xfs_fs_map_blocks()
145 end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + length); in xfs_fs_map_blocks()
167 error = xfs_iomap_write_direct(ip, offset, length, in xfs_fs_map_blocks()
256 u64 start, length, end; in xfs_fs_commit_blocks() local
262 end = start + maps[i].length; in xfs_fs_commit_blocks()
266 length = end - start; in xfs_fs_commit_blocks()
267 if (!length) in xfs_fs_commit_blocks()
278 error = xfs_iomap_write_unwritten(ip, start, length, false); in xfs_fs_commit_blocks()
Dxfs_extent_busy.c51 new->length = len; in xfs_extent_busy_insert()
67 ASSERT(new->bno + new->length <= busyp->bno); in xfs_extent_busy_insert()
70 ASSERT(bno >= busyp->bno + busyp->length); in xfs_extent_busy_insert()
120 if (bno < busyp->bno + busyp->length) in xfs_extent_busy_search()
125 match = (busyp->length == len) ? 1 : -1; in xfs_extent_busy_search()
157 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_update_extent()
241 busyp->length = 0; in xfs_extent_busy_update_extent()
273 busyp->length = fbno - busyp->bno; in xfs_extent_busy_update_extent()
314 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_reuse()
368 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_trim()
[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.c131 const char *name, int length, int * type, in venus_lookup() argument
140 insize = max_t(unsigned int, offset + length +1, OUTSIZE(lookup)); in venus_lookup()
147 memcpy((char *)(inp) + offset, name, length); in venus_lookup()
148 *((char *)inp + offset + length) = '\0'; in venus_lookup()
202 const char *name, int length, in venus_mkdir() argument
211 insize = max_t(unsigned int, offset + length + 1, OUTSIZE(mkdir)); in venus_mkdir()
218 memcpy((char *)(inp) + offset, name, length); in venus_mkdir()
219 *((char *)inp + offset + length) = '\0'; in venus_mkdir()
270 const char *name, int length, int excl, int mode, in venus_create() argument
279 insize = max_t(unsigned int, offset + length + 1, OUTSIZE(create)); in venus_create()
[all …]
/fs/lockd/
Dclntxdr.c117 const u8 *data, const unsigned int length) in encode_netobj() argument
121 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
122 xdr_encode_opaque(p, data, length); in encode_netobj()
150 u32 length; in decode_cookie() local
156 length = be32_to_cpup(p++); in decode_cookie()
158 if (length == 0) in decode_cookie()
160 if (length > NLM_MAXCOOKIELEN) in decode_cookie()
162 p = xdr_inline_decode(xdr, length); in decode_cookie()
165 cookie->len = length; in decode_cookie()
166 memcpy(cookie->data, p, length); in decode_cookie()
[all …]
Dclnt4xdr.c120 const u8 *data, const unsigned int length) in encode_netobj() argument
124 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
125 xdr_encode_opaque(p, data, length); in encode_netobj()
153 u32 length; in decode_cookie() local
159 length = be32_to_cpup(p++); in decode_cookie()
161 if (length == 0) in decode_cookie()
163 if (length > NLM_MAXCOOKIELEN) in decode_cookie()
165 p = xdr_inline_decode(xdr, length); in decode_cookie()
168 cookie->len = length; in decode_cookie()
169 memcpy(cookie->data, p, length); in decode_cookie()
[all …]
/fs/ceph/
Dlocks.c43 u64 length = 0; in ceph_lock_message() local
58 length = 0; in ceph_lock_message()
60 length = fl->fl_end - fl->fl_start + 1; in ceph_lock_message()
66 (int)operation, owner, (u64)fl->fl_pid, fl->fl_start, length, in ceph_lock_message()
74 req->r_args.filelock_change.length = cpu_to_le64(length); in ceph_lock_message()
91 length = le64_to_cpu(req->r_reply_info.filelock_reply->start) + in ceph_lock_message()
92 le64_to_cpu(req->r_reply_info.filelock_reply->length); in ceph_lock_message()
93 if (length >= 1) in ceph_lock_message()
94 fl->fl_end = length -1; in ceph_lock_message()
103 length, wait, fl->fl_type, err); in ceph_lock_message()
[all …]
/fs/nfs/flexfilelayout/
Dflexfilelayoutdev.c236 u64 offset, u64 length) in extend_ds_error() argument
240 end = max_t(u64, pnfs_end_offset(err->offset, err->length), in extend_ds_error()
241 pnfs_end_offset(offset, length)); in extend_ds_error()
243 err->length = end - err->offset; in extend_ds_error()
263 if (pnfs_end_offset(e1->offset, e1->length) < e2->offset) in ff_ds_error_match()
265 if (e1->offset > pnfs_end_offset(e2->offset, e2->length)) in ff_ds_error_match()
290 extend_ds_error(dserr, err->offset, err->length); in ff_layout_add_ds_error_locked()
301 u64 length, int status, enum nfs_opnum4 opnum, in ff_layout_track_ds_error() argument
318 dserr->length = length; in ff_layout_track_ds_error()
458 lseg->pls_range.length, NFS4ERR_NXIO, in nfs4_ff_layout_prepare_ds()
[all …]
/fs/nfs/
Dnfs2xdr.c398 const char *name, u32 length) in encode_filename() argument
402 WARN_ON_ONCE(length > NFS2_MAXNAMLEN); in encode_filename()
403 p = xdr_reserve_space(xdr, 4 + length); in encode_filename()
404 xdr_encode_opaque(p, name, length); in encode_filename()
408 const char **name, u32 *length) in decode_filename_inline() argument
423 *length = count; in decode_filename_inline()
438 static void encode_path(struct xdr_stream *xdr, struct page **pages, u32 length) in encode_path() argument
443 *p = cpu_to_be32(length); in encode_path()
444 xdr_write_pages(xdr, pages, 0, length); in encode_path()
449 u32 length, recvd; in decode_path() local
[all …]

12345678910