Home
last modified time | relevance | path

Searched refs:pos (Results 1 – 25 of 290) sorted by relevance

12345678910>>...12

/fs/romfs/
Dstorage.c23 static int romfs_mtd_read(struct super_block *sb, unsigned long pos, in romfs_mtd_read() argument
29 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
37 unsigned long pos, size_t maxlen) in romfs_mtd_strnlen() argument
48 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
55 pos += len; in romfs_mtd_strnlen()
66 static int romfs_mtd_strcmp(struct super_block *sb, unsigned long pos, in romfs_mtd_strcmp() argument
79 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp()
87 pos += len; in romfs_mtd_strcmp()
103 static int romfs_blk_read(struct super_block *sb, unsigned long pos, in romfs_blk_read() argument
112 offset = pos & (ROMBSIZE - 1); in romfs_blk_read()
[all …]
/fs/freevxfs/
Dvxfs_lookup.c88 loff_t pos = 0; in vxfs_find_entry() local
91 while (pos < limit) { in vxfs_find_entry()
94 int pg_ofs = pos & ~PAGE_MASK; in vxfs_find_entry()
96 pp = vxfs_get_page(ip->i_mapping, pos >> PAGE_SHIFT); in vxfs_find_entry()
101 while (pg_ofs < PAGE_SIZE && pos < limit) { in vxfs_find_entry()
104 if ((pos & (bsize - 1)) < 4) { in vxfs_find_entry()
107 (kaddr + (pos & ~PAGE_MASK)); in vxfs_find_entry()
110 pos += overhead; in vxfs_find_entry()
116 pos += bsize - 1; in vxfs_find_entry()
117 pos &= ~(bsize - 1); in vxfs_find_entry()
[all …]
/fs/
Dread_write.c380 loff_t pos = *ppos; in rw_verify_area() local
382 if (unlikely(pos < 0)) { in rw_verify_area()
385 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area()
387 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area()
393 retval = locks_mandatory_area(inode, file, pos, pos + count - 1, in rw_verify_area()
430 ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in __kernel_read() argument
452 kiocb.ki_pos = pos ? *pos : 0; in __kernel_read()
456 if (pos) in __kernel_read()
457 *pos = kiocb.ki_pos; in __kernel_read()
465 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in kernel_read() argument
[all …]
Dseq_file.c92 loff_t pos = 0; in traverse() local
121 if (pos + m->count > offset) { in traverse()
122 m->from = offset - pos; in traverse()
126 pos += m->count; in traverse()
128 if (pos == offset) in traverse()
260 loff_t pos = m->index; in seq_read_iter() local
263 if (pos == m->index) { in seq_read_iter()
546 static void *single_start(struct seq_file *p, loff_t *pos) in single_start() argument
548 return NULL + (*pos == 0); in single_start()
551 static void *single_next(struct seq_file *p, void *v, loff_t *pos) in single_next() argument
[all …]
/fs/xfs/libxfs/
Dxfs_iext_tree.c142 return &cur->leaf->recs[cur->pos]; in cur_rec()
150 if (cur->pos < 0 || cur->pos >= xfs_iext_max_recs(ifp)) in xfs_iext_valid()
201 cur->pos = 0; in xfs_iext_first()
214 cur->pos = 0; in xfs_iext_last()
222 cur->pos = i - 1; in xfs_iext_last()
231 ASSERT(cur->pos <= 0 || cur->pos >= RECS_PER_LEAF); in xfs_iext_next()
236 ASSERT(cur->pos >= 0); in xfs_iext_next()
237 ASSERT(cur->pos < xfs_iext_max_recs(ifp)); in xfs_iext_next()
239 cur->pos++; in xfs_iext_next()
243 cur->pos = 0; in xfs_iext_next()
[all …]
/fs/kernfs/
Ddir.c362 struct kernfs_node *pos; in kernfs_link_sibling() local
365 pos = rb_to_kn(*node); in kernfs_link_sibling()
367 result = kernfs_sd_compare(kn, pos); in kernfs_link_sibling()
369 node = &pos->rb.rb_left; in kernfs_link_sibling()
371 node = &pos->rb.rb_right; in kernfs_link_sibling()
1214 static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos) in kernfs_leftmost_descendant() argument
1221 last = pos; in kernfs_leftmost_descendant()
1223 if (kernfs_type(pos) != KERNFS_DIR) in kernfs_leftmost_descendant()
1226 rbn = rb_first(&pos->dir.children); in kernfs_leftmost_descendant()
1230 pos = rb_to_kn(rbn); in kernfs_leftmost_descendant()
[all …]
/fs/f2fs/
Dverity.c44 loff_t pos) in pagecache_read() argument
48 PAGE_SIZE - offset_in_page(pos)); in pagecache_read()
51 page = read_mapping_page(inode->i_mapping, pos >> PAGE_SHIFT, in pagecache_read()
56 memcpy_from_page(buf, page, offset_in_page(pos), n); in pagecache_read()
61 pos += n; in pagecache_read()
72 loff_t pos) in pagecache_write() argument
74 if (pos + count > inode->i_sb->s_maxbytes) in pagecache_write()
79 PAGE_SIZE - offset_in_page(pos)); in pagecache_write()
84 res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, in pagecache_write()
89 memcpy_to_page(page, offset_in_page(pos), buf, n); in pagecache_write()
[all …]
/fs/hpfs/
Dea.c17 unsigned pos = 0; in hpfs_ea_ext_remove() local
18 while (pos < len) { in hpfs_ea_ext_remove()
21 if (pos + 4 > len) { in hpfs_ea_ext_remove()
26 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return; in hpfs_ea_ext_remove()
30 ano ? "anode" : "sectors", a, pos); in hpfs_ea_ext_remove()
33 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove()
37 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove()
77 unsigned pos; in hpfs_read_ea() local
96 pos = 0; in hpfs_read_ea()
97 while (pos < len) { in hpfs_read_ea()
[all …]
Ddir.c27 loff_t pos; in hpfs_dir_lseek() local
42 pos = ((loff_t) hpfs_de_as_down_as_possible(s, hpfs_inode->i_dno) << 4) + 1; in hpfs_dir_lseek()
43 while (pos != new_off) { in hpfs_dir_lseek()
44 if (map_pos_dirent(i, &pos, &qbh)) hpfs_brelse4(&qbh); in hpfs_dir_lseek()
46 if (pos == 12) goto fail; in hpfs_dir_lseek()
113 if (ctx->pos == 12) { /* diff -r requires this (note, that diff -r */ in hpfs_readdir()
114 ctx->pos = 13; /* also fails on msdos filesystem in 2.0) */ in hpfs_readdir()
117 if (ctx->pos == 13) { in hpfs_readdir()
128 if (hpfs_stop_cycles(inode->i_sb, ctx->pos, &c1, &c2, "hpfs_readdir")) { in hpfs_readdir()
132 if (ctx->pos == 12) in hpfs_readdir()
[all …]
/fs/jffs2/
Dcompr_rtime.c38 int pos=0; in jffs2_rtime_compress() local
45 while (pos < (*sourcelen) && outpos <= (*dstlen)-2) { in jffs2_rtime_compress()
49 value = data_in[pos]; in jffs2_rtime_compress()
51 cpage_out[outpos++] = data_in[pos++]; in jffs2_rtime_compress()
54 positions[value]=pos; in jffs2_rtime_compress()
56 while ((backpos < pos) && (pos < (*sourcelen)) && in jffs2_rtime_compress()
57 (data_in[pos]==data_in[backpos++]) && (runlen<255)) { in jffs2_rtime_compress()
58 pos++; in jffs2_rtime_compress()
64 if (outpos >= pos) { in jffs2_rtime_compress()
70 *sourcelen = pos; in jffs2_rtime_compress()
[all …]
/fs/iomap/
Ddirect-io.c64 struct bio *bio, loff_t pos) in iomap_dio_submit_bio() argument
75 iomap, bio, pos); in iomap_dio_submit_bio()
186 iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos, in iomap_dio_zero() argument
195 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, in iomap_dio_zero()
198 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_zero()
205 iomap_dio_submit_bio(dio, iomap, bio, pos); in iomap_dio_zero()
209 iomap_dio_bio_actor(struct inode *inode, loff_t pos, loff_t length, in iomap_dio_bio_actor() argument
222 if ((pos | length | align) & ((1 << blkbits) - 1)) in iomap_dio_bio_actor()
265 pad = pos & (fs_block_size - 1); in iomap_dio_bio_actor()
267 iomap_dio_zero(dio, iomap, pos - pad, pad); in iomap_dio_bio_actor()
[all …]
Dbuffered-io.c89 loff_t *pos, loff_t length, unsigned *offp, unsigned *lenp) in iomap_adjust_read_range() argument
91 loff_t orig_pos = *pos; in iomap_adjust_read_range()
95 unsigned poff = offset_in_page(*pos); in iomap_adjust_read_range()
112 *pos += block_size; in iomap_adjust_read_range()
229 struct iomap *iomap, loff_t pos) in iomap_block_needs_zeroing() argument
233 pos >= i_size_read(inode); in iomap_block_needs_zeroing()
237 iomap_readpage_actor(struct inode *inode, loff_t pos, loff_t length, void *data, in iomap_readpage_actor() argument
244 loff_t orig_pos = pos; in iomap_readpage_actor()
249 WARN_ON_ONCE(pos); in iomap_readpage_actor()
255 iomap_adjust_read_range(inode, iop, &pos, length, &poff, &plen); in iomap_readpage_actor()
[all …]
Dapply.c24 iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, in iomap_apply() argument
32 trace_iomap_apply(inode, pos, length, flags, ops, actor, _RET_IP_); in iomap_apply()
46 ret = ops->iomap_begin(inode, pos, length, flags, &iomap, &srcmap); in iomap_apply()
49 if (WARN_ON(iomap.offset > pos)) { in iomap_apply()
69 if (pos + length > end) in iomap_apply()
70 length = end - pos; in iomap_apply()
84 written = actor(inode, pos, length, data, &iomap, in iomap_apply()
93 ret = ops->iomap_end(inode, pos, length, in iomap_apply()
/fs/btrfs/
Dzstd.c106 struct list_head *pos, *next; in zstd_reclaim_timer_fn() local
115 list_for_each_prev_safe(pos, next, &wsm.lru_list) { in zstd_reclaim_timer_fn()
116 struct workspace *victim = container_of(pos, struct workspace, in zstd_reclaim_timer_fn()
403 workspace->in_buf.pos = 0; in zstd_compress_pages()
415 workspace->out_buf.pos = 0; in zstd_compress_pages()
431 if (tot_in + workspace->in_buf.pos > 8192 && in zstd_compress_pages()
432 tot_in + workspace->in_buf.pos < in zstd_compress_pages()
433 tot_out + workspace->out_buf.pos) { in zstd_compress_pages()
439 if (workspace->out_buf.pos >= max_out) { in zstd_compress_pages()
440 tot_out += workspace->out_buf.pos; in zstd_compress_pages()
[all …]
/fs/ext4/
Ddir.c175 while (ctx->pos < inode->i_size) { in ext4_readdir()
183 offset = ctx->pos & (sb->s_blocksize - 1); in ext4_readdir()
184 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); in ext4_readdir()
192 ctx->pos += map.m_len * sb->s_blocksize; in ext4_readdir()
214 if (ctx->pos > inode->i_blocks << 9) in ext4_readdir()
216 ctx->pos += sb->s_blocksize - offset; in ext4_readdir()
225 (unsigned long long)ctx->pos); in ext4_readdir()
226 ctx->pos += sb->s_blocksize - offset; in ext4_readdir()
255 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1)) in ext4_readdir()
260 while (ctx->pos < inode->i_size in ext4_readdir()
[all …]
/fs/ecryptfs/
Dread_write.c101 loff_t pos; in ecryptfs_write() local
110 pos = ecryptfs_file_size; in ecryptfs_write()
112 pos = offset; in ecryptfs_write()
113 while (pos < (offset + size)) { in ecryptfs_write()
114 pgoff_t ecryptfs_page_idx = (pos >> PAGE_SHIFT); in ecryptfs_write()
115 size_t start_offset_in_page = (pos & ~PAGE_MASK); in ecryptfs_write()
117 loff_t total_remaining_bytes = ((offset + size) - pos); in ecryptfs_write()
126 if (pos < offset) { in ecryptfs_write()
128 loff_t total_remaining_zeros = (offset - pos); in ecryptfs_write()
151 if (pos < offset || !start_offset_in_page) { in ecryptfs_write()
[all …]
/fs/sysv/
Ddir.c37 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument
43 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk()
44 if (pos+len > dir->i_size) { in dir_commit_chunk()
45 i_size_write(dir, pos+len); in dir_commit_chunk()
66 unsigned long pos = ctx->pos; in sysv_readdir() local
73 ctx->pos = pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1); in sysv_readdir()
74 if (pos >= inode->i_size) in sysv_readdir()
77 offset = pos & ~PAGE_MASK; in sysv_readdir()
78 n = pos >> PAGE_SHIFT; in sysv_readdir()
90 for ( ;(char*)de <= limit; de++, ctx->pos += sizeof(*de)) { in sysv_readdir()
[all …]
/fs/fuse/
Dreaddir.c27 if (ctx->pos == 0) in fuse_use_readdirplus()
33 struct fuse_dirent *dirent, loff_t pos) in fuse_add_dirent_to_cache() argument
49 if (fi->rdc.cached || pos != fi->rdc.pos) { in fuse_add_dirent_to_cache()
76 WARN_ON(fi->rdc.pos != pos)) in fuse_add_dirent_to_cache()
87 fi->rdc.pos = dirent->off; in fuse_add_dirent_to_cache()
94 static void fuse_readdir_cache_end(struct file *file, loff_t pos) in fuse_readdir_cache_end() argument
101 if (fi->rdc.pos != pos) { in fuse_readdir_cache_end()
120 fuse_add_dirent_to_cache(file, dirent, ctx->pos); in fuse_emit()
144 ctx->pos = dirent->off; in parse_dirfile()
316 ctx->pos = dirent->off; in parse_dirplusfile()
[all …]
/fs/ntfs/
Dbitmap.c41 int pos, len; in __ntfs_bitmap_set_bits_in_run() local
71 pos = (start_bit >> 3) & ~PAGE_MASK; in __ntfs_bitmap_set_bits_in_run()
78 u8 *byte = kaddr + pos; in __ntfs_bitmap_set_bits_in_run()
91 pos++; in __ntfs_bitmap_set_bits_in_run()
97 len = min_t(s64, cnt >> 3, PAGE_SIZE - pos); in __ntfs_bitmap_set_bits_in_run()
98 memset(kaddr + pos, value ? 0xff : 0, len); in __ntfs_bitmap_set_bits_in_run()
103 len += pos; in __ntfs_bitmap_set_bits_in_run()
160 pos = __ntfs_bitmap_set_bits_in_run(vi, start_bit, count - cnt, in __ntfs_bitmap_set_bits_in_run()
163 pos = 0; in __ntfs_bitmap_set_bits_in_run()
164 if (!pos) { in __ntfs_bitmap_set_bits_in_run()
[all …]
Dlogfile.c39 RESTART_PAGE_HEADER *rp, s64 pos) in ntfs_check_restart_page_header() argument
64 if (pos && pos != logfile_system_page_size) { in ntfs_check_restart_page_header()
337 RESTART_PAGE_HEADER *rp, s64 pos, RESTART_PAGE_HEADER **wrp, in ntfs_check_and_load_restart_page() argument
346 if (!ntfs_check_restart_page_header(vi, rp, pos)) { in ntfs_check_and_load_restart_page()
371 size = PAGE_SIZE - (pos & ~PAGE_MASK); in ntfs_check_and_load_restart_page()
384 idx = (pos + size) >> PAGE_SHIFT; in ntfs_check_and_load_restart_page()
385 BUG_ON((pos + size) & ~PAGE_MASK); in ntfs_check_and_load_restart_page()
473 s64 size, pos; in ntfs_check_logfile() local
528 for (pos = 0; pos < size; pos <<= 1) { in ntfs_check_logfile()
529 pgoff_t idx = pos >> PAGE_SHIFT; in ntfs_check_logfile()
[all …]
/fs/cifs/
Dcifs_dfs_ref.c68 char *pos; in cifs_build_devname() local
77 pos = nodename + unclen - 1; in cifs_build_devname()
80 while (*pos == '\\') { in cifs_build_devname()
81 --pos; in cifs_build_devname()
95 pos = dev; in cifs_build_devname()
97 *pos = '/'; in cifs_build_devname()
98 ++pos; in cifs_build_devname()
99 *pos = '/'; in cifs_build_devname()
100 ++pos; in cifs_build_devname()
103 memcpy(pos, nodename, unclen); in cifs_build_devname()
[all …]
/fs/minix/
Ddir.c49 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument
54 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk()
56 if (pos+len > dir->i_size) { in dir_commit_chunk()
57 i_size_write(dir, pos+len); in dir_commit_chunk()
88 unsigned long pos = ctx->pos; in minix_readdir() local
92 ctx->pos = pos = ALIGN(pos, chunk_size); in minix_readdir()
93 if (pos >= inode->i_size) in minix_readdir()
96 offset = pos & ~PAGE_MASK; in minix_readdir()
97 n = pos >> PAGE_SHIFT; in minix_readdir()
128 ctx->pos += chunk_size; in minix_readdir()
[all …]
/fs/proc/
Dinterrupts.c12 static void *int_seq_start(struct seq_file *f, loff_t *pos) in int_seq_start() argument
14 return (*pos <= nr_irqs) ? pos : NULL; in int_seq_start()
17 static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) in int_seq_next() argument
19 (*pos)++; in int_seq_next()
20 if (*pos > nr_irqs) in int_seq_next()
22 return pos; in int_seq_next()
Ddevices.c28 static void *devinfo_start(struct seq_file *f, loff_t *pos) in devinfo_start() argument
30 if (*pos < (BLKDEV_MAJOR_MAX + CHRDEV_MAJOR_MAX)) in devinfo_start()
31 return pos; in devinfo_start()
35 static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos) in devinfo_next() argument
37 (*pos)++; in devinfo_next()
38 if (*pos >= (BLKDEV_MAJOR_MAX + CHRDEV_MAJOR_MAX)) in devinfo_next()
40 return pos; in devinfo_next()
/fs/ext2/
Ddir.c90 static int ext2_commit_chunk(struct page *page, loff_t pos, unsigned len) in ext2_commit_chunk() argument
97 block_write_end(NULL, mapping, pos, len, len, page, NULL); in ext2_commit_chunk()
99 if (pos+len > dir->i_size) { in ext2_commit_chunk()
100 i_size_write(dir, pos+len); in ext2_commit_chunk()
266 loff_t pos = ctx->pos; in ext2_readdir() local
269 unsigned int offset = pos & ~PAGE_MASK; in ext2_readdir()
270 unsigned long n = pos >> PAGE_SHIFT; in ext2_readdir()
276 if (pos > inode->i_size - EXT2_DIR_REC_LEN(1)) in ext2_readdir()
291 ctx->pos += PAGE_SIZE - offset; in ext2_readdir()
298 ctx->pos = (n<<PAGE_SHIFT) + offset; in ext2_readdir()
[all …]

12345678910>>...12