/fs/sysv/ |
D | balloc.c | 47 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 …]
|
D | ialloc.c | 107 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/ |
D | eventfd.c | 36 __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 163 count = READ_ONCE(ctx->count); in eventfd_poll() 165 if (count > 0) in eventfd_poll() 167 if (count == ULLONG_MAX) in eventfd_poll() 169 if (ULLONG_MAX - 1 > count) in eventfd_poll() 177 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read() [all …]
|
D | seq_file.c | 23 m->count = m->size; in seq_set_overflow() 109 m->count = m->from = 0; in traverse() 129 m->count = 0; in traverse() 133 if (pos + m->count > offset) { in traverse() 135 m->count -= m->from; in traverse() 139 pos += m->count; in traverse() 140 m->count = 0; in traverse() 155 m->count = 0; in traverse() 202 m->count = 0; in seq_read() 216 if (m->count) { in seq_read() [all …]
|
D | readdir.c | 124 struct old_linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument 161 int count; member 176 if (reclen > buf->count) in filldir() 204 buf->count -= reclen; in filldir() 212 struct linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument 218 .count = count, in SYSCALL_DEFINE3() 223 if (!access_ok(VERIFY_WRITE, dirent, count)) in SYSCALL_DEFINE3() 238 error = count - buf.count; in SYSCALL_DEFINE3() 248 int count; member 262 if (reclen > buf->count) in filldir64() [all …]
|
D | char_dev.c | 178 int register_chrdev_region(dev_t from, unsigned count, const char *name) in register_chrdev_region() argument 181 dev_t to = from + count; in register_chrdev_region() 214 int alloc_chrdev_region(dev_t *dev, unsigned baseminor, unsigned count, in alloc_chrdev_region() argument 218 cd = __register_chrdev_region(0, baseminor, count, name); in alloc_chrdev_region() 247 unsigned int count, const char *name, in __register_chrdev() argument 254 cd = __register_chrdev_region(major, baseminor, count, name); in __register_chrdev() 266 err = cdev_add(cdev, MKDEV(cd->major, baseminor), count); in __register_chrdev() 276 kfree(__unregister_chrdev_region(cd->major, baseminor, count)); in __register_chrdev() 289 void unregister_chrdev_region(dev_t from, unsigned count) in unregister_chrdev_region() argument 291 dev_t to = from + count; in unregister_chrdev_region() [all …]
|
/fs/ufs/ |
D | util.c | 23 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 …]
|
D | balloc.c | 37 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/ |
D | file.c | 46 size_t count; member 74 ssize_t count; in fill_read_buffer() local 81 count = attr->show(item, buffer->page); in fill_read_buffer() 83 BUG_ON(count > (ssize_t)SIMPLE_ATTR_SIZE); in fill_read_buffer() 84 if (count >= 0) { in fill_read_buffer() 86 buffer->count = count; in fill_read_buffer() 88 ret = count; in fill_read_buffer() 112 configfs_read_file(struct file *file, char __user *buf, size_t count, loff_t *ppos) in configfs_read_file() argument 123 __func__, count, *ppos, buffer->page); in configfs_read_file() 124 retval = simple_read_from_buffer(buf, count, ppos, buffer->page, in configfs_read_file() [all …]
|
/fs/xfs/libxfs/ |
D | xfs_attr_leaf.c | 127 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() 282 if (pag && pag->pagf_init && ichdr.count == 0) in xfs_attr3_leaf_verify() 524 hdr->count = 0; in xfs_attr_shortform_create() 553 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add() 576 sf->hdr.count++; in xfs_attr_shortform_add() 621 end = sf->hdr.count; in xfs_attr_shortform_remove() [all …]
|
D | xfs_da_btree.c | 164 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() 550 size = (int)((char *)&btree[icnodehdr.count] - (char *)oldroot); in xfs_da3_root_split() 568 size = (int)((char *)&ents[leafhdr.count] - (char *)leaf); in xfs_da3_root_split() 614 nodehdr.count = 2; in xfs_da3_root_split() 667 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split() 705 if (oldblk->index <= nodehdr.count) { in xfs_da3_node_split() 750 int count; in xfs_da3_node_rebalance() local 768 if (nodehdr1.count > 0 && nodehdr2.count > 0 && in xfs_da3_node_rebalance() [all …]
|
D | xfs_dir2_node.c | 461 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add() 468 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add() 485 lfloglow = leafhdr.count; in xfs_dir2_leafn_add() 534 int *count) /* count of entries in leaf */ in xfs_dir2_leafn_lasthash() argument 545 if (count) in xfs_dir2_leafn_lasthash() 546 *count = leafhdr.count; in xfs_dir2_leafn_lasthash() 547 if (!leafhdr.count) in xfs_dir2_leafn_lasthash() 551 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leafn_lasthash() 591 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname() 613 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname() [all …]
|
/fs/hfs/ |
D | extent.c | 77 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() 212 be16_to_cpu(extent[i].count)); in hfs_dump_extent() [all …]
|
D | bitmap.c | 193 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/ext4/ |
D | block_validity.c | 25 unsigned int count; member 46 if ((entry1->start_blk + entry1->count) == entry2->start_blk) in can_merge() 58 unsigned int count) in add_system_zone() argument 69 else if (start_blk >= (entry->start_blk + entry->count)) in add_system_zone() 72 if (start_blk + count > (entry->start_blk + in add_system_zone() 73 entry->count)) in add_system_zone() 74 entry->count = (start_blk + count - in add_system_zone() 89 new_entry->count = count; in add_system_zone() 102 new_entry->count += entry->count; in add_system_zone() 113 new_entry->count += entry->count; in add_system_zone() [all …]
|
D | indirect.c | 272 unsigned int count = 0; in ext4_blks_to_allocate() local 281 count += blks; in ext4_blks_to_allocate() 283 count += blocks_to_boundary + 1; in ext4_blks_to_allocate() 284 return count; in ext4_blks_to_allocate() 287 count++; in ext4_blks_to_allocate() 288 while (count < blks && count <= blocks_to_boundary && in ext4_blks_to_allocate() 289 le32_to_cpu(*(branch[0].p + count)) == 0) { in ext4_blks_to_allocate() 290 count++; in ext4_blks_to_allocate() 292 return count; in ext4_blks_to_allocate() 526 int count = 0; in ext4_ind_map_blocks() local [all …]
|
/fs/proc/ |
D | page.c | 29 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() 201 size_t count, loff_t *ppos) in kpageflags_read() argument 210 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); in kpageflags_read() 211 if (src & KPMMASK || count & KPMMASK) in kpageflags_read() 214 while (count > 0) { in kpageflags_read() 227 count -= KPMSIZE; in kpageflags_read() [all …]
|
/fs/udf/ |
D | balloc.c | 109 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/ |
D | file.c | 47 ssize_t count; in sysfs_kf_seq_show() local 51 count = seq_get_buf(sf, &buf); in sysfs_kf_seq_show() 52 if (count < PAGE_SIZE) { in sysfs_kf_seq_show() 63 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show() 64 if (count < 0) in sysfs_kf_seq_show() 65 return count; in sysfs_kf_seq_show() 72 if (count >= (ssize_t)PAGE_SIZE) { in sysfs_kf_seq_show() 76 count = PAGE_SIZE - 1; in sysfs_kf_seq_show() 78 seq_commit(sf, count); in sysfs_kf_seq_show() 83 size_t count, loff_t pos) in sysfs_kf_bin_read() argument [all …]
|
/fs/f2fs/ |
D | shrinker.c | 24 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/ext2/ |
D | balloc.c | 163 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 492 block + count < block || in ext2_free_blocks() 493 block + count > le32_to_cpu(es->s_blocks_count)) { in ext2_free_blocks() 496 "block = %lu, count = %lu", block, count); in ext2_free_blocks() 500 ext2_debug ("freeing block(s) %lu-%lu\n", block, block + count - 1); in ext2_free_blocks() 512 if (bit + count > EXT2_BLOCKS_PER_GROUP(sb)) { in ext2_free_blocks() 513 overflow = bit + count - EXT2_BLOCKS_PER_GROUP(sb); in ext2_free_blocks() [all …]
|
/fs/nfs/ |
D | direct.c | 70 ssize_t count; member 90 ssize_t count, /* bytes actually processed */ member 125 ssize_t count; in nfs_direct_good_bytes() local 127 WARN_ON_ONCE(dreq->count >= dreq->max_count); in nfs_direct_good_bytes() 130 dreq->mirrors[hdr->pgio_mirror_idx].count += hdr->good_bytes; in nfs_direct_good_bytes() 131 dreq->count += hdr->good_bytes; in nfs_direct_good_bytes() 134 count = dreq->mirrors[hdr->pgio_mirror_idx].count; in nfs_direct_good_bytes() 135 if (count + dreq->io_start < hdr->io_start + hdr->good_bytes) { in nfs_direct_good_bytes() 136 count = hdr->io_start + hdr->good_bytes - dreq->io_start; in nfs_direct_good_bytes() 137 dreq->mirrors[hdr->pgio_mirror_idx].count = count; in nfs_direct_good_bytes() [all …]
|
/fs/hfsplus/ |
D | extents.c | 53 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() 305 u32 count, start; in hfsplus_add_extent() local 310 count = be32_to_cpu(extent->block_count); in hfsplus_add_extent() 311 if (offset == count) { in hfsplus_add_extent() [all …]
|
D | bitmap.c | 163 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/ntfs/ |
D | bitmap.h | 33 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()
|