Home
last modified time | relevance | path

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

12345678910>>...17

/fs/sysv/
Dballoc.c48 unsigned count; in sysv_free_block() local
65 count = fs16_to_cpu(sbi, *sbi->s_bcache_count); in sysv_free_block()
67 if (count > sbi->s_flc_size) { in sysv_free_block()
76 if (count == sbi->s_flc_size || count == 0) { in sysv_free_block()
85 *(__fs16*)bh->b_data = cpu_to_fs16(sbi, count); in sysv_free_block()
86 memcpy(get_chunk(sb,bh), blocks, count * sizeof(sysv_zone_t)); in sysv_free_block()
90 count = 0; in sysv_free_block()
92 sbi->s_bcache[count++] = nr; in sysv_free_block()
94 *sbi->s_bcache_count = cpu_to_fs16(sbi, count); in sysv_free_block()
106 unsigned count; in sysv_new_block() local
[all …]
Dialloc.c108 unsigned count; in sysv_free_inode() local
123 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_free_inode()
124 if (count < sbi->s_fic_size) { in sysv_free_inode()
125 *sv_sb_fic_inode(sb,count++) = cpu_to_fs16(sbi, ino); in sysv_free_inode()
126 *sbi->s_sb_fic_count = cpu_to_fs16(sbi, count); in sysv_free_inode()
142 unsigned count; in sysv_new_inode() local
152 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_new_inode()
153 if (count == 0 || (*sv_sb_fic_inode(sb,count-1) == 0)) { in sysv_new_inode()
154 count = refill_free_cache(sb); in sysv_new_inode()
155 if (count == 0) { in sysv_new_inode()
[all …]
/fs/
Dseq_file.c30 m->count = m->size; in seq_set_overflow()
97 m->count = m->from = 0; in traverse()
116 m->count = 0; in traverse()
121 if (pos + m->count > offset) { in traverse()
123 m->count -= m->from; in traverse()
126 pos += m->count; in traverse()
127 m->count = 0; in traverse()
137 m->count = 0; in traverse()
190 m->count = 0; in seq_read_iter()
201 m->count = 0; in seq_read_iter()
[all …]
Deventfd.c43 __u64 count; member
65 if (ULLONG_MAX - ctx->count < n) in eventfd_signal_mask()
66 n = ULLONG_MAX - ctx->count; in eventfd_signal_mask()
67 ctx->count += n; in eventfd_signal_mask()
136 u64 count; in eventfd_poll() local
178 count = READ_ONCE(ctx->count); in eventfd_poll()
180 if (count > 0) in eventfd_poll()
182 if (count == ULLONG_MAX) in eventfd_poll()
184 if (ULLONG_MAX - 1 > count) in eventfd_poll()
194 *cnt = ((ctx->flags & EFD_SEMAPHORE) && ctx->count) ? 1 : ctx->count; in eventfd_ctx_do_read()
[all …]
Dread_write.c366 int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t count) in rw_verify_area() argument
372 if (unlikely((ssize_t) count < 0)) in rw_verify_area()
385 if (count >= -pos) /* both values are in 0..LLONG_MAX */ in rw_verify_area()
387 } else if (unlikely((loff_t) (pos + count) < 0)) { in rw_verify_area()
393 retval = locks_mandatory_area(inode, file, pos, pos + count - 1, in rw_verify_area()
430 ssize_t __kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in __kernel_read() argument
434 .iov_len = min_t(size_t, count, MAX_RW_COUNT), in __kernel_read()
465 ssize_t kernel_read(struct file *file, void *buf, size_t count, loff_t *pos) in kernel_read() argument
469 ret = rw_verify_area(READ, file, pos, count); in kernel_read()
472 return __kernel_read(file, buf, count, pos); in kernel_read()
[all …]
Dreaddir.c181 struct old_linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument
218 int count; member
237 if (reclen > buf->count) in filldir()
262 buf->count -= reclen; in filldir()
272 struct linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument
277 .count = count, in SYSCALL_DEFINE3()
296 error = count - buf.count; in SYSCALL_DEFINE3()
306 int count; member
324 if (reclen > buf->count) in filldir64()
344 buf->count -= reclen; in filldir64()
[all …]
Dbinfmt_misc.c272 static Node *create_entry(const char __user *buffer, size_t count) in create_entry() argument
279 pr_debug("register: received %zu bytes\n", count); in create_entry()
283 if ((count < 11) || (count > MAX_REGISTER_LENGTH)) in create_entry()
287 memsize = sizeof(Node) + count + 8; in create_entry()
295 if (copy_from_user(buf, buffer, count)) in create_entry()
303 memset(buf + count, del, 8); in create_entry()
457 if (p != buf + count) in create_entry()
477 static int parse_command(const char __user *buffer, size_t count) in parse_command() argument
481 if (count > 3) in parse_command()
483 if (copy_from_user(s, buffer, count)) in parse_command()
[all …]
/fs/ufs/
Dutil.c24 u64 count = 0; in _ubh_bread_() local
27 count = size >> uspi->s_fshift; in _ubh_bread_()
28 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.c39 void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) in ufs_free_fragments() argument
52 (unsigned long long)fragment, count); in ufs_free_fragments()
54 if (ufs_fragnum(fragment) + count > uspi->s_fpg) in ufs_free_fragments()
75 end_bit = bit + count; in ufs_free_fragments()
87 inode_sub_bytes(inode, count << uspi->s_fshift); in ufs_free_fragments()
88 fs32_add(sb, &ucg->cg_cs.cs_nffree, count); in ufs_free_fragments()
89 uspi->cs_total.cs_nffree += count; in ufs_free_fragments()
90 fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_free_fragments()
135 void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count) in ufs_free_blocks() argument
148 (unsigned long long)fragment, count); in ufs_free_blocks()
[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()
216 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 hfs_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/configfs/
Dfile.c32 size_t count; member
61 ssize_t count = -ENOENT; in fill_read_buffer() local
70 count = buffer->attr->show(buffer->item, buffer->page); in fill_read_buffer()
73 if (count < 0) in fill_read_buffer()
74 return count; in fill_read_buffer()
75 if (WARN_ON_ONCE(count > (ssize_t)SIMPLE_ATTR_SIZE)) in fill_read_buffer()
78 buffer->count = count; in fill_read_buffer()
102 configfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) in configfs_read_file() argument
114 __func__, count, *ppos, buffer->page); in configfs_read_file()
115 retval = simple_read_from_buffer(buf, count, ppos, buffer->page, in configfs_read_file()
[all …]
/fs/xfs/libxfs/
Dxfs_attr_leaf.c112 ASSERT(!to->count && !to->usedbytes); in xfs_attr3_leaf_firstused_from_disk()
166 to->count = be16_to_cpu(hdr3->count); in xfs_attr3_leaf_hdr_from_disk()
180 to->count = be16_to_cpu(from->hdr.count); in xfs_attr3_leaf_hdr_from_disk()
208 hdr3->count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
223 to->hdr.count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
322 if ((char *)&entries[ichdr.count] > in xfs_attr3_leaf_verify()
334 for (i = 0, ent = entries; i < ichdr.count; ent++, i++) { in xfs_attr3_leaf_verify()
692 end = sf->hdr.count; in xfs_attr_sf_findname()
752 sf->hdr.count++; in xfs_attr_shortform_add()
810 sf->hdr.count--; in xfs_attr_shortform_remove()
[all …]
Dxfs_da_btree.c138 to->count = be16_to_cpu(from3->hdr.__count); in xfs_da3_node_hdr_from_disk()
146 to->count = be16_to_cpu(from->hdr.__count); in xfs_da3_node_hdr_from_disk()
166 to3->hdr.__count = cpu_to_be16(from->count); in xfs_da3_node_hdr_to_disk()
173 to->hdr.__count = cpu_to_be16(from->count); in xfs_da3_node_hdr_to_disk()
225 if (ichdr.count == 0) in xfs_da3_node_verify()
232 if (ichdr.count > mp->m_dir_geo->node_ents && in xfs_da3_node_verify()
233 ichdr.count > mp->m_attr_geo->node_ents) in xfs_da3_node_verify()
676 size = (int)((char *)&btree[icnodehdr.count] - (char *)oldroot); in xfs_da3_root_split()
692 size = (int)((char *)&leafhdr.ents[leafhdr.count] - in xfs_da3_root_split()
739 nodehdr.count = 2; in xfs_da3_root_split()
[all …]
Dxfs_dir2_node.c530 if (leafhdr.count == args->geo->leaf_max_ents) { in xfs_dir2_leafn_add()
537 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
554 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
602 int *count) /* count of entries in leaf */ in xfs_dir2_leaf_lasthash() argument
613 if (count) in xfs_dir2_leaf_lasthash()
614 *count = leafhdr.count; in xfs_dir2_leaf_lasthash()
615 if (!leafhdr.count) in xfs_dir2_leaf_lasthash()
617 return be32_to_cpu(leafhdr.ents[leafhdr.count - 1].hashval); in xfs_dir2_leaf_lasthash()
655 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
677 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
[all …]
/fs/afs/
Dvlclient.c185 u32 uniquifier, nentries, count; in afs_deliver_vl_get_addrs_u() local
189 call->unmarshall, iov_iter_count(call->iter), call->count); in afs_deliver_vl_get_addrs_u()
208 count = ntohl(*bp); in afs_deliver_vl_get_addrs_u()
210 nentries = min(nentries, count); in afs_deliver_vl_get_addrs_u()
216 call->count = count; in afs_deliver_vl_get_addrs_u()
221 count = min(call->count, 4U); in afs_deliver_vl_get_addrs_u()
222 afs_extract_to_buf(call, count * sizeof(__be32)); in afs_deliver_vl_get_addrs_u()
226 ret = afs_extract_data(call, call->count > 4); in afs_deliver_vl_get_addrs_u()
232 count = min(call->count, 4U); in afs_deliver_vl_get_addrs_u()
233 for (i = 0; i < count; i++) in afs_deliver_vl_get_addrs_u()
[all …]
/fs/udf/
Dballoc.c40 int max_bits, off, count; in read_block_bitmap() local
55 count = min(max_bits - off, bitmap->s_nr_groups); in read_block_bitmap()
65 count = bitmap->s_nr_groups - bitmap_nr * max_bits + in read_block_bitmap()
67 count = min(count, max_bits); in read_block_bitmap()
70 for (i = 0; i < count; i++) in read_block_bitmap()
132 uint32_t count) in udf_bitmap_free_blocks() argument
146 if (bloc->logicalBlockNum + count < count || in udf_bitmap_free_blocks()
147 (bloc->logicalBlockNum + count) > partmap->s_partition_len) { in udf_bitmap_free_blocks()
150 bloc->logicalBlockNum, count, in udf_bitmap_free_blocks()
166 if (bit + count > (sb->s_blocksize << 3)) { in udf_bitmap_free_blocks()
[all …]
/fs/proc/
Dpage.c45 size_t count, loff_t *ppos) in kpagecount_read() argument
56 if (src & KPMMASK || count & KPMMASK) in kpagecount_read()
60 count = min_t(unsigned long, count, (max_dump_pfn * KPMSIZE) - src); in kpagecount_read()
62 while (count > 0) { in kpagecount_read()
81 count -= KPMSIZE; in kpagecount_read()
228 size_t count, loff_t *ppos) in kpageflags_read() argument
238 if (src & KPMMASK || count & KPMMASK) in kpageflags_read()
242 count = min_t(unsigned long, count, (max_dump_pfn * KPMSIZE) - src); in kpageflags_read()
244 while (count > 0) { in kpageflags_read()
258 count -= KPMSIZE; in kpageflags_read()
[all …]
/fs/ext2/
Dballoc.c163 struct ext2_group_desc *desc, struct buffer_head *bh, int count) in group_adjust_blocks() argument
165 if (count) { in group_adjust_blocks()
171 desc->bg_free_blocks_count = cpu_to_le16(free_blocks + count); in group_adjust_blocks()
477 unsigned long count) in ext2_free_blocks() argument
491 if (!ext2_data_block_valid(sbi, block, count)) { in ext2_free_blocks()
494 "block = %lu, count = %lu", block, count); in ext2_free_blocks()
498 ext2_debug ("freeing block(s) %lu-%lu\n", block, block + count - 1); in ext2_free_blocks()
510 if (bit + count > EXT2_BLOCKS_PER_GROUP(sb)) { in ext2_free_blocks()
511 overflow = bit + count - EXT2_BLOCKS_PER_GROUP(sb); in ext2_free_blocks()
512 count -= overflow; in ext2_free_blocks()
[all …]
/fs/ext4/
Dblock_validity.c26 unsigned int count; member
49 if ((entry1->start_blk + entry1->count) == entry2->start_blk && in can_merge()
71 unsigned int count, u32 ino) in add_system_zone() argument
82 else if (start_blk >= (entry->start_blk + entry->count)) in add_system_zone()
93 new_entry->count = count; in add_system_zone()
106 new_entry->count += entry->count; in add_system_zone()
117 new_entry->count += entry->count; in add_system_zone()
139 entry->start_blk, entry->start_blk + entry->count - 1); in debug_print_tree()
298 ext4_fsblk_t start_blk, unsigned int count) in ext4_sb_block_valid() argument
307 (start_blk + count < start_blk) || in ext4_sb_block_valid()
[all …]
Dindirect.c280 unsigned int count = 0; in ext4_blks_to_allocate() local
289 count += blks; in ext4_blks_to_allocate()
291 count += blocks_to_boundary + 1; in ext4_blks_to_allocate()
292 return count; in ext4_blks_to_allocate()
295 count++; in ext4_blks_to_allocate()
296 while (count < blks && count <= blocks_to_boundary && in ext4_blks_to_allocate()
297 le32_to_cpu(*(branch[0].p + count)) == 0) { in ext4_blks_to_allocate()
298 count++; in ext4_blks_to_allocate()
300 return count; in ext4_blks_to_allocate()
540 int count = 0; in ext4_ind_map_blocks() local
[all …]
/fs/hfsplus/
Dextents.c54 u32 count; in hfsplus_ext_find_block() local
57 count = be32_to_cpu(ext->block_count); in hfsplus_ext_find_block()
58 if (off < count) in hfsplus_ext_find_block()
60 off -= count; in hfsplus_ext_find_block()
69 u32 count = 0; in hfsplus_ext_block_count() local
72 count += be32_to_cpu(ext->block_count); in hfsplus_ext_block_count()
73 return count; in hfsplus_ext_block_count()
312 u32 count, start; in hfsplus_add_extent() local
317 count = be32_to_cpu(extent->block_count); in hfsplus_add_extent()
318 if (offset == count) { in hfsplus_add_extent()
[all …]
Dbitmap.c164 int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count) in hfsplus_block_free() argument
174 if (!count) in hfsplus_block_free()
177 hfs_dbg(BITMAP, "block_free: %u,%u\n", offset, count); in hfsplus_block_free()
179 if ((offset + count) > sbi->total_blocks) in hfsplus_block_free()
191 len = count; in hfsplus_block_free()
198 if (j > count) { in hfsplus_block_free()
199 mask |= 0xffffffffU >> (i + count); in hfsplus_block_free()
204 count -= j; in hfsplus_block_free()
210 if (count < 32) in hfsplus_block_free()
213 count -= 32; in hfsplus_block_free()
[all …]
/fs/sysfs/
Dfile.c45 ssize_t count; in sysfs_kf_seq_show() local
49 count = seq_get_buf(sf, &buf); in sysfs_kf_seq_show()
50 if (count < PAGE_SIZE) { in sysfs_kf_seq_show()
61 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
62 if (count < 0) in sysfs_kf_seq_show()
63 return count; in sysfs_kf_seq_show()
70 if (count >= (ssize_t)PAGE_SIZE) { in sysfs_kf_seq_show()
74 count = PAGE_SIZE - 1; in sysfs_kf_seq_show()
76 seq_commit(sf, count); in sysfs_kf_seq_show()
81 size_t count, loff_t pos) in sysfs_kf_bin_read() argument
[all …]
/fs/ocfs2/
Dfilecheck.c80 const char *buf, size_t count);
124 const char *buf, size_t count) in ocfs2_filecheck_store() argument
132 ret = kattr->store(kobj, kattr, buf, count); in ocfs2_filecheck_store()
210 unsigned int count);
242 ocfs2_filecheck_args_get_long(const char *buf, size_t count, in ocfs2_filecheck_args_get_long() argument
247 memcpy(buffer, buf, count); in ocfs2_filecheck_args_get_long()
248 buffer[count] = '\0'; in ocfs2_filecheck_args_get_long()
272 ocfs2_filecheck_args_parse(const char *name, const char *buf, size_t count, in ocfs2_filecheck_args_parse() argument
279 if ((count < 1) || (count >= OCFS2_FILECHECK_ARGS_LEN)) in ocfs2_filecheck_args_parse()
284 if (ocfs2_filecheck_args_get_long(buf, count, &val)) in ocfs2_filecheck_args_parse()
[all …]

12345678910>>...17