/fs/ntfs3/ |
D | bitfunc.c | 35 size_t pos = bit & 7; in are_bits_clear() local 38 if (pos) { in are_bits_clear() 39 if (8 - pos >= nbits) in are_bits_clear() 40 return !nbits || !(*map & fill_mask[pos + nbits] & in are_bits_clear() 41 zero_mask[pos]); in are_bits_clear() 43 if (*map++ & zero_mask[pos]) in are_bits_clear() 45 nbits -= 8 - pos; in are_bits_clear() 48 pos = ((size_t)map) & (sizeof(size_t) - 1); in are_bits_clear() 49 if (pos) { in are_bits_clear() 50 pos = sizeof(size_t) - pos; in are_bits_clear() [all …]
|
/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 | seek.c | 21 iter->pos, iter->pos + length, SEEK_HOLE); in iomap_seek_hole_iter() 22 if (*hole_pos == iter->pos + length) in iomap_seek_hole_iter() 26 *hole_pos = iter->pos; in iomap_seek_hole_iter() 34 iomap_seek_hole(struct inode *inode, loff_t pos, const struct iomap_ops *ops) in iomap_seek_hole() argument 39 .pos = pos, in iomap_seek_hole() 45 if (pos < 0 || pos >= size) in iomap_seek_hole() 48 iter.len = size - pos; in iomap_seek_hole() 50 iter.processed = iomap_seek_hole_iter(&iter, &pos); in iomap_seek_hole() 54 return pos; in iomap_seek_hole() 69 iter->pos, iter->pos + length, SEEK_DATA); in iomap_seek_data_iter() [all …]
|
D | buffered-io.c | 89 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() 238 loff_t pos) in iomap_block_needs_zeroing() argument 244 pos >= i_size_read(iter->inode); in iomap_block_needs_zeroing() 251 loff_t pos = iter->pos + offset; in iomap_readpage_iter() local 255 loff_t orig_pos = pos; in iomap_readpage_iter() 269 iomap_adjust_read_range(iter->inode, iop, &pos, length, &poff, &plen); in iomap_readpage_iter() 273 if (iomap_block_needs_zeroing(iter, pos)) { in iomap_readpage_iter() [all …]
|
D | direct-io.c | 66 struct iomap_dio *dio, struct bio *bio, loff_t pos) in iomap_dio_submit_bio() argument 75 dio->submit.cookie = dio->dops->submit_io(iter, bio, pos); in iomap_dio_submit_bio() 189 loff_t pos, unsigned len) in iomap_dio_zero() argument 197 fscrypt_set_bio_crypt_ctx(bio, inode, pos >> inode->i_blkbits, in iomap_dio_zero() 200 bio->bi_iter.bi_sector = iomap_sector(&iter->iomap, pos); in iomap_dio_zero() 207 iomap_dio_submit_bio(iter, dio, bio, pos); in iomap_dio_zero() 247 loff_t pos = iter->pos; in iomap_dio_bio_iter() local 256 if ((pos | length | align) & ((1 << blkbits) - 1)) in iomap_dio_bio_iter() 296 pad = pos & (fs_block_size - 1); in iomap_dio_bio_iter() 298 iomap_dio_zero(iter, dio, pos - pad, pad); in iomap_dio_bio_iter() [all …]
|
/fs/ |
D | read_write.c | 376 loff_t pos = *ppos; in rw_verify_area() local 378 if (unlikely(pos < 0)) { in rw_verify_area() 381 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area() 383 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area() 419 ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in __kernel_read() argument 441 kiocb.ki_pos = pos ? *pos : 0; in __kernel_read() 445 if (pos) in __kernel_read() 446 *pos = kiocb.ki_pos; in __kernel_read() 454 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in kernel_read() argument 458 ret = rw_verify_area(READ, file, pos, count); in kernel_read() [all …]
|
D | seq_file.c | 92 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() 573 static void *single_start(struct seq_file *p, loff_t *pos) in single_start() argument 575 return NULL + (*pos == 0); in single_start() 578 static void *single_next(struct seq_file *p, void *v, loff_t *pos) in single_next() argument [all …]
|
/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 | 361 struct kernfs_node *pos; in kernfs_link_sibling() local 364 pos = rb_to_kn(*node); in kernfs_link_sibling() 366 result = kernfs_sd_compare(kn, pos); in kernfs_link_sibling() 368 node = &pos->rb.rb_left; in kernfs_link_sibling() 370 node = &pos->rb.rb_right; in kernfs_link_sibling() 1259 static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos) in kernfs_leftmost_descendant() argument 1266 last = pos; in kernfs_leftmost_descendant() 1268 if (kernfs_type(pos) != KERNFS_DIR) in kernfs_leftmost_descendant() 1271 rbn = rb_first(&pos->dir.children); in kernfs_leftmost_descendant() 1275 pos = rb_to_kn(rbn); in kernfs_leftmost_descendant() [all …]
|
/fs/f2fs/ |
D | verity.c | 44 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/ |
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 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/btrfs/ |
D | zstd.c | 106 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/ |
D | dir.c | 170 while (ctx->pos < inode->i_size) { in ext4_readdir() 178 offset = ctx->pos & (sb->s_blocksize - 1); in ext4_readdir() 179 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); in ext4_readdir() 187 ctx->pos += map.m_len * sb->s_blocksize; in ext4_readdir() 209 if (ctx->pos > inode->i_blocks << 9) in ext4_readdir() 211 ctx->pos += sb->s_blocksize - offset; in ext4_readdir() 220 (unsigned long long)ctx->pos); in ext4_readdir() 221 ctx->pos += sb->s_blocksize - offset; in ext4_readdir() 250 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1)) in ext4_readdir() 255 while (ctx->pos < inode->i_size in ext4_readdir() [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/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/cifs/ |
D | cifs_dfs_ref.c | 69 char *pos; in cifs_build_devname() local 78 pos = nodename + unclen - 1; in cifs_build_devname() 81 while (*pos == '\\') { in cifs_build_devname() 82 --pos; in cifs_build_devname() 96 pos = dev; in cifs_build_devname() 98 *pos = '/'; in cifs_build_devname() 99 ++pos; in cifs_build_devname() 100 *pos = '/'; in cifs_build_devname() 101 ++pos; in cifs_build_devname() 104 memcpy(pos, nodename, unclen); in cifs_build_devname() [all …]
|
/fs/fuse/ |
D | readdir.c | 29 if (ctx->pos == 0) in fuse_use_readdirplus() 35 struct fuse_dirent *dirent, loff_t pos) in fuse_add_dirent_to_cache() argument 51 if (fi->rdc.cached || pos != fi->rdc.pos) { in fuse_add_dirent_to_cache() 78 WARN_ON(fi->rdc.pos != pos)) in fuse_add_dirent_to_cache() 89 fi->rdc.pos = dirent->off; in fuse_add_dirent_to_cache() 96 static void fuse_readdir_cache_end(struct file *file, loff_t pos) in fuse_readdir_cache_end() argument 103 if (fi->rdc.pos != pos) { in fuse_readdir_cache_end() 122 fuse_add_dirent_to_cache(file, dirent, ctx->pos); in fuse_emit() 146 ctx->pos = dirent->off; in parse_dirfile() 318 ctx->pos = dirent->off; in parse_dirplusfile() [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 527 for (pos = 0; pos < size; pos <<= 1) { in ntfs_check_logfile() 528 pgoff_t idx = pos >> PAGE_SHIFT; in ntfs_check_logfile() [all …]
|
/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 …]
|
/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 | 28 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()
|