Home
last modified time | relevance | path

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

1234567

/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 + 5; in hpfs_ea_ext_remove()
76 unsigned pos; in hpfs_read_ea() local
94 pos = 0; in hpfs_read_ea()
95 while (pos < len) { in hpfs_read_ea()
[all …]
/fs/jffs2/
Dcompr_rtime.c38 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/ncpfs/
Dfile.c108 off_t pos; in ncp_file_read() local
120 pos = *ppos; in ncp_file_read()
127 if (pos > inode->i_sb->s_maxbytes) in ncp_file_read()
129 if (pos + count > inode->i_sb->s_maxbytes) { in ncp_file_read()
130 count = inode->i_sb->s_maxbytes - pos; in ncp_file_read()
151 bufsize - (pos % bufsize), in ncp_file_read()
156 pos, to_read, buf, &read_this_time, in ncp_file_read()
162 pos += read_this_time; in ncp_file_read()
172 *ppos = pos; in ncp_file_read()
189 off_t pos; in ncp_file_write() local
[all …]
Dncpsign_kernel.c22 #define BVAL(buf,pos) (((__u8 *)(buf))[pos]) argument
23 #define PVAL(buf,pos) ((unsigned)BVAL(buf,pos)) argument
24 #define BSET(buf,pos,val) (BVAL(buf,pos) = (val)) argument
27 WVAL_LH(__u8 * buf, int pos) in WVAL_LH() argument
29 return PVAL(buf, pos) | PVAL(buf, pos + 1) << 8; in WVAL_LH()
32 DVAL_LH(__u8 * buf, int pos) in DVAL_LH() argument
34 return WVAL_LH(buf, pos) | WVAL_LH(buf, pos + 2) << 16; in DVAL_LH()
37 WSET_LH(__u8 * buf, int pos, __u16 val) in WSET_LH() argument
39 BSET(buf, pos, val & 0xff); in WSET_LH()
40 BSET(buf, pos + 1, val >> 8); in WSET_LH()
[all …]
/fs/
Dread_write.c218 loff_t pos; in rw_verify_area() local
224 pos = *ppos; in rw_verify_area()
225 if (unlikely((pos < 0) || (loff_t) (pos + count) < 0)) in rw_verify_area()
231 inode, file, pos, count); in rw_verify_area()
277 ssize_t vfs_read(struct file *file, char __user *buf, size_t count, loff_t *pos) in vfs_read() argument
288 ret = rw_verify_area(READ, file, pos, count); in vfs_read()
292 ret = file->f_op->read(file, buf, count, pos); in vfs_read()
294 ret = do_sync_read(file, buf, count, pos); in vfs_read()
332 ssize_t vfs_write(struct file *file, const char __user *buf, size_t count, loff_t *pos) in vfs_write() argument
343 ret = rw_verify_area(WRITE, file, pos, count); in vfs_write()
[all …]
Dseq_file.c67 loff_t pos = 0, index; in traverse() local
97 if (pos + m->count > offset) { in traverse()
98 m->from = offset - pos; in traverse()
103 pos += m->count; in traverse()
105 if (pos == offset) { in traverse()
136 loff_t pos; in seq_read() local
193 pos = m->index; in seq_read()
194 p = m->op->start(m, &pos); in seq_read()
205 p = m->op->next(m, p, &pos); in seq_read()
206 m->index = pos; in seq_read()
[all …]
Dlibfs.c352 loff_t pos, unsigned len, unsigned flags, in simple_write_begin() argument
359 index = pos >> PAGE_CACHE_SHIFT; in simple_write_begin()
360 from = pos & (PAGE_CACHE_SIZE - 1); in simple_write_begin()
375 loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT) + to; in simple_commit_write() local
383 if (pos > inode->i_size) in simple_commit_write()
384 i_size_write(inode, pos); in simple_commit_write()
390 loff_t pos, unsigned len, unsigned copied, in simple_write_end() argument
393 unsigned from = pos & (PAGE_CACHE_SIZE - 1); in simple_write_end()
527 loff_t pos = *ppos; in simple_read_from_buffer() local
528 if (pos < 0) in simple_read_from_buffer()
[all …]
/fs/ecryptfs/
Dread_write.c124 loff_t pos; in ecryptfs_write() local
132 pos = ecryptfs_file_size; in ecryptfs_write()
134 pos = offset; in ecryptfs_write()
135 while (pos < (offset + size)) { in ecryptfs_write()
136 pgoff_t ecryptfs_page_idx = (pos >> PAGE_CACHE_SHIFT); in ecryptfs_write()
137 size_t start_offset_in_page = (pos & ~PAGE_CACHE_MASK); in ecryptfs_write()
139 size_t total_remaining_bytes = ((offset + size) - pos); in ecryptfs_write()
143 if (pos < offset) { in ecryptfs_write()
145 size_t total_remaining_zeros = (offset - pos); in ecryptfs_write()
168 if (pos < offset || !start_offset_in_page) { in ecryptfs_write()
[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.c51 RESTART_PAGE_HEADER *rp, s64 pos) in ntfs_check_restart_page_header() argument
76 if (pos && pos != logfile_system_page_size) { in ntfs_check_restart_page_header()
349 RESTART_PAGE_HEADER *rp, s64 pos, RESTART_PAGE_HEADER **wrp, in ntfs_check_and_load_restart_page() argument
358 if (!ntfs_check_restart_page_header(vi, rp, pos)) { in ntfs_check_and_load_restart_page()
383 size = PAGE_CACHE_SIZE - (pos & ~PAGE_CACHE_MASK); in ntfs_check_and_load_restart_page()
396 idx = (pos + size) >> PAGE_CACHE_SHIFT; in ntfs_check_and_load_restart_page()
397 BUG_ON((pos + size) & ~PAGE_CACHE_MASK); in ntfs_check_and_load_restart_page()
485 s64 size, pos; in ntfs_check_logfile() local
540 for (pos = 0; pos < size; pos <<= 1) { in ntfs_check_logfile()
541 pgoff_t idx = pos >> PAGE_CACHE_SHIFT; in ntfs_check_logfile()
[all …]
Dfile.c492 unsigned nr_pages, s64 pos, size_t bytes) in ntfs_prepare_pages_for_non_resident_write() argument
529 (long long)pos, bytes); in ntfs_prepare_pages_for_non_resident_write()
553 cpos = pos >> vol->cluster_size_bits; in ntfs_prepare_pages_for_non_resident_write()
554 end = pos + bytes; in ntfs_prepare_pages_for_non_resident_write()
596 if ((bh_pos < pos && bh_end > pos) || in ntfs_prepare_pages_for_non_resident_write()
652 if (bh_end <= pos || bh_pos >= end) in ntfs_prepare_pages_for_non_resident_write()
668 bh_end > pos && in ntfs_prepare_pages_for_non_resident_write()
669 (bh_pos < pos || in ntfs_prepare_pages_for_non_resident_write()
703 if (bh_end <= pos || bh_pos >= end) { in ntfs_prepare_pages_for_non_resident_write()
714 (bh_pos < pos || bh_end > end)) { in ntfs_prepare_pages_for_non_resident_write()
[all …]
/fs/sysfs/
Ddir.c46 struct sysfs_dirent **pos; in sysfs_link_sibling() local
54 for (pos = &parent_sd->s_dir.children; *pos; pos = &(*pos)->s_sibling) { in sysfs_link_sibling()
55 if (sd->s_ino < (*pos)->s_ino) in sysfs_link_sibling()
58 sd->s_sibling = *pos; in sysfs_link_sibling()
59 *pos = sd; in sysfs_link_sibling()
74 struct sysfs_dirent **pos; in sysfs_unlink_sibling() local
76 for (pos = &sd->s_parent->s_dir.children; *pos; in sysfs_unlink_sibling()
77 pos = &(*pos)->s_sibling) { in sysfs_unlink_sibling()
78 if (*pos == sd) { in sysfs_unlink_sibling()
79 *pos = sd->s_sibling; in sysfs_unlink_sibling()
[all …]
/fs/sysv/
Ddir.c41 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument
47 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk()
48 if (pos+len > dir->i_size) { in dir_commit_chunk()
49 i_size_write(dir, pos+len); in dir_commit_chunk()
70 unsigned long pos = filp->f_pos; in sysv_readdir() local
73 unsigned offset = pos & ~PAGE_CACHE_MASK; in sysv_readdir()
74 unsigned long n = pos >> PAGE_CACHE_SHIFT; in sysv_readdir()
79 pos = (pos + SYSV_DIRSIZE-1) & ~(SYSV_DIRSIZE-1); in sysv_readdir()
80 if (pos >= inode->i_size) in sysv_readdir()
195 loff_t pos; in sysv_add_link() local
[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/
Dnfs4state.c98 struct rb_node *pos; in nfs4_get_renew_cred_locked() local
101 for (pos = rb_first(&clp->cl_state_owners); pos != NULL; pos = rb_next(pos)) { in nfs4_get_renew_cred_locked()
102 sp = rb_entry(pos, struct nfs4_state_owner, so_client_node); in nfs4_get_renew_cred_locked()
124 struct rb_node *pos; in nfs4_get_setclientid_cred() local
131 pos = rb_first(&clp->cl_state_owners); in nfs4_get_setclientid_cred()
132 if (pos != NULL) { in nfs4_get_setclientid_cred()
133 sp = rb_entry(pos, struct nfs4_state_owner, so_client_node); in nfs4_get_setclientid_cred()
145 struct nfs_unique_id *pos; in nfs_alloc_unique_id() local
162 pos = rb_entry(parent, struct nfs_unique_id, rb_node); in nfs_alloc_unique_id()
164 if (new->id < pos->id) in nfs_alloc_unique_id()
[all …]
Ddirect.c116 ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned lon… in nfs_direct_IO() argument
120 (long long) pos, nr_segs); in nfs_direct_IO()
275 loff_t pos) in nfs_direct_read_schedule_segment() argument
335 data->args.offset = pos; in nfs_direct_read_schedule_segment()
364 pos += bytes; in nfs_direct_read_schedule_segment()
381 loff_t pos) in nfs_direct_read_schedule_iovec() argument
391 result = nfs_direct_read_schedule_segment(dreq, vec, pos); in nfs_direct_read_schedule_iovec()
397 pos += vec->iov_len; in nfs_direct_read_schedule_iovec()
412 unsigned long nr_segs, loff_t pos) in nfs_direct_read() argument
427 result = nfs_direct_read_schedule_iovec(dreq, iov, nr_segs, pos); in nfs_direct_read()
[all …]
/fs/udf/
Dfile.c83 loff_t pos, unsigned len, unsigned copied, in udf_adinicb_write_end() argument
87 unsigned offset = pos & (PAGE_CACHE_SIZE - 1); in udf_adinicb_write_end()
96 return simple_write_end(file, mapping, pos, len, copied, page, fsdata); in udf_adinicb_write_end()
113 int err, pos; in udf_file_aio_write() local
119 pos = inode->i_size; in udf_file_aio_write()
121 pos = ppos; in udf_file_aio_write()
125 pos + count)) { in udf_file_aio_write()
126 udf_expand_file_adinicb(inode, pos + count, &err); in udf_file_aio_write()
132 if (pos + count > inode->i_size) in udf_file_aio_write()
133 iinfo->i_lenAlloc = pos + count; in udf_file_aio_write()
/fs/minix/
Ddir.c53 static int dir_commit_chunk(struct page *page, loff_t pos, unsigned len) in dir_commit_chunk() argument
58 block_write_end(NULL, mapping, pos, len, len, page, NULL); in dir_commit_chunk()
60 if (pos+len > dir->i_size) { in dir_commit_chunk()
61 i_size_write(dir, pos+len); in dir_commit_chunk()
94 unsigned long pos = filp->f_pos; in minix_readdir() local
97 unsigned offset = pos & ~PAGE_CACHE_MASK; in minix_readdir()
98 unsigned long n = pos >> PAGE_CACHE_SHIFT; in minix_readdir()
107 pos = (pos + chunk_size-1) & ~(chunk_size-1); in minix_readdir()
108 if (pos >= inode->i_size) in minix_readdir()
231 loff_t pos; in minix_add_link() local
[all …]
/fs/adfs/
Ddir_f.c247 __adfs_dir_get(struct adfs_dir *dir, int pos, struct object_info *obj) in __adfs_dir_get() argument
253 buffer = pos >> sb->s_blocksize_bits; in __adfs_dir_get()
258 offset = pos & (sb->s_blocksize - 1); in __adfs_dir_get()
277 __adfs_dir_put(struct adfs_dir *dir, int pos, struct object_info *obj) in __adfs_dir_put() argument
283 buffer = pos >> sb->s_blocksize_bits; in __adfs_dir_put()
288 offset = pos & (sb->s_blocksize - 1); in __adfs_dir_put()
324 int pos, ret; in adfs_dir_find_entry() local
328 for (pos = 5; pos < ADFS_NUM_DIR_ENTRIES * 26 + 5; pos += 26) { in adfs_dir_find_entry()
331 if (!__adfs_dir_get(dir, pos, &obj)) in adfs_dir_find_entry()
335 ret = pos; in adfs_dir_find_entry()
[all …]
/fs/afs/
Dproc.c24 static void *afs_proc_cells_start(struct seq_file *p, loff_t *pos);
25 static void *afs_proc_cells_next(struct seq_file *p, void *v, loff_t *pos);
67 static void *afs_proc_cell_volumes_start(struct seq_file *p, loff_t *pos);
69 loff_t *pos);
92 static void *afs_proc_cell_vlservers_start(struct seq_file *p, loff_t *pos);
94 loff_t *pos);
116 static void *afs_proc_cell_servers_start(struct seq_file *p, loff_t *pos);
118 loff_t *pos);
213 static void *afs_proc_cells_next(struct seq_file *p, void *v, loff_t *pos) in afs_proc_cells_next() argument
215 return seq_list_next(v, &afs_proc_cells, pos); in afs_proc_cells_next()
[all …]
/fs/hfs/
Dbitmap.c142 u32 pos; in hfs_vbm_search_free() local
151 pos = hfs_find_set_zero_bits(bitmap, HFS_SB(sb)->fs_ablocks, goal, num_bits); in hfs_vbm_search_free()
152 if (pos >= HFS_SB(sb)->fs_ablocks) { in hfs_vbm_search_free()
154 pos = hfs_find_set_zero_bits(bitmap, goal, 0, num_bits); in hfs_vbm_search_free()
155 if (pos >= HFS_SB(sb)->fs_ablocks) { in hfs_vbm_search_free()
156 *num_bits = pos = 0; in hfs_vbm_search_free()
161 dprint(DBG_BITMAP, "alloc_bits: %u,%u\n", pos, *num_bits); in hfs_vbm_search_free()
166 return pos; in hfs_vbm_search_free()
/fs/ubifs/
Dlpt.c232 static void pack_bits(uint8_t **addr, int *pos, uint32_t val, int nrbits) in pack_bits() argument
235 int b = *pos; in pack_bits()
239 ubifs_assert(*pos >= 0); in pack_bits()
240 ubifs_assert(*pos < 8); in pack_bits()
271 *pos = b; in pack_bits()
282 uint32_t ubifs_unpack_bits(uint8_t **addr, int *pos, int nrbits) in ubifs_unpack_bits() argument
286 int b = *pos; in ubifs_unpack_bits()
292 ubifs_assert(*pos >= 0); in ubifs_unpack_bits()
293 ubifs_assert(*pos < 8); in ubifs_unpack_bits()
338 *pos = b; in ubifs_unpack_bits()
[all …]
/fs/xfs/linux-2.6/
Dxfs_lrw.c132 loff_t pos, /* offset in file */ in xfs_iozero() argument
144 offset = (pos & (PAGE_CACHE_SIZE -1)); /* Within page */ in xfs_iozero()
149 status = pagecache_write_begin(NULL, mapping, pos, bytes, in xfs_iozero()
157 status = pagecache_write_end(NULL, mapping, pos, bytes, bytes, in xfs_iozero()
160 pos += bytes; in xfs_iozero()
577 loff_t pos; in xfs_write() local
587 pos = *offset; in xfs_write()
612 error = -generic_write_checks(file, &pos, &count, in xfs_write()
628 pos, count, dmflags, &iolock); in xfs_write()
642 if ((file->f_flags & O_APPEND) && pos != xip->i_size) in xfs_write()
[all …]
/fs/ufs/
Ddir.c43 static int ufs_commit_chunk(struct page *page, loff_t pos, unsigned len) in ufs_commit_chunk() argument
50 block_write_end(NULL, mapping, pos, len, len, page, NULL); in ufs_commit_chunk()
51 if (pos+len > dir->i_size) { in ufs_commit_chunk()
52 i_size_write(dir, pos+len); in ufs_commit_chunk()
92 loff_t pos = page_offset(page) + in ufs_set_link() local
98 err = __ufs_write_begin(NULL, page->mapping, pos, len, in ufs_set_link()
105 err = ufs_commit_chunk(page, pos, len); in ufs_set_link()
327 loff_t pos; in ufs_add_link() local
382 pos = page_offset(page) + in ufs_add_link()
384 err = __ufs_write_begin(NULL, page->mapping, pos, rec_len, in ufs_add_link()
[all …]

1234567