Home
last modified time | relevance | path

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

1234567891011

/fs/romfs/
Dstorage.c27 static int romfs_mtd_read(struct super_block *sb, unsigned long pos, in romfs_mtd_read() argument
33 ret = ROMFS_MTD_READ(sb, pos, buflen, &rlen, buf); in romfs_mtd_read()
41 unsigned long pos, size_t maxlen) in romfs_mtd_strnlen() argument
52 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strnlen()
59 pos += len; in romfs_mtd_strnlen()
70 static int romfs_mtd_strcmp(struct super_block *sb, unsigned long pos, in romfs_mtd_strcmp() argument
83 ret = ROMFS_MTD_READ(sb, pos, segment, &len, buf); in romfs_mtd_strcmp()
91 pos += len; in romfs_mtd_strcmp()
107 static int romfs_blk_read(struct super_block *sb, unsigned long pos, in romfs_blk_read() argument
116 offset = pos & (ROMBSIZE - 1); in romfs_blk_read()
[all …]
/fs/
Dread_write.c382 loff_t pos; in rw_verify_area() local
388 pos = *ppos; in rw_verify_area()
389 if (unlikely(pos < 0)) { in rw_verify_area()
392 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area()
394 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area()
402 inode, file, pos, count); in rw_verify_area()
431 loff_t *pos) in __vfs_read() argument
434 return file->f_op->read(file, buf, count, pos); in __vfs_read()
436 return new_sync_read(file, buf, count, pos); in __vfs_read()
442 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) in vfs_read() argument
[all …]
Dseq_file.c107 loff_t pos = 0, index; in traverse() local
137 if (pos + m->count > offset) { in traverse()
138 m->from = offset - pos; in traverse()
143 pos += m->count; in traverse()
145 if (pos == offset) { in traverse()
177 loff_t pos; in seq_read() local
238 pos = m->index; in seq_read()
239 p = m->op->start(m, &pos); in seq_read()
250 p = m->op->next(m, p, &pos); in seq_read()
251 m->index = pos; in seq_read()
[all …]
/fs/kernfs/
Ddir.c263 struct kernfs_node *pos; in kernfs_link_sibling() local
266 pos = rb_to_kn(*node); in kernfs_link_sibling()
268 result = kernfs_sd_compare(kn, pos); in kernfs_link_sibling()
270 node = &pos->rb.rb_left; in kernfs_link_sibling()
272 node = &pos->rb.rb_right; in kernfs_link_sibling()
961 static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos) in kernfs_leftmost_descendant() argument
968 last = pos; in kernfs_leftmost_descendant()
970 if (kernfs_type(pos) != KERNFS_DIR) in kernfs_leftmost_descendant()
973 rbn = rb_first(&pos->dir.children); in kernfs_leftmost_descendant()
977 pos = rb_to_kn(rbn); in kernfs_leftmost_descendant()
[all …]
/fs/hpfs/
Dea.c16 unsigned pos = 0; in hpfs_ea_ext_remove() local
17 while (pos < len) { in hpfs_ea_ext_remove()
20 if (pos + 4 > len) { in hpfs_ea_ext_remove()
25 if (hpfs_ea_read(s, a, ano, pos, 4, ex)) return; in hpfs_ea_ext_remove()
29 ano ? "anode" : "sectors", a, pos); in hpfs_ea_ext_remove()
32 if (hpfs_ea_read(s, a, ano, pos + 4, ea->namelen + 9, ex+4)) in hpfs_ea_ext_remove()
36 pos += ea->namelen + ea_valuelen(ea) + 5; in hpfs_ea_ext_remove()
76 unsigned pos; in hpfs_read_ea() local
95 pos = 0; in hpfs_read_ea()
96 while (pos < len) { in hpfs_read_ea()
[all …]
Ddir.c26 loff_t pos; in hpfs_dir_lseek() local
41 pos = ((loff_t) hpfs_de_as_down_as_possible(s, hpfs_inode->i_dno) << 4) + 1; in hpfs_dir_lseek()
42 while (pos != new_off) { in hpfs_dir_lseek()
43 if (map_pos_dirent(i, &pos, &qbh)) hpfs_brelse4(&qbh); in hpfs_dir_lseek()
45 if (pos == 12) goto fail; in hpfs_dir_lseek()
108 if (ctx->pos == 12) { /* diff -r requires this (note, that diff -r */ in hpfs_readdir()
109 ctx->pos = 13; /* also fails on msdos filesystem in 2.0) */ in hpfs_readdir()
112 if (ctx->pos == 13) { in hpfs_readdir()
123 if (hpfs_stop_cycles(inode->i_sb, ctx->pos, &c1, &c2, "hpfs_readdir")) { in hpfs_readdir()
127 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/ncpfs/
Dncpsign_kernel.c23 #define BVAL(buf,pos) (((const __u8 *)(buf))[pos]) argument
24 #define PVAL(buf,pos) ((unsigned)BVAL(buf,pos)) argument
25 #define BSET(buf,pos,val) (((__u8 *)(buf))[pos] = (val)) argument
28 WVAL_LH(const __u8 * buf, int pos) in WVAL_LH() argument
30 return PVAL(buf, pos) | PVAL(buf, pos + 1) << 8; in WVAL_LH()
33 DVAL_LH(const __u8 * buf, int pos) in DVAL_LH() argument
35 return WVAL_LH(buf, pos) | WVAL_LH(buf, pos + 2) << 16; in DVAL_LH()
38 WSET_LH(__u8 * buf, int pos, __u16 val) in WSET_LH() argument
40 BSET(buf, pos, val & 0xff); in WSET_LH()
41 BSET(buf, pos + 1, val >> 8); in WSET_LH()
[all …]
Dfile.c106 off_t pos = iocb->ki_pos; in ncp_file_read_iter() local
116 if (pos > inode->i_sb->s_maxbytes) in ncp_file_read_iter()
118 iov_iter_truncate(to, inode->i_sb->s_maxbytes - pos); in ncp_file_read_iter()
138 bufsize - (pos % bufsize), in ncp_file_read_iter()
143 pos, to_read, to, &read_this_time, in ncp_file_read_iter()
149 pos += read_this_time; in ncp_file_read_iter()
157 iocb->ki_pos = pos; in ncp_file_read_iter()
176 off_t pos; in ncp_file_write_iter() local
199 pos = iocb->ki_pos; in ncp_file_write_iter()
203 bufsize - (pos % bufsize), in ncp_file_write_iter()
[all …]
/fs/logfs/
Ddir.c67 loff_t pos) in write_dir() argument
69 return logfs_inode_write(dir, dd, sizeof(*dd), pos, WF_LOCK, NULL); in write_dir()
77 static s64 dir_seek_data(struct inode *inode, s64 pos) in dir_seek_data() argument
79 s64 new_pos = logfs_seek_data(inode, pos); in dir_seek_data()
81 return max(pos, new_pos - 1); in dir_seek_data()
86 loff_t pos = bix << inode->i_sb->s_blocksize_bits; in beyond_eof() local
87 return pos >= i_size_read(inode); in beyond_eof()
287 loff_t pos; in logfs_readdir() local
291 if (ctx->pos < 0) in logfs_readdir()
297 pos = ctx->pos - 2; in logfs_readdir()
[all …]
/fs/ext4/
Ddir.c153 offset = ctx->pos & (sb->s_blocksize - 1); in ext4_readdir()
155 while (ctx->pos < inode->i_size) { in ext4_readdir()
158 map.m_lblk = ctx->pos >> EXT4_BLOCK_SIZE_BITS(sb); in ext4_readdir()
180 (unsigned long long) ctx->pos); in ext4_readdir()
184 if (ctx->pos > inode->i_blocks << 9) in ext4_readdir()
186 ctx->pos += sb->s_blocksize - offset; in ext4_readdir()
196 (unsigned long long)ctx->pos); in ext4_readdir()
197 ctx->pos += sb->s_blocksize - offset; in ext4_readdir()
225 ctx->pos = (ctx->pos & ~(sb->s_blocksize - 1)) in ext4_readdir()
230 while (ctx->pos < inode->i_size in ext4_readdir()
[all …]
/fs/ecryptfs/
Dread_write.c113 loff_t pos; in ecryptfs_write() local
122 pos = ecryptfs_file_size; in ecryptfs_write()
124 pos = offset; in ecryptfs_write()
125 while (pos < (offset + size)) { in ecryptfs_write()
126 pgoff_t ecryptfs_page_idx = (pos >> PAGE_CACHE_SHIFT); in ecryptfs_write()
127 size_t start_offset_in_page = (pos & ~PAGE_CACHE_MASK); in ecryptfs_write()
129 loff_t total_remaining_bytes = ((offset + size) - pos); in ecryptfs_write()
138 if (pos < offset) { in ecryptfs_write()
140 loff_t total_remaining_zeros = (offset - pos); in ecryptfs_write()
163 if (pos < offset || !start_offset_in_page) { in ecryptfs_write()
[all …]
/fs/sysv/
Ddir.c36 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument
42 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk()
43 if (pos+len > dir->i_size) { in dir_commit_chunk()
44 i_size_write(dir, pos+len); in dir_commit_chunk()
65 unsigned long pos = ctx->pos; in sysv_readdir() local
72 ctx->pos = pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1); in sysv_readdir()
73 if (pos >= inode->i_size) in sysv_readdir()
76 offset = pos & ~PAGE_CACHE_MASK; in sysv_readdir()
77 n = pos >> PAGE_CACHE_SHIFT; in sysv_readdir()
89 for ( ;(char*)de <= limit; de++, ctx->pos += sizeof(*de)) { in sysv_readdir()
[all …]
/fs/ntfs/
Dbitmap.c55 int pos, len; in __ntfs_bitmap_set_bits_in_run() local
85 pos = (start_bit >> 3) & ~PAGE_CACHE_MASK; in __ntfs_bitmap_set_bits_in_run()
92 u8 *byte = kaddr + pos; in __ntfs_bitmap_set_bits_in_run()
105 pos++; in __ntfs_bitmap_set_bits_in_run()
111 len = min_t(s64, cnt >> 3, PAGE_CACHE_SIZE - pos); in __ntfs_bitmap_set_bits_in_run()
112 memset(kaddr + pos, value ? 0xff : 0, len); in __ntfs_bitmap_set_bits_in_run()
117 len += pos; in __ntfs_bitmap_set_bits_in_run()
174 pos = __ntfs_bitmap_set_bits_in_run(vi, start_bit, count - cnt, in __ntfs_bitmap_set_bits_in_run()
177 pos = 0; in __ntfs_bitmap_set_bits_in_run()
178 if (!pos) { in __ntfs_bitmap_set_bits_in_run()
[all …]
Dlogfile.c52 RESTART_PAGE_HEADER *rp, s64 pos) in ntfs_check_restart_page_header() argument
77 if (pos && pos != logfile_system_page_size) { in ntfs_check_restart_page_header()
350 RESTART_PAGE_HEADER *rp, s64 pos, RESTART_PAGE_HEADER **wrp, in ntfs_check_and_load_restart_page() argument
359 if (!ntfs_check_restart_page_header(vi, rp, pos)) { in ntfs_check_and_load_restart_page()
384 size = PAGE_CACHE_SIZE - (pos & ~PAGE_CACHE_MASK); in ntfs_check_and_load_restart_page()
397 idx = (pos + size) >> PAGE_CACHE_SHIFT; in ntfs_check_and_load_restart_page()
398 BUG_ON((pos + size) & ~PAGE_CACHE_MASK); in ntfs_check_and_load_restart_page()
486 s64 size, pos; in ntfs_check_logfile() local
541 for (pos = 0; pos < size; pos <<= 1) { in ntfs_check_logfile()
542 pgoff_t idx = pos >> PAGE_CACHE_SHIFT; in ntfs_check_logfile()
[all …]
/fs/ceph/
Dfile.c419 u64 pos, this_len, left; in striped_read() local
430 pos = off; in striped_read()
439 page_align = (pos - io_align + buf_align) & ~PAGE_MASK; in striped_read()
441 page_align = pos & ~PAGE_MASK; in striped_read()
444 &ci->i_layout, pos, &this_len, in striped_read()
452 dout("striped_read %llu~%llu (read %u) got %d%s%s\n", pos, left, read, in striped_read()
457 if (was_short && (pos + ret < inode->i_size)) { in striped_read()
459 inode->i_size - pos - ret); in striped_read()
463 pos + ret, pos + ret + zlen); in striped_read()
469 pos += ret; in striped_read()
[all …]
/fs/cifs/
Dcifs_dfs_ref.c70 char *pos; in cifs_build_devname() local
79 pos = nodename + unclen - 1; in cifs_build_devname()
82 while (*pos == '\\') { in cifs_build_devname()
83 --pos; in cifs_build_devname()
97 pos = dev; in cifs_build_devname()
99 *pos = '/'; in cifs_build_devname()
100 ++pos; in cifs_build_devname()
101 *pos = '/'; in cifs_build_devname()
102 ++pos; in cifs_build_devname()
105 memcpy(pos, nodename, unclen); in cifs_build_devname()
[all …]
/fs/minix/
Ddir.c48 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument
53 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk()
55 if (pos+len > dir->i_size) { in dir_commit_chunk()
56 i_size_write(dir, pos+len); in dir_commit_chunk()
87 unsigned long pos = ctx->pos; in minix_readdir() local
91 ctx->pos = pos = ALIGN(pos, chunk_size); in minix_readdir()
92 if (pos >= inode->i_size) in minix_readdir()
95 offset = pos & ~PAGE_CACHE_MASK; in minix_readdir()
96 n = pos >> PAGE_CACHE_SHIFT; in minix_readdir()
127 ctx->pos += chunk_size; in minix_readdir()
[all …]
/fs/freevxfs/
Dvxfs_lookup.c237 loff_t pos; in vxfs_readdir() local
239 if (ctx->pos == 0) { in vxfs_readdir()
242 ctx->pos = 1; in vxfs_readdir()
244 if (ctx->pos == 1) { in vxfs_readdir()
247 ctx->pos = 2; in vxfs_readdir()
249 pos = ctx->pos - 2; in vxfs_readdir()
251 if (pos > VXFS_DIRROUND(ip->i_size)) in vxfs_readdir()
258 page = pos >> PAGE_CACHE_SHIFT; in vxfs_readdir()
259 offset = pos & ~PAGE_CACHE_MASK; in vxfs_readdir()
260 block = (u_long)(pos >> sbp->s_blocksize_bits) % pblocks; in vxfs_readdir()
[all …]
/fs/proc/
Dinterrupts.c11 static void *int_seq_start(struct seq_file *f, loff_t *pos) in int_seq_start() argument
13 return (*pos <= nr_irqs) ? pos : NULL; in int_seq_start()
16 static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos) in int_seq_next() argument
18 (*pos)++; in int_seq_next()
19 if (*pos > nr_irqs) in int_seq_next()
21 return pos; in int_seq_next()
Ddevices.c26 static void *devinfo_start(struct seq_file *f, loff_t *pos) in devinfo_start() argument
28 if (*pos < (BLKDEV_MAJOR_HASH_SIZE + CHRDEV_MAJOR_HASH_SIZE)) in devinfo_start()
29 return pos; in devinfo_start()
33 static void *devinfo_next(struct seq_file *f, void *v, loff_t *pos) in devinfo_next() argument
35 (*pos)++; in devinfo_next()
36 if (*pos >= (BLKDEV_MAJOR_HASH_SIZE + CHRDEV_MAJOR_HASH_SIZE)) in devinfo_next()
38 return pos; in devinfo_next()
/fs/nfs/
Dnfs4client.c482 struct nfs_client *pos, *prev = NULL; in nfs40_walk_client_list() local
490 list_for_each_entry(pos, &nn->nfs_client_list, cl_share_link) { in nfs40_walk_client_list()
492 if (pos->rpc_ops != new->rpc_ops) in nfs40_walk_client_list()
495 if (pos->cl_minorversion != new->cl_minorversion) in nfs40_walk_client_list()
500 if (pos->cl_cons_state > NFS_CS_READY) { in nfs40_walk_client_list()
501 atomic_inc(&pos->cl_count); in nfs40_walk_client_list()
505 prev = pos; in nfs40_walk_client_list()
507 status = nfs_wait_client_init_complete(pos); in nfs40_walk_client_list()
513 if (pos->cl_cons_state != NFS_CS_READY) in nfs40_walk_client_list()
516 if (pos->cl_clientid != new->cl_clientid) in nfs40_walk_client_list()
[all …]
/fs/ext2/
Ddir.c88 static int ext2_commit_chunk(struct page *page, loff_t pos, unsigned len) in ext2_commit_chunk() argument
95 block_write_end(NULL, mapping, pos, len, len, page, NULL); in ext2_commit_chunk()
97 if (pos+len > dir->i_size) { in ext2_commit_chunk()
98 i_size_write(dir, pos+len); in ext2_commit_chunk()
287 loff_t pos = ctx->pos; in ext2_readdir() local
290 unsigned int offset = pos & ~PAGE_CACHE_MASK; in ext2_readdir()
291 unsigned long n = pos >> PAGE_CACHE_SHIFT; in ext2_readdir()
297 if (pos > inode->i_size - EXT2_DIR_REC_LEN(1)) in ext2_readdir()
312 ctx->pos += PAGE_CACHE_SIZE - offset; in ext2_readdir()
319 ctx->pos = (n<<PAGE_CACHE_SHIFT) + offset; in ext2_readdir()
[all …]
/fs/squashfs/
Dpage_actor.c46 int pos = 0, avail, i; in squashfs_actor_to_buf() local
48 for (i = 0; i < actor->pages && pos < length; ++i) { in squashfs_actor_to_buf()
49 avail = min_t(int, length - pos, PAGE_CACHE_SIZE); in squashfs_actor_to_buf()
52 memcpy(buf + pos, pageaddr, avail); in squashfs_actor_to_buf()
55 pos += avail; in squashfs_actor_to_buf()
63 int pos = 0, avail, i; in squashfs_buf_to_actor() local
65 for (i = 0; i < actor->pages && pos < length; ++i) { in squashfs_buf_to_actor()
66 avail = min_t(int, length - pos, PAGE_CACHE_SIZE); in squashfs_buf_to_actor()
69 memcpy(pageaddr, buf + pos, avail); in squashfs_buf_to_actor()
72 pos += avail; in squashfs_buf_to_actor()
/fs/isofs/
Ddir.c97 offset = ctx->pos & (bufsize - 1); in do_isofs_readdir()
98 block = ctx->pos >> bufbits; in do_isofs_readdir()
100 while (ctx->pos < inode->i_size) { in do_isofs_readdir()
122 ctx->pos = (ctx->pos + ISOFS_BLOCK_SIZE) & ~(ISOFS_BLOCK_SIZE - 1); in do_isofs_readdir()
123 block = ctx->pos >> bufbits; in do_isofs_readdir()
168 ctx->pos += de_len; in do_isofs_readdir()
177 ctx->pos += de_len; in do_isofs_readdir()
187 ctx->pos += de_len; in do_isofs_readdir()
201 ctx->pos += de_len; in do_isofs_readdir()
236 ctx->pos += de_len; in do_isofs_readdir()

1234567891011