Home
last modified time | relevance | path

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

12345678910>>...15

/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.c107 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
151 count = fs16_to_cpu(sbi, *sbi->s_sb_fic_count); in sysv_new_inode()
152 if (count == 0 || (*sv_sb_fic_inode(sb,count-1) == 0)) { in sysv_new_inode()
153 count = refill_free_cache(sb); in sysv_new_inode()
154 if (count == 0) { in sysv_new_inode()
[all …]
/fs/
Deventfd.c36 __u64 count; member
59 if (ULLONG_MAX - ctx->count < n) in eventfd_signal()
60 n = ULLONG_MAX - ctx->count; in eventfd_signal()
61 ctx->count += n; in eventfd_signal()
121 u64 count; in eventfd_poll() local
125 count = ctx->count; in eventfd_poll()
127 if (count > 0) in eventfd_poll()
129 if (count == ULLONG_MAX) in eventfd_poll()
131 if (ULLONG_MAX - 1 > count) in eventfd_poll()
139 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read()
[all …]
Dseq_file.c24 m->count = m->size; in seq_set_overflow()
113 m->count = m->from = 0; in traverse()
133 m->count = 0; in traverse()
137 if (pos + m->count > offset) { in traverse()
139 m->count -= m->from; in traverse()
143 pos += m->count; in traverse()
144 m->count = 0; in traverse()
159 m->count = 0; in traverse()
206 m->count = 0; in seq_read()
220 if (m->count) { in seq_read()
[all …]
Dread_write.c379 int rw_verify_area(int read_write, struct file *file, const loff_t *ppos, size_t count) in rw_verify_area() argument
386 if (unlikely((ssize_t) count < 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()
410 return count > MAX_RW_COUNT ? MAX_RW_COUNT : count; in rw_verify_area()
430 ssize_t __vfs_read(struct file *file, char __user *buf, size_t count, 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 …]
Dreaddir.c145 struct old_linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument
182 int count; member
200 if (reclen > buf->count) in filldir()
226 buf->count -= reclen; in filldir()
234 struct linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument
240 .count = count, in SYSCALL_DEFINE3()
245 if (!access_ok(VERIFY_WRITE, dirent, count)) in SYSCALL_DEFINE3()
260 error = count - buf.count; in SYSCALL_DEFINE3()
270 int count; member
287 if (reclen > buf->count) in filldir64()
[all …]
Dbinfmt_misc.c301 static Node *create_entry(const char __user *buffer, size_t count) in create_entry() argument
308 pr_debug("register: received %zu bytes\n", count); in create_entry()
312 if ((count < 11) || (count > MAX_REGISTER_LENGTH)) in create_entry()
316 memsize = sizeof(Node) + count + 8; in create_entry()
324 if (copy_from_user(buf, buffer, count)) in create_entry()
332 memset(buf + count, del, 8); in create_entry()
486 if (p != buf + count) in create_entry()
506 static int parse_command(const char __user *buffer, size_t count) in parse_command() argument
510 if (count > 3) in parse_command()
512 if (copy_from_user(s, buffer, count)) in parse_command()
[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_()
33 ubh->count = count; in _ubh_bread_()
34 for (i = 0; i < count; i++) in _ubh_bread_()
51 u64 count = 0; in ubh_bread_uspi() local
54 count = size >> uspi->s_fshift; in ubh_bread_uspi()
55 if (count <= 0 || count > UFS_MAXFRAG) in ubh_bread_uspi()
58 USPI_UBH(uspi)->count = count; in ubh_bread_uspi()
59 for (i = 0; i < count; i++) in ubh_bread_uspi()
[all …]
Dballoc.c37 void ufs_free_fragments(struct inode *inode, u64 fragment, unsigned count) in ufs_free_fragments() argument
50 (unsigned long long)fragment, count); in ufs_free_fragments()
52 if (ufs_fragnum(fragment) + count > uspi->s_fpg) in ufs_free_fragments()
73 end_bit = bit + count; in ufs_free_fragments()
85 inode_sub_bytes(inode, count << uspi->s_fshift); in ufs_free_fragments()
86 fs32_add(sb, &ucg->cg_cs.cs_nffree, count); in ufs_free_fragments()
87 uspi->cs_total.cs_nffree += count; in ufs_free_fragments()
88 fs32_add(sb, &UFS_SB(sb)->fs_cs(cgno).cs_nffree, count); in ufs_free_fragments()
133 void ufs_free_blocks(struct inode *inode, u64 fragment, unsigned count) in ufs_free_blocks() argument
146 (unsigned long long)fragment, count); in ufs_free_blocks()
[all …]
/fs/configfs/
Dfile.c45 size_t count; member
69 ssize_t count; in fill_read_buffer() local
76 count = attr->show(item, 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/libxfs/
Dxfs_attr_leaf.c127 ASSERT(!to->count && !to->usedbytes); in xfs_attr3_leaf_firstused_from_disk()
181 to->count = be16_to_cpu(hdr3->count); in xfs_attr3_leaf_hdr_from_disk()
195 to->count = be16_to_cpu(from->hdr.count); in xfs_attr3_leaf_hdr_from_disk()
223 hdr3->count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
238 to->hdr.count = cpu_to_be16(from->count); in xfs_attr3_leaf_hdr_to_disk()
276 if (ichdr.count == 0) in xfs_attr3_leaf_verify()
547 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add()
570 sf->hdr.count++; in xfs_attr_shortform_add()
615 end = sf->hdr.count; in xfs_attr_shortform_remove()
637 sf->hdr.count--; in xfs_attr_shortform_remove()
[all …]
Dxfs_da_btree.c164 if (ichdr.count == 0) in xfs_da3_node_verify()
171 if (ichdr.count > mp->m_dir_geo->node_ents && in xfs_da3_node_verify()
172 ichdr.count > mp->m_attr_geo->node_ents) in xfs_da3_node_verify()
551 size = (int)((char *)&btree[icnodehdr.count] - (char *)oldroot); in xfs_da3_root_split()
569 size = (int)((char *)&ents[leafhdr.count] - (char *)leaf); in xfs_da3_root_split()
615 nodehdr.count = 2; in xfs_da3_root_split()
668 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split()
706 if (oldblk->index <= nodehdr.count) { in xfs_da3_node_split()
751 int count; in xfs_da3_node_rebalance() local
769 if (nodehdr1.count > 0 && nodehdr2.count > 0 && in xfs_da3_node_rebalance()
[all …]
Dxfs_dir2_node.c414 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add()
421 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add()
438 lfloglow = leafhdr.count; in xfs_dir2_leafn_add()
487 int *count) /* count of entries in leaf */ in xfs_dir2_leafn_lasthash() argument
498 if (count) in xfs_dir2_leafn_lasthash()
499 *count = leafhdr.count; in xfs_dir2_leafn_lasthash()
500 if (!leafhdr.count) in xfs_dir2_leafn_lasthash()
504 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leafn_lasthash()
544 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname()
566 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname()
[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/proc/
Dpage.c29 size_t count, loff_t *ppos) in kpagecount_read() argument
39 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); in kpagecount_read()
40 if (src & KPMMASK || count & KPMMASK) in kpagecount_read()
43 while (count > 0) { in kpagecount_read()
60 count -= KPMSIZE; in kpagecount_read()
197 size_t count, loff_t *ppos) in kpageflags_read() argument
206 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); in kpageflags_read()
207 if (src & KPMMASK || count & KPMMASK) in kpageflags_read()
210 while (count > 0) { in kpageflags_read()
223 count -= KPMSIZE; in kpageflags_read()
[all …]
/fs/f2fs/
Dshrinker.c24 long count = NM_I(sbi)->nat_cnt - NM_I(sbi)->dirty_nat_cnt; in __count_nat_entries() local
26 return count > 0 ? count : 0; in __count_nat_entries()
31 long count = NM_I(sbi)->nid_cnt[FREE_NID] - MAX_FREE_NIDS; in __count_free_nids() local
33 return count > 0 ? count : 0; in __count_free_nids()
47 unsigned long count = 0; in f2fs_shrink_count() local
62 count += __count_extent_cache(sbi); in f2fs_shrink_count()
65 count += __count_nat_entries(sbi); in f2fs_shrink_count()
68 count += __count_free_nids(sbi); in f2fs_shrink_count()
75 return count; in f2fs_shrink_count()
/fs/udf/
Dballoc.c109 uint32_t count) in udf_bitmap_free_blocks() argument
123 if (bloc->logicalBlockNum + count < count || in udf_bitmap_free_blocks()
124 (bloc->logicalBlockNum + count) > partmap->s_partition_len) { in udf_bitmap_free_blocks()
127 bloc->logicalBlockNum, count, in udf_bitmap_free_blocks()
143 if (bit + count > (sb->s_blocksize << 3)) { in udf_bitmap_free_blocks()
144 overflow = bit + count - (sb->s_blocksize << 3); in udf_bitmap_free_blocks()
145 count -= overflow; in udf_bitmap_free_blocks()
152 for (i = 0; i < count; i++) { in udf_bitmap_free_blocks()
159 udf_add_free_space(sb, sbi->s_partition, count); in udf_bitmap_free_blocks()
162 block += count; in udf_bitmap_free_blocks()
[all …]
/fs/sysfs/
Dfile.c48 ssize_t count; in sysfs_kf_seq_show() local
52 count = seq_get_buf(sf, &buf); in sysfs_kf_seq_show()
53 if (count < PAGE_SIZE) { in sysfs_kf_seq_show()
64 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show()
65 if (count < 0) in sysfs_kf_seq_show()
66 return count; in sysfs_kf_seq_show()
73 if (count >= (ssize_t)PAGE_SIZE) { in sysfs_kf_seq_show()
77 count = PAGE_SIZE - 1; in sysfs_kf_seq_show()
79 seq_commit(sf, count); in sysfs_kf_seq_show()
84 size_t count, loff_t pos) in sysfs_kf_bin_read() argument
[all …]
/fs/hfsplus/
Dextents.c53 u32 count; in hfsplus_ext_find_block() local
56 count = be32_to_cpu(ext->block_count); in hfsplus_ext_find_block()
57 if (off < count) in hfsplus_ext_find_block()
59 off -= count; in hfsplus_ext_find_block()
68 u32 count = 0; in hfsplus_ext_block_count() local
71 count += be32_to_cpu(ext->block_count); in hfsplus_ext_block_count()
72 return count; in hfsplus_ext_block_count()
311 u32 count, start; in hfsplus_add_extent() local
316 count = be32_to_cpu(extent->block_count); in hfsplus_add_extent()
317 if (offset == count) { in hfsplus_add_extent()
[all …]
Dbitmap.c163 int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count) in hfsplus_block_free() argument
173 if (!count) in hfsplus_block_free()
176 hfs_dbg(BITMAP, "block_free: %u,%u\n", offset, count); in hfsplus_block_free()
178 if ((offset + count) > sbi->total_blocks) in hfsplus_block_free()
190 len = count; in hfsplus_block_free()
197 if (j > count) { in hfsplus_block_free()
198 mask |= 0xffffffffU >> (i + count); in hfsplus_block_free()
203 count -= j; in hfsplus_block_free()
209 if (count < 32) in hfsplus_block_free()
212 count -= 32; in hfsplus_block_free()
[all …]
/fs/ext4/
Dblock_validity.c25 unsigned int count; member
47 if ((entry1->start_blk + entry1->count) == entry2->start_blk && in can_merge()
60 unsigned int count, u32 ino) in add_system_zone() argument
71 else if (start_blk >= (entry->start_blk + entry->count)) in add_system_zone()
82 new_entry->count = count; in add_system_zone()
95 new_entry->count += entry->count; in add_system_zone()
106 new_entry->count += entry->count; in add_system_zone()
125 entry->start_blk, entry->start_blk + entry->count - 1); in debug_print_tree()
240 unsigned int count) in ext4_inode_block_valid() argument
247 (start_blk + count < start_blk) || in ext4_inode_block_valid()
[all …]
/fs/ext2/
Dballoc.c161 struct ext2_group_desc *desc, struct buffer_head *bh, int count) in group_adjust_blocks() argument
163 if (count) { in group_adjust_blocks()
169 desc->bg_free_blocks_count = cpu_to_le16(free_blocks + count); in group_adjust_blocks()
475 unsigned long count) in ext2_free_blocks() argument
490 block + count < block || in ext2_free_blocks()
491 block + count > le32_to_cpu(es->s_blocks_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()
[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/sdcardfs/
Dpackagelist.c505 const char *page, size_t count) in package_details_appid_store() argument
519 return count; in package_details_appid_store()
528 int count = 0; in package_details_excluded_userids_show() local
533 count += scnprintf(page + count, PAGE_SIZE - count, in package_details_excluded_userids_show()
537 if (count) in package_details_excluded_userids_show()
538 count--; in package_details_excluded_userids_show()
539 count += scnprintf(page + count, PAGE_SIZE - count, "\n"); in package_details_excluded_userids_show()
540 return count; in package_details_excluded_userids_show()
544 const char *page, size_t count) in package_details_excluded_userids_store() argument
558 return count; in package_details_excluded_userids_store()
[all …]

12345678910>>...15