Home
last modified time | relevance | path

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

1234567891011

/fs/squashfs/
Dblock.c34 u64 *cur_index, int *offset, int *length) in get_block_length() argument
44 *length = (unsigned char) bh->b_data[*offset]; in get_block_length()
49 *length |= (unsigned char) bh->b_data[0] << 8; in get_block_length()
52 *length = (unsigned char) bh->b_data[*offset] | in get_block_length()
78 int squashfs_read_data(struct super_block *sb, u64 index, int length, in squashfs_read_data() argument
87 bh = kcalloc(((output->length + msblk->devblksize - 1) in squashfs_read_data()
92 if (length) { in squashfs_read_data()
97 compressed = SQUASHFS_COMPRESSED_BLOCK(length); in squashfs_read_data()
98 length = SQUASHFS_COMPRESSED_SIZE_BLOCK(length); in squashfs_read_data()
100 *next_index = index + length; in squashfs_read_data()
[all …]
Dcache.c53 struct squashfs_cache *cache, u64 block, int length) in squashfs_cache_get() argument
110 entry->length = squashfs_read_data(sb, block, length, in squashfs_cache_get()
115 if (entry->length < 0) in squashfs_cache_get()
116 entry->error = entry->length; in squashfs_cache_get()
294 int offset, int length) in squashfs_copy_data() argument
296 int remaining = length; in squashfs_copy_data()
298 if (length == 0) in squashfs_copy_data()
301 return min(length, entry->length - offset); in squashfs_copy_data()
303 while (offset < entry->length) { in squashfs_copy_data()
306 int bytes = min_t(int, entry->length - offset, in squashfs_copy_data()
[all …]
Ddir.c43 int err, i, index, length = 0; in get_dir_index_using_offset() local
83 length = index; in get_dir_index_using_offset()
88 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_offset()
93 return length + 3; in get_dir_index_using_offset()
102 int offset = squashfs_i(inode)->offset, length, err; in squashfs_readdir() local
144 length = get_dir_index_using_offset(inode->i_sb, &block, &offset, in squashfs_readdir()
150 while (length < i_size_read(inode)) { in squashfs_readdir()
159 length += sizeof(dirh); in squashfs_readdir()
186 length += sizeof(*dire) + size; in squashfs_readdir()
188 if (ctx->pos >= length) in squashfs_readdir()
[all …]
Dnamei.c69 int i, length = 0, err; in get_dir_index_using_name() local
107 length = le32_to_cpu(index->index); in get_dir_index_using_name()
112 *next_offset = (length + *next_offset) % SQUASHFS_METADATA_SIZE; in get_dir_index_using_name()
122 return length + 3; in get_dir_index_using_name()
137 int err, length; in squashfs_lookup() local
153 length = get_dir_index_using_name(dir->i_sb, &block, &offset, in squashfs_lookup()
158 while (length < i_size_read(dir)) { in squashfs_lookup()
167 length += sizeof(dirh); in squashfs_lookup()
194 length += sizeof(*dire) + size; in squashfs_lookup()
Dsymlink.c41 int length = min_t(int, i_size_read(inode) - index, PAGE_SIZE); in squashfs_symlink_readpage() local
70 for (bytes = 0; bytes < length; offset = 0, bytes += copied) { in squashfs_symlink_readpage()
82 length - bytes); in squashfs_symlink_readpage()
83 if (copied == length - bytes) in squashfs_symlink_readpage()
84 memset(pageaddr + length, 0, PAGE_SIZE - length); in squashfs_symlink_readpage()
Dpage_actor.c42 int pages, int length) in squashfs_page_actor_init() argument
49 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init()
82 int pages, int length) in squashfs_page_actor_init_special() argument
89 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init_special()
Dpage_actor.h13 int length; member
18 int pages, int length) in squashfs_page_actor_init() argument
25 actor->length = length ? : pages * PAGE_SIZE; in squashfs_page_actor_init()
59 int length; member
/fs/ntfs/
Drunlist.c151 if ((dst->vcn + dst->length) != src->vcn) in ntfs_are_rl_mergeable()
155 ((dst->lcn + dst->length) == src->lcn)) in ntfs_are_rl_mergeable()
177 dst->length += src->length; in __ntfs_rl_merge()
238 dst[loc].length = dst[loc + 1].vcn - dst[loc].vcn; in ntfs_rl_append()
242 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_append()
292 merged_length = dst[loc - 1].length; in ntfs_rl_insert()
294 merged_length += src->length; in ntfs_rl_insert()
325 dst[marker].vcn = dst[marker - 1].vcn + dst[marker - 1].length; in ntfs_rl_insert()
328 dst[marker].length = dst[marker + 1].vcn - dst[marker].vcn; in ntfs_rl_insert()
333 dst[loc].vcn = dst[loc - 1].vcn + dst[loc - 1].length; in ntfs_rl_insert()
[all …]
/fs/iomap/
Dseek.c74 page_cache_seek_hole_data(struct inode *inode, loff_t offset, loff_t length, in page_cache_seek_hole_data() argument
78 pgoff_t end = DIV_ROUND_UP(offset + length, PAGE_SIZE); in page_cache_seek_hole_data()
82 if (length <= 0) in page_cache_seek_hole_data()
110 if (lastoff < offset + length) in page_cache_seek_hole_data()
121 iomap_seek_hole_actor(struct inode *inode, loff_t offset, loff_t length, in iomap_seek_hole_actor() argument
126 offset = page_cache_seek_hole_data(inode, offset, length, in iomap_seek_hole_actor()
129 return length; in iomap_seek_hole_actor()
135 return length; in iomap_seek_hole_actor()
143 loff_t length = size - offset; in iomap_seek_hole() local
150 while (length > 0) { in iomap_seek_hole()
[all …]
Dapply.c23 iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, in iomap_apply() argument
41 ret = ops->iomap_begin(inode, pos, length, flags, &iomap); in iomap_apply()
46 if (WARN_ON(iomap.length == 0)) in iomap_apply()
53 if (iomap.offset + iomap.length < pos + length) in iomap_apply()
54 length = iomap.offset + iomap.length - pos; in iomap_apply()
61 written = actor(inode, pos, length, data, &iomap); in iomap_apply()
68 ret = ops->iomap_end(inode, pos, length, in iomap_apply()
Dbuffered-io.c65 loff_t *pos, loff_t length, unsigned *offp, unsigned *lenp) in iomap_adjust_read_range() argument
72 unsigned plen = min_t(loff_t, PAGE_SIZE - poff, length); in iomap_adjust_read_range()
109 if (orig_pos <= isize && orig_pos + length > isize) { in iomap_adjust_read_range()
207 iomap_readpage_actor(struct inode *inode, loff_t pos, loff_t length, void *data, in iomap_readpage_actor() argument
225 iomap_adjust_read_range(inode, iop, &pos, length, &poff, &plen); in iomap_readpage_actor()
261 int nr_vecs = (length + PAGE_SIZE - 1) >> PAGE_SHIFT; in iomap_readpage_actor()
326 loff_t length, loff_t *done) in iomap_next_page() argument
331 if (page_offset(page) >= (u64)pos + length) in iomap_next_page()
353 iomap_readpages_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_readpages_actor() argument
359 for (done = 0; done < length; done += ret) { in iomap_readpages_actor()
[all …]
Ddirect-io.c202 iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_dio_bio_actor() argument
215 if ((pos | length | align) & ((1 << blkbits) - 1)) in iomap_dio_bio_actor()
247 iov_iter_truncate(&iter, length); in iomap_dio_bio_actor()
333 iomap_dio_hole_actor(loff_t length, struct iomap_dio *dio) in iomap_dio_hole_actor() argument
335 length = iov_iter_zero(length, dio->submit.iter); in iomap_dio_hole_actor()
336 dio->size += length; in iomap_dio_hole_actor()
337 return length; in iomap_dio_hole_actor()
341 iomap_dio_inline_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_dio_inline_actor() argument
347 BUG_ON(pos + length > PAGE_SIZE - offset_in_page(iomap->inline_data)); in iomap_dio_inline_actor()
354 copied = copy_from_iter(iomap->inline_data + pos, length, iter); in iomap_dio_inline_actor()
[all …]
/fs/xfs/libxfs/
Dxfs_dir2_data.c108 if (!bf[0].length) { in __xfs_dir3_data_check()
113 if (!bf[1].length) { in __xfs_dir3_data_check()
118 if (!bf[2].length) { in __xfs_dir3_data_check()
124 if (be16_to_cpu(bf[0].length) < be16_to_cpu(bf[1].length)) in __xfs_dir3_data_check()
126 if (be16_to_cpu(bf[1].length) < be16_to_cpu(bf[2].length)) in __xfs_dir3_data_check()
143 if (endp < p + be16_to_cpu(dup->length)) in __xfs_dir3_data_check()
157 if (be16_to_cpu(dup->length) > in __xfs_dir3_data_check()
158 be16_to_cpu(bf[2].length)) in __xfs_dir3_data_check()
161 p += be16_to_cpu(dup->length); in __xfs_dir3_data_check()
405 if (dfp->length) in xfs_dir2_data_freefind_verify()
[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/orangefs/
Dxattr.c100 ssize_t length = 0; in orangefs_inode_getxattr() local
129 if (cx->length == -1) { in orangefs_inode_getxattr()
134 ret = cx->length; in orangefs_inode_getxattr()
137 if (cx->length > size) { in orangefs_inode_getxattr()
141 memcpy(buffer, cx->val, cx->length); in orangefs_inode_getxattr()
142 memset(buffer + cx->length, 0, size - cx->length); in orangefs_inode_getxattr()
143 ret = cx->length; in orangefs_inode_getxattr()
175 cx->length = -1; in orangefs_inode_getxattr()
188 length = new_op->downcall.resp.getxattr.val_sz; in orangefs_inode_getxattr()
194 ret = length; in orangefs_inode_getxattr()
[all …]
/fs/xfs/
Dxfs_dir2_readdir.c187 ptr += be16_to_cpu(dup->length); in xfs_dir2_block_getdents()
354 int length; /* temporary length value */ in xfs_dir2_leaf_getdents() local
418 length = be16_to_cpu(dup->length); in xfs_dir2_leaf_getdents()
419 ptr += length; in xfs_dir2_leaf_getdents()
423 length = in xfs_dir2_leaf_getdents()
425 ptr += length; in xfs_dir2_leaf_getdents()
448 length = be16_to_cpu(dup->length); in xfs_dir2_leaf_getdents()
449 ptr += length; in xfs_dir2_leaf_getdents()
450 curoff += length; in xfs_dir2_leaf_getdents()
455 length = dp->d_ops->data_entsize(dep->namelen); in xfs_dir2_leaf_getdents()
[all …]
Dxfs_pnfs.c80 u64 length, in xfs_fs_map_blocks() argument
129 if (offset > limit - length) in xfs_fs_map_blocks()
130 length = limit - offset; in xfs_fs_map_blocks()
139 end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + length); in xfs_fs_map_blocks()
161 error = xfs_iomap_write_direct(ip, offset, length, in xfs_fs_map_blocks()
250 u64 start, length, end; in xfs_fs_commit_blocks() local
256 end = start + maps[i].length; in xfs_fs_commit_blocks()
260 length = end - start; in xfs_fs_commit_blocks()
261 if (!length) in xfs_fs_commit_blocks()
272 error = xfs_iomap_write_unwritten(ip, start, length, false); in xfs_fs_commit_blocks()
Dxfs_extent_busy.c39 new->length = len; in xfs_extent_busy_insert()
55 ASSERT(new->bno + new->length <= busyp->bno); in xfs_extent_busy_insert()
58 ASSERT(bno >= busyp->bno + busyp->length); in xfs_extent_busy_insert()
108 if (bno < busyp->bno + busyp->length) in xfs_extent_busy_search()
113 match = (busyp->length == len) ? 1 : -1; in xfs_extent_busy_search()
145 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_update_extent()
229 busyp->length = 0; in xfs_extent_busy_update_extent()
261 busyp->length = fbno - busyp->bno; in xfs_extent_busy_update_extent()
302 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_reuse()
356 xfs_agblock_t bend = bbno + busyp->length; in xfs_extent_busy_trim()
[all …]
/fs/gfs2/
Dbmap.c43 static int punch_hole(struct gfs2_inode *ip, u64 offset, u64 length);
599 iomap->length = hole_size << inode->i_blkbits; in gfs2_hole_size()
669 size_t dblks = iomap->length >> inode->i_blkbits; in gfs2_iomap_alloc()
774 iomap->length = (u64)dblks << inode->i_blkbits; in gfs2_iomap_alloc()
840 static int gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length, in gfs2_iomap_get() argument
856 if (!length) in gfs2_iomap_get()
870 if (pos + length > max_size) in gfs2_iomap_get()
872 iomap->length = max_size; in gfs2_iomap_get()
881 iomap->length = length; in gfs2_iomap_get()
885 iomap->length = size; in gfs2_iomap_get()
[all …]
/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/
Dopen.c38 int do_truncate2(struct vfsmount *mnt, struct dentry *dentry, loff_t length, in do_truncate2() argument
45 if (length < 0) in do_truncate2()
48 newattrs.ia_size = length; in do_truncate2()
68 int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs, in do_truncate() argument
71 return do_truncate2(NULL, dentry, length, time_attrs, filp); in do_truncate()
74 long vfs_truncate(const struct path *path, loff_t length) in vfs_truncate() argument
113 error = locks_verify_truncate(inode, NULL, length); in vfs_truncate()
117 error = do_truncate2(mnt, path->dentry, length, 0, NULL); in vfs_truncate()
128 long do_sys_truncate(const char __user *pathname, loff_t length) in do_sys_truncate() argument
134 if (length < 0) /* sorry, but loff_t says... */ in do_sys_truncate()
[all …]
/fs/lockd/
Dclntxdr.c106 const u8 *data, const unsigned int length) in encode_netobj() argument
110 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
111 xdr_encode_opaque(p, data, length); in encode_netobj()
139 u32 length; in decode_cookie() local
145 length = be32_to_cpup(p++); in decode_cookie()
147 if (length == 0) in decode_cookie()
149 if (length > NLM_MAXCOOKIELEN) in decode_cookie()
151 p = xdr_inline_decode(xdr, length); in decode_cookie()
154 cookie->len = length; in decode_cookie()
155 memcpy(cookie->data, p, length); in decode_cookie()
[all …]
Dclnt4xdr.c109 const u8 *data, const unsigned int length) in encode_netobj() argument
113 p = xdr_reserve_space(xdr, 4 + length); in encode_netobj()
114 xdr_encode_opaque(p, data, length); in encode_netobj()
142 u32 length; in decode_cookie() local
148 length = be32_to_cpup(p++); in decode_cookie()
150 if (length == 0) in decode_cookie()
152 if (length > NLM_MAXCOOKIELEN) in decode_cookie()
154 p = xdr_inline_decode(xdr, length); in decode_cookie()
157 cookie->len = length; in decode_cookie()
158 memcpy(cookie->data, p, length); in decode_cookie()
[all …]
/fs/nfs/flexfilelayout/
Dflexfilelayoutdev.c187 u64 offset, u64 length) in extend_ds_error() argument
191 end = max_t(u64, pnfs_end_offset(err->offset, err->length), in extend_ds_error()
192 pnfs_end_offset(offset, length)); in extend_ds_error()
194 err->length = end - err->offset; in extend_ds_error()
214 if (pnfs_end_offset(e1->offset, e1->length) < e2->offset) in ff_ds_error_match()
216 if (e1->offset > pnfs_end_offset(e2->offset, e2->length)) in ff_ds_error_match()
241 extend_ds_error(dserr, err->offset, err->length); in ff_layout_add_ds_error_locked()
252 u64 length, int status, enum nfs_opnum4 opnum, in ff_layout_track_ds_error() argument
269 dserr->length = length; in ff_layout_track_ds_error()
408 lseg->pls_range.length, NFS4ERR_NXIO, in nfs4_ff_layout_prepare_ds()
[all …]
/fs/configfs/
Dsymlink.c35 int length = 1; in item_path_length() local
37 length += strlen(config_item_name(p)) + 1; in item_path_length()
40 return length; in item_path_length()
43 static void fill_item_path(struct config_item * item, char * buffer, int length) in fill_item_path() argument
47 --length; in fill_item_path()
52 length -= cur; in fill_item_path()
53 memcpy(buffer + length, config_item_name(p), cur); in fill_item_path()
54 *(buffer + --length) = '/'; in fill_item_path()

1234567891011