Home
last modified time | relevance | path

Searched refs:count (Results 1 – 25 of 288) sorted by relevance

12345678910>>...12

/fs/
Dseq_file.c73 m->count = m->from = 0; in traverse()
93 m->count = 0; in traverse()
95 if (m->count == m->size) in traverse()
97 if (pos + m->count > offset) { in traverse()
99 m->count -= m->from; in traverse()
103 pos += m->count; in traverse()
104 m->count = 0; in traverse()
153 m->count = 0; in seq_read()
177 if (m->count) { in seq_read()
178 n = min(m->count, size); in seq_read()
[all …]
Deventfd.c30 __u64 count; member
49 if (ULLONG_MAX - ctx->count < n) in eventfd_signal()
50 n = (int) (ULLONG_MAX - ctx->count); in eventfd_signal()
51 ctx->count += n; in eventfd_signal()
74 if (ctx->count > 0) in eventfd_poll()
76 if (ctx->count == ULLONG_MAX) in eventfd_poll()
78 if (ULLONG_MAX - 1 > ctx->count) in eventfd_poll()
85 static ssize_t eventfd_read(struct file *file, char __user *buf, size_t count, in eventfd_read() argument
93 if (count < sizeof(ucnt)) in eventfd_read()
97 ucnt = ctx->count; in eventfd_read()
[all …]
Dread_write.c215 int rw_verify_area(int read_write, struct file *file, loff_t *ppos, size_t count) in rw_verify_area() argument
222 if (unlikely((ssize_t) count < 0)) 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()
239 return count > MAX_RW_COUNT ? MAX_RW_COUNT : 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
285 if (unlikely(!access_ok(VERIFY_WRITE, buf, count))) in vfs_read()
288 ret = rw_verify_area(READ, file, pos, count); in vfs_read()
290 count = ret; in vfs_read()
292 ret = file->f_op->read(file, buf, count, pos); in vfs_read()
[all …]
Dreaddir.c106 struct old_linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument
145 int count; member
158 if (reclen > buf->count) in filldir()
184 buf->count -= reclen; in filldir()
192 struct linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument
200 if (!access_ok(VERIFY_WRITE, dirent, count)) in SYSCALL_DEFINE3()
210 buf.count = count; in SYSCALL_DEFINE3()
221 error = count - buf.count; in SYSCALL_DEFINE3()
231 int count; member
243 if (reclen > buf->count) in filldir64()
[all …]
/fs/sysv/
Dballoc.c47 unsigned count; in sysv_free_block() local
64 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_free_block()
66 if (count > sbi->s_flc_size) { in sysv_free_block()
75 if (count == sbi->s_flc_size || count == 0) { in sysv_free_block()
84 *(__fs16*)bh->b_data = cpu_to_fs16(sbi, count); in sysv_free_block()
85 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); in sysv_free_block()
89 count = 0; in sysv_free_block()
91 sbi->s_bcache[count++] = nr; in sysv_free_block()
93 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); in sysv_free_block()
105 unsigned count; in sysv_new_block() local
[all …]
Dialloc.c106 unsigned count; in sysv_free_inode() local
122 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_free_inode()
123 if (count < sbi->s_fic_size) { in sysv_free_inode()
124 *sv_sb_fic_inode(sb,count++) = cpu_to_fs16(sbi, ino); in sysv_free_inode()
125 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_free_inode()
141 unsigned count; in sysv_new_inode() local
148 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_new_inode()
149 if (count == 0 || (*sv_sb_fic_inode(sb,count-1) == 0)) { in sysv_new_inode()
150 count = refill_free_cache(sb); in sysv_new_inode()
151 if (count == 0) { in sysv_new_inode()
[all …]
/fs/sysfs/
Dbin.c36 fill_read(struct dentry *dentry, char *buffer, loff_t off, size_t count) in fill_read() argument
49 rc = attr->read(kobj, attr, buffer, off, count); in fill_read()
63 int count = min_t(size_t, bytes, PAGE_SIZE); in read() local
72 if (offs + count > size) in read()
73 count = size - offs; in read()
76 temp = kmalloc(count, GFP_KERNEL); in read()
82 count = fill_read(dentry, bb->buffer, offs, count); in read()
83 if (count < 0) { in read()
88 memcpy(temp, bb->buffer, count); in read()
92 if (copy_to_user(userbuf, temp, count)) { in read()
[all …]
Dfile.c53 size_t count; member
80 ssize_t count; in fill_read_buffer() local
92 count = ops->show(kobj, attr_sd->s_attr.attr, buffer->page); in fill_read_buffer()
100 if (count >= (ssize_t)PAGE_SIZE) { in fill_read_buffer()
104 count = PAGE_SIZE - 1; in fill_read_buffer()
106 if (count >= 0) { in fill_read_buffer()
108 buffer->count = count; in fill_read_buffer()
110 ret = count; in fill_read_buffer()
135 sysfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) in sysfs_read_file() argument
147 __func__, count, *ppos, buffer->page); in sysfs_read_file()
[all …]
/fs/ufs/
Dutil.c23 u64 count = 0; in _ubh_bread_() local
26 count = size >> uspi->s_fshift; in _ubh_bread_()
27 if (count > UFS_MAXFRAG) in _ubh_bread_()
34 ubh->count = count; in _ubh_bread_()
35 for (i = 0; i < count; i++) in _ubh_bread_()
52 u64 count = 0; in ubh_bread_uspi() local
55 count = size >> uspi->s_fshift; in ubh_bread_uspi()
56 if (count <= 0 || count > UFS_MAXFRAG) in ubh_bread_uspi()
59 USPI_UBH(uspi)->count = count; in ubh_bread_uspi()
60 for (i = 0; i < count; i++) in ubh_bread_uspi()
[all …]
Dballoc.c38 void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) in ufs_free_fragments() argument
53 (unsigned long long)fragment, count); in ufs_free_fragments()
55 if (ufs_fragnum(fragment) + count > uspi->s_fpg) in ufs_free_fragments()
76 end_bit = bit + count; in ufs_free_fragments()
88 DQUOT_FREE_BLOCK (inode, count); in ufs_free_fragments()
91 fs32_add(sb, &ucg->cg_cs.cs_nffree, count); in ufs_free_fragments()
92 uspi->cs_total.cs_nffree += count; in ufs_free_fragments()
93 fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_free_fragments()
140 void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count) in ufs_free_blocks() argument
155 (unsigned long long)fragment, count); in ufs_free_blocks()
[all …]
/fs/configfs/
Dfile.c45 size_t count; member
70 ssize_t count; in fill_read_buffer() local
77 count = ops->show_attribute(item,attr,buffer->page); in fill_read_buffer()
79 BUG_ON(count > (ssize_t)SIMPLE_ATTR_SIZE); in fill_read_buffer()
80 if (count >= 0) in fill_read_buffer()
81 buffer->count = count; in fill_read_buffer()
83 ret = count; in fill_read_buffer()
107 configfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) in configfs_read_file() argument
118 __func__, count, *ppos, buffer->page); in configfs_read_file()
119 retval = simple_read_from_buffer(buf, count, ppos, buffer->page, in configfs_read_file()
[all …]
/fs/xfs/
Dxfs_attr_leaf.c239 hdr->count = 0; in xfs_attr_shortform_create()
270 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add()
293 sf->hdr.count++; in xfs_attr_shortform_add()
317 end = sf->hdr.count; in xfs_attr_shortform_remove()
339 sf->hdr.count--; in xfs_attr_shortform_remove()
400 for (i = 0; i < sf->hdr.count; in xfs_attr_shortform_lookup()
427 for (i = 0; i < sf->hdr.count; in xfs_attr_shortform_getvalue()
513 for (i = 0; i < sf->hdr.count; i++) { in xfs_attr_shortform_to_leaf()
574 int sbsize, nsbuf, count, i; in xfs_attr_shortform_list() local
583 if (!sf->hdr.count) in xfs_attr_shortform_list()
[all …]
Dxfs_dir2_node.c55 int count);
219 if (be16_to_cpu(leaf->hdr.count) == xfs_dir2_max_leaf_ents(mp)) { in xfs_dir2_leafn_add()
226 ASSERT(index == be16_to_cpu(leaf->hdr.count) || in xfs_dir2_leafn_add()
244 lfloglow = be16_to_cpu(leaf->hdr.count); in xfs_dir2_leafn_add()
252 if (index < be16_to_cpu(leaf->hdr.count)) in xfs_dir2_leafn_add()
254 (be16_to_cpu(leaf->hdr.count) - index) * sizeof(*lep)); in xfs_dir2_leafn_add()
256 lfloghigh = be16_to_cpu(leaf->hdr.count); in xfs_dir2_leafn_add()
257 be16_add_cpu(&leaf->hdr.count, 1); in xfs_dir2_leafn_add()
283 highstale < be16_to_cpu(leaf->hdr.count) && in xfs_dir2_leafn_add()
296 (highstale == be16_to_cpu(leaf->hdr.count) || in xfs_dir2_leafn_add()
[all …]
Dxfs_da_btree.c94 STATIC uint xfs_da_node_lasthash(xfs_dabuf_t *bp, int *count);
128 node->hdr.count = 0; in xfs_da_node_create()
329 size = (int)((char *)&oldroot->btree[be16_to_cpu(oldroot->hdr.count)] - in xfs_da_root_split()
334 size = (int)((char *)&leaf->ents[be16_to_cpu(leaf->hdr.count)] - in xfs_da_root_split()
356 node->hdr.count = cpu_to_be16(2); in xfs_da_root_split()
401 if ((be16_to_cpu(node->hdr.count) + newcount) > state->node_ents) { in xfs_da_node_split()
438 if (oldblk->index <= be16_to_cpu(node->hdr.count)) { in xfs_da_node_split()
473 int count, tmp; in xfs_da_node_rebalance() local
482 if ((be16_to_cpu(node1->hdr.count) > 0) && (be16_to_cpu(node2->hdr.count) > 0) && in xfs_da_node_rebalance()
484 (be32_to_cpu(node2->btree[be16_to_cpu(node2->hdr.count)-1].hashval) < in xfs_da_node_rebalance()
[all …]
Dxfs_iomap.c58 ssize_t count) in xfs_iomap_enter_trace() argument
70 (void *)((unsigned long)count), in xfs_iomap_enter_trace()
87 ssize_t count, in xfs_iomap_map_trace() argument
102 (void *)((unsigned long)count), in xfs_iomap_map_trace()
114 #define xfs_iomap_enter_trace(tag, io, offset, count) argument
115 #define xfs_iomap_map_trace(tag, io, offset, count, iomapp, imapp, flags) argument
172 ssize_t count, in xfs_iomap() argument
193 xfs_iomap_enter_trace(XFS_IOMAP_READ_ENTER, ip, offset, count); in xfs_iomap()
198 xfs_iomap_enter_trace(XFS_IOMAP_WRITE_ENTER, ip, offset, count); in xfs_iomap()
205 xfs_iomap_enter_trace(XFS_IOMAP_ALLOC_ENTER, ip, offset, count); in xfs_iomap()
[all …]
/fs/hfs/
Dextent.c77 u16 count; in hfs_ext_find_block() local
80 count = be16_to_cpu(ext->count); in hfs_ext_find_block()
81 if (off < count) in hfs_ext_find_block()
83 off -= count; in hfs_ext_find_block()
92 u16 count = 0; in hfs_ext_block_count() local
95 count += be16_to_cpu(ext->count); in hfs_ext_block_count()
96 return count; in hfs_ext_block_count()
105 if (ext->count) in hfs_ext_lastblock()
107 return be16_to_cpu(ext->block) + be16_to_cpu(ext->count); in hfs_ext_lastblock()
201 be16_to_cpu(extent[i].count)); in hfs_dump_extent()
[all …]
Dbitmap.c193 int hfs_clear_vbm_bits(struct super_block *sb, u16 start, u16 count) in hfs_clear_vbm_bits() argument
200 if (!count) in hfs_clear_vbm_bits()
203 dprint(DBG_BITMAP, "clear_bits: %u,%u\n", start, count); in hfs_clear_vbm_bits()
205 if ((start + count) > HFS_SB(sb)->fs_ablocks) in hfs_clear_vbm_bits()
211 len = count; in hfs_clear_vbm_bits()
218 if (j > count) { in hfs_clear_vbm_bits()
219 mask |= 0xffffffffU >> (i + count); in hfs_clear_vbm_bits()
224 count -= j; in hfs_clear_vbm_bits()
228 while (count >= 32) { in hfs_clear_vbm_bits()
230 count -= 32; in hfs_clear_vbm_bits()
[all …]
/fs/9p/
Dvfs_file.c133 v9fs_file_readn(struct file *filp, char *data, char __user *udata, u32 count, in v9fs_file_readn() argument
140 (long long unsigned) offset, count); in v9fs_file_readn()
145 n = p9_client_read(fid, data, udata, offset, count); in v9fs_file_readn()
155 count -= n; in v9fs_file_readn()
157 } while (count > 0 && n == (fid->clnt->msize - P9_IOHDRSZ)); in v9fs_file_readn()
175 v9fs_file_read(struct file *filp, char __user *udata, size_t count, in v9fs_file_read() argument
181 P9_DPRINTK(P9_DEBUG_VFS, "count %zu offset %lld\n", count, *offset); in v9fs_file_read()
184 if (count > (fid->clnt->msize - P9_IOHDRSZ)) in v9fs_file_read()
185 ret = v9fs_file_readn(filp, NULL, udata, count, *offset); in v9fs_file_read()
187 ret = p9_client_read(fid, NULL, udata, *offset, count); in v9fs_file_read()
[all …]
/fs/nfs/
Dread.c87 unsigned int remainder = data->args.count - data->res.count; in nfs_readpage_truncate_uninitialised_page()
88 unsigned int base = data->args.pgbase + data->res.count; in nfs_readpage_truncate_uninitialised_page()
158 unsigned int count, unsigned int offset) in nfs_read_rpcsetup() argument
186 data->args.count = count; in nfs_read_rpcsetup()
190 data->res.count = count; in nfs_read_rpcsetup()
201 count, in nfs_read_rpcsetup()
237 …in_multi(struct inode *inode, struct list_head *head, unsigned int npages, size_t count, int flags) in nfs_pagein_multi() argument
250 nbytes = count; in nfs_pagein_multi()
265 nbytes = count; in nfs_pagein_multi()
297 …gein_one(struct inode *inode, struct list_head *head, unsigned int npages, size_t count, int flags) in nfs_pagein_one() argument
[all …]
Ddirect.c77 ssize_t count, /* bytes actually processed */ member
125 static void nfs_direct_dirty_pages(struct page **pages, unsigned int pgbase, size_t count) in nfs_direct_dirty_pages() argument
130 if (count == 0) in nfs_direct_dirty_pages()
133 npages = (count + (pgbase & ~PAGE_MASK) + PAGE_SIZE - 1) >> PAGE_SHIFT; in nfs_direct_dirty_pages()
164 dreq->count = 0; in nfs_direct_req_alloc()
201 result = dreq->count; in nfs_direct_wait()
216 res = (long) dreq->count; in nfs_direct_complete()
248 dreq->count += data->res.count; in nfs_direct_read_release()
252 data->res.count); in nfs_direct_read_release()
280 size_t count = iov->iov_len; in nfs_direct_read_schedule_segment() local
[all …]
/fs/ncpfs/
Dfile.c103 ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) in ncp_file_read() argument
122 if ((ssize_t) count < 0) { in ncp_file_read()
125 if (!count) 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()
148 while (already_read < count) { in ncp_file_read()
152 count - already_read); in ncp_file_read()
184 ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) in ncp_file_write() argument
198 if ((ssize_t) count < 0) in ncp_file_write()
205 if (pos + count > MAX_NON_LFS && !(file->f_flags&O_LARGEFILE)) { in ncp_file_write()
[all …]
/fs/proc/
Dpage.c20 size_t count, loff_t *ppos) in kpagecount_read() argument
30 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); in kpagecount_read()
31 if (src & KPMMASK || count & KPMMASK) in kpagecount_read()
34 while (count > 0) { in kpagecount_read()
49 count -= KPMSIZE; in kpagecount_read()
86 size_t count, loff_t *ppos) in kpageflags_read() argument
96 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); in kpageflags_read()
97 if (src & KPMMASK || count & KPMMASK) in kpageflags_read()
100 while (count > 0) { in kpageflags_read()
127 count -= KPMSIZE; in kpageflags_read()
/fs/ext2/
Dballoc.c161 static void release_blocks(struct super_block *sb, int count) in release_blocks() argument
163 if (count) { in release_blocks()
166 percpu_counter_add(&sbi->s_freeblocks_counter, count); in release_blocks()
172 struct ext2_group_desc *desc, struct buffer_head *bh, int count) in group_adjust_blocks() argument
174 if (count) { in group_adjust_blocks()
180 desc->bg_free_blocks_count = cpu_to_le16(free_blocks + count); in group_adjust_blocks()
487 unsigned long count) in ext2_free_blocks() argument
502 block + count < block || in ext2_free_blocks()
503 block + count > le32_to_cpu(es->s_blocks_count)) { in ext2_free_blocks()
506 "block = %lu, count = %lu", block, count); in ext2_free_blocks()
[all …]
/fs/ntfs/
Dbitmap.h33 const s64 count, const u8 value, const bool is_rollback);
48 const s64 start_bit, const s64 count, const u8 value) in ntfs_bitmap_set_bits_in_run() argument
50 return __ntfs_bitmap_set_bits_in_run(vi, start_bit, count, value, in ntfs_bitmap_set_bits_in_run()
66 const s64 count) in ntfs_bitmap_set_run() argument
68 return ntfs_bitmap_set_bits_in_run(vi, start_bit, count, 1); in ntfs_bitmap_set_run()
83 const s64 count) in ntfs_bitmap_clear_run() argument
85 return ntfs_bitmap_set_bits_in_run(vi, start_bit, count, 0); in ntfs_bitmap_clear_run()
/fs/smbfs/
Dfile.c61 int count = PAGE_SIZE; in smb_readpage_sync() local
65 DENTRY_PATH(dentry), count, offset, rsize); in smb_readpage_sync()
72 if (count < rsize) in smb_readpage_sync()
73 rsize = count; in smb_readpage_sync()
79 count -= result; in smb_readpage_sync()
86 } while (count); in smb_readpage_sync()
88 memset(buffer, 0, count); in smb_readpage_sync()
120 unsigned long pageoffset, unsigned int count) in smb_writepage_sync() argument
130 inode->i_ino, SMB_I(inode)->fileid, count, offset, wsize); in smb_writepage_sync()
135 if (count < wsize) in smb_writepage_sync()
[all …]

12345678910>>...12