/fs/romfs/ |
D | storage.c | 23 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/ |
D | vxfs_lookup.c | 88 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/iomap/ |
D | buffered-io.c | 65 loff_t *pos, loff_t length, unsigned *offp, unsigned *lenp) in iomap_adjust_read_range() argument 67 loff_t orig_pos = *pos; in iomap_adjust_read_range() 71 unsigned poff = offset_in_page(*pos); in iomap_adjust_read_range() 88 *pos += block_size; 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 214 loff_t orig_pos = pos; in iomap_readpage_actor() 219 WARN_ON_ONCE(pos); in iomap_readpage_actor() 225 iomap_adjust_read_range(inode, iop, &pos, length, &poff, &plen); in iomap_readpage_actor() 229 if (iomap->type != IOMAP_MAPPED || pos >= i_size_read(inode)) { in iomap_readpage_actor() 240 sector = iomap_sector(iomap, pos); in iomap_readpage_actor() [all …]
|
D | direct-io.c | 179 iomap_dio_zero(struct iomap_dio *dio, struct iomap *iomap, loff_t pos, in iomap_dio_zero() argument 188 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, in iomap_dio_zero() 191 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_zero() 202 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() 255 pad = pos & (fs_block_size - 1); in iomap_dio_bio_actor() 257 iomap_dio_zero(dio, iomap, pos - pad, pad); in iomap_dio_bio_actor() 268 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, in iomap_dio_bio_actor() 271 bio->bi_iter.bi_sector = iomap_sector(iomap, pos); in iomap_dio_bio_actor() 306 pos += n; in iomap_dio_bio_actor() [all …]
|
D | apply.c | 23 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() 44 if (WARN_ON(iomap.offset > pos)) 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()
|
/fs/xfs/libxfs/ |
D | xfs_iext_tree.c | 142 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/ |
D | dir.c | 354 struct kernfs_node *pos; in kernfs_link_sibling() local 357 pos = rb_to_kn(*node); in kernfs_link_sibling() 359 result = kernfs_sd_compare(kn, pos); in kernfs_link_sibling() 361 node = &pos->rb.rb_left; in kernfs_link_sibling() 363 node = &pos->rb.rb_right; in kernfs_link_sibling() 1189 static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos) in kernfs_leftmost_descendant() argument 1196 last = pos; in kernfs_leftmost_descendant() 1198 if (kernfs_type(pos) != KERNFS_DIR) in kernfs_leftmost_descendant() 1201 rbn = rb_first(&pos->dir.children); in kernfs_leftmost_descendant() 1205 pos = rb_to_kn(rbn); in kernfs_leftmost_descendant() [all …]
|
/fs/ |
D | read_write.c | 379 loff_t pos = *ppos; in rw_verify_area() local 381 if (unlikely(pos < 0)) { in rw_verify_area() 384 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area() 386 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area() 392 retval = locks_mandatory_area(inode, file, pos, pos + count - 1, in rw_verify_area() 422 loff_t *pos) in __vfs_read() argument 425 return file->f_op->read(file, buf, count, pos); in __vfs_read() 427 return new_sync_read(file, buf, count, pos); in __vfs_read() 432 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in kernel_read() argument 440 result = vfs_read(file, (void __user *)buf, count, pos); in kernel_read() [all …]
|
D | seq_file.c | 93 loff_t pos = 0; in traverse() local 123 if (pos + m->count > offset) { in traverse() 124 m->from = offset - pos; in traverse() 128 pos += m->count; in traverse() 130 if (pos == offset) in traverse() 256 loff_t pos = m->index; in seq_read() local 259 if (pos == m->index) in seq_read() 551 static void *single_start(struct seq_file *p, loff_t *pos) in single_start() argument 553 return NULL + (*pos == 0); in single_start() 556 static void *single_next(struct seq_file *p, void *v, loff_t *pos) in single_next() argument [all …]
|
/fs/f2fs/ |
D | verity.c | 42 loff_t pos) in pagecache_read() argument 46 PAGE_SIZE - offset_in_page(pos)); in pagecache_read() 50 page = read_mapping_page(inode->i_mapping, pos >> PAGE_SHIFT, in pagecache_read() 56 memcpy(buf, addr + offset_in_page(pos), n); in pagecache_read() 62 pos += n; in pagecache_read() 73 loff_t pos) in pagecache_write() argument 75 if (pos + count > inode->i_sb->s_maxbytes) in pagecache_write() 80 PAGE_SIZE - offset_in_page(pos)); in pagecache_write() 86 res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, in pagecache_write() 92 memcpy(addr + offset_in_page(pos), buf, n); in pagecache_write() [all …]
|
/fs/hpfs/ |
D | ea.c | 17 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 …]
|
D | dir.c | 27 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/ |
D | compr_rtime.c | 38 int pos=0; in jffs2_rtime_compress() local 42 while (pos < (*sourcelen) && outpos <= (*dstlen)-2) { in jffs2_rtime_compress() 46 value = data_in[pos]; in jffs2_rtime_compress() 48 cpage_out[outpos++] = data_in[pos++]; in jffs2_rtime_compress() 51 positions[value]=pos; in jffs2_rtime_compress() 53 while ((backpos < pos) && (pos < (*sourcelen)) && in jffs2_rtime_compress() 54 (data_in[pos]==data_in[backpos++]) && (runlen<255)) { in jffs2_rtime_compress() 55 pos++; in jffs2_rtime_compress() 61 if (outpos >= pos) { in jffs2_rtime_compress() 67 *sourcelen = pos; in jffs2_rtime_compress() [all …]
|
/fs/ecryptfs/ |
D | read_write.c | 101 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/btrfs/ |
D | zstd.c | 107 struct list_head *pos, *next; in zstd_reclaim_timer_fn() local 116 list_for_each_prev_safe(pos, next, &wsm.lru_list) { in zstd_reclaim_timer_fn() 117 struct workspace *victim = container_of(pos, struct workspace, in zstd_reclaim_timer_fn() 408 workspace->in_buf.pos = 0; in zstd_compress_pages() 420 workspace->out_buf.pos = 0; in zstd_compress_pages() 436 if (tot_in + workspace->in_buf.pos > 8192 && in zstd_compress_pages() 437 tot_in + workspace->in_buf.pos < in zstd_compress_pages() 438 tot_out + workspace->out_buf.pos) { in zstd_compress_pages() 444 if (workspace->out_buf.pos >= max_out) { in zstd_compress_pages() 445 tot_out += workspace->out_buf.pos; in zstd_compress_pages() [all …]
|
/fs/ext4/ |
D | dir.c | 155 while (ctx->pos < inode->i_size) { in ext4_readdir() 163 offset = ctx->pos & (sb->s_blocksize - 1); in ext4_readdir() 164 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); in ext4_readdir() 172 ctx->pos += map.m_len * sb->s_blocksize; in ext4_readdir() 194 if (ctx->pos > inode->i_blocks << 9) in ext4_readdir() 196 ctx->pos += sb->s_blocksize - offset; in ext4_readdir() 205 (unsigned long long)ctx->pos); in ext4_readdir() 206 ctx->pos += sb->s_blocksize - offset; in ext4_readdir() 234 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1)) in ext4_readdir() 239 while (ctx->pos < inode->i_size in ext4_readdir() [all …]
|
D | verity.c | 42 loff_t pos) in pagecache_read() argument 46 PAGE_SIZE - offset_in_page(pos)); in pagecache_read() 50 page = read_mapping_page(inode->i_mapping, pos >> PAGE_SHIFT, in pagecache_read() 56 memcpy(buf, addr + offset_in_page(pos), n); in pagecache_read() 62 pos += n; in pagecache_read() 73 loff_t pos) in pagecache_write() argument 75 if (pos + count > inode->i_sb->s_maxbytes) in pagecache_write() 80 PAGE_SIZE - offset_in_page(pos)); in pagecache_write() 86 res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, in pagecache_write() 92 memcpy(addr + offset_in_page(pos), buf, n); in pagecache_write() [all …]
|
/fs/sysv/ |
D | dir.c | 37 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/ntfs/ |
D | bitmap.c | 41 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 …]
|
D | logfile.c | 39 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/fuse/ |
D | readdir.c | 27 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() 85 fi->rdc.pos = dirent->off; in fuse_add_dirent_to_cache() 92 static void fuse_readdir_cache_end(struct file *file, loff_t pos) in fuse_readdir_cache_end() argument 99 if (fi->rdc.pos != pos) { in fuse_readdir_cache_end() 118 fuse_add_dirent_to_cache(file, dirent, ctx->pos); in fuse_emit() 142 ctx->pos = dirent->off; in parse_dirfile() 303 ctx->pos = dirent->off; in parse_dirplusfile() [all …]
|
/fs/cifs/ |
D | cifs_dfs_ref.c | 68 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/proc/ |
D | interrupts.c | 12 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()
|
D | devices.c | 27 static void *devinfo_start(struct seq_file *f, loff_t *pos) in devinfo_start() argument 29 if (*pos < (BLKDEV_MAJOR_MAX + CHRDEV_MAJOR_MAX)) in devinfo_start() 30 return pos; in devinfo_start() 34 static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos) in devinfo_next() argument 36 (*pos)++; in devinfo_next() 37 if (*pos >= (BLKDEV_MAJOR_MAX + CHRDEV_MAJOR_MAX)) in devinfo_next() 39 return pos; in devinfo_next()
|
/fs/minix/ |
D | dir.c | 49 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 …]
|