/fs/sysv/ |
D | balloc.c | 48 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 …]
|
D | ialloc.c | 108 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/ |
D | eventfd.c | 40 __u64 count; member 64 if (ULLONG_MAX - ctx->count < n) in eventfd_signal() 65 n = ULLONG_MAX - ctx->count; in eventfd_signal() 66 ctx->count += n; in eventfd_signal() 115 u64 count; in eventfd_poll() local 157 count = READ_ONCE(ctx->count); in eventfd_poll() 159 if (count > 0) in eventfd_poll() 161 if (count == ULLONG_MAX) in eventfd_poll() 163 if (ULLONG_MAX - 1 > count) in eventfd_poll() 171 *cnt = (ctx->flags & EFD_SEMAPHORE) ? 1 : ctx->count; in eventfd_ctx_do_read() [all …]
|
D | seq_file.c | 27 m->count = m->size; in seq_set_overflow() 99 m->count = m->from = 0; in traverse() 118 m->count = 0; in traverse() 123 if (pos + m->count > offset) { in traverse() 125 m->count -= m->from; in traverse() 128 pos += m->count; in traverse() 129 m->count = 0; in traverse() 139 m->count = 0; in traverse() 183 m->count = 0; in seq_read() 195 m->count = 0; in seq_read() [all …]
|
D | readdir.c | 177 struct old_linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument 214 int count; member 233 if (reclen > buf->count) in filldir() 258 buf->count -= reclen; in filldir() 268 struct linux_dirent __user *, dirent, unsigned int, count) in SYSCALL_DEFINE3() argument 273 .count = count, in SYSCALL_DEFINE3() 278 if (!access_ok(dirent, count)) in SYSCALL_DEFINE3() 295 error = count - buf.count; in SYSCALL_DEFINE3() 305 int count; member 323 if (reclen > buf->count) in filldir64() [all …]
|
/fs/ufs/ |
D | util.c | 24 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 …]
|
D | balloc.c | 39 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/ |
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() 216 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/configfs/ |
D | file.c | 32 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/ |
D | xfs_attr_leaf.c | 112 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() 258 if (!xfs_log_in_recovery(mp) && ichdr.count == 0) in xfs_attr3_leaf_verify() 272 if ((char *)&entries[ichdr.count] > in xfs_attr3_leaf_verify() 587 hdr->count = 0; in xfs_attr_shortform_create() 616 for (i = 0; i < sf->hdr.count; sfe = XFS_ATTR_SF_NEXTENTRY(sfe), i++) { in xfs_attr_shortform_add() 639 sf->hdr.count++; in xfs_attr_shortform_add() [all …]
|
D | xfs_da_btree.c | 163 if (ichdr.count == 0) in xfs_da3_node_verify() 170 if (ichdr.count > mp->m_dir_geo->node_ents && in xfs_da3_node_verify() 171 ichdr.count > mp->m_attr_geo->node_ents) in xfs_da3_node_verify() 582 size = (int)((char *)&btree[icnodehdr.count] - (char *)oldroot); in xfs_da3_root_split() 600 size = (int)((char *)&ents[leafhdr.count] - (char *)leaf); in xfs_da3_root_split() 646 nodehdr.count = 2; in xfs_da3_root_split() 699 if (nodehdr.count + newcount > state->args->geo->node_ents) { in xfs_da3_node_split() 737 if (oldblk->index <= nodehdr.count) { in xfs_da3_node_split() 782 int count; in xfs_da3_node_rebalance() local 800 if (nodehdr1.count > 0 && nodehdr2.count > 0 && in xfs_da3_node_rebalance() [all …]
|
D | xfs_dir2_node.c | 458 if (leafhdr.count == dp->d_ops->leaf_max_ents(args->geo)) { in xfs_dir2_leafn_add() 465 ASSERT(index == leafhdr.count || in xfs_dir2_leafn_add() 482 lfloglow = leafhdr.count; in xfs_dir2_leafn_add() 531 int *count) /* count of entries in leaf */ in xfs_dir2_leaf_lasthash() argument 544 if (count) in xfs_dir2_leaf_lasthash() 545 *count = leafhdr.count; in xfs_dir2_leaf_lasthash() 546 if (!leafhdr.count) in xfs_dir2_leaf_lasthash() 550 return be32_to_cpu(ents[leafhdr.count - 1].hashval); in xfs_dir2_leaf_lasthash() 590 ASSERT(leafhdr.count > 0); in xfs_dir2_leafn_lookup_for_addname() 612 index < leafhdr.count && be32_to_cpu(lep->hashval) == args->hashval; in xfs_dir2_leafn_lookup_for_addname() [all …]
|
/fs/afs/ |
D | vlclient.c | 184 u32 uniquifier, nentries, count; in afs_deliver_vl_get_addrs_u() local 188 call->unmarshall, iov_iter_count(call->_iter), call->count); in afs_deliver_vl_get_addrs_u() 207 count = ntohl(*bp); in afs_deliver_vl_get_addrs_u() 209 nentries = min(nentries, count); in afs_deliver_vl_get_addrs_u() 215 call->count = count; in afs_deliver_vl_get_addrs_u() 220 count = min(call->count, 4U); in afs_deliver_vl_get_addrs_u() 221 afs_extract_to_buf(call, count * sizeof(__be32)); in afs_deliver_vl_get_addrs_u() 225 ret = afs_extract_data(call, call->count > 4); in afs_deliver_vl_get_addrs_u() 231 count = min(call->count, 4U); in afs_deliver_vl_get_addrs_u() 232 for (i = 0; i < count; i++) in afs_deliver_vl_get_addrs_u() [all …]
|
D | write.c | 237 unsigned count, loop; in afs_kill_pages() local 247 count = last - first + 1; in afs_kill_pages() 248 if (count > PAGEVEC_SIZE) in afs_kill_pages() 249 count = PAGEVEC_SIZE; in afs_kill_pages() 250 pv.nr = find_get_pages_contig(mapping, first, count, pv.pages); in afs_kill_pages() 251 ASSERTCMP(pv.nr, ==, count); in afs_kill_pages() 253 for (loop = 0; loop < count; loop++) { in afs_kill_pages() 280 unsigned count, loop; in afs_redirty_pages() local 290 count = last - first + 1; in afs_redirty_pages() 291 if (count > PAGEVEC_SIZE) in afs_redirty_pages() [all …]
|
/fs/ext4/ |
D | block_validity.c | 26 unsigned int count; member 48 if ((entry1->start_blk + entry1->count) == entry2->start_blk) in can_merge() 69 unsigned int count) in add_system_zone() argument 80 else if (start_blk >= (entry->start_blk + entry->count)) in add_system_zone() 83 if (start_blk + count > (entry->start_blk + in add_system_zone() 84 entry->count)) in add_system_zone() 85 entry->count = (start_blk + count - in add_system_zone() 100 new_entry->count = count; in add_system_zone() 113 new_entry->count += entry->count; in add_system_zone() 124 new_entry->count += entry->count; in add_system_zone() [all …]
|
D | indirect.c | 273 unsigned int count = 0; in ext4_blks_to_allocate() local 282 count += blks; in ext4_blks_to_allocate() 284 count += blocks_to_boundary + 1; in ext4_blks_to_allocate() 285 return count; in ext4_blks_to_allocate() 288 count++; in ext4_blks_to_allocate() 289 while (count < blks && count <= blocks_to_boundary && in ext4_blks_to_allocate() 290 le32_to_cpu(*(branch[0].p + count)) == 0) { in ext4_blks_to_allocate() 291 count++; in ext4_blks_to_allocate() 293 return count; in ext4_blks_to_allocate() 521 int count = 0; in ext4_ind_map_blocks() local [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/proc/ |
D | page.c | 30 size_t count, loff_t *ppos) in kpagecount_read() argument 40 count = min_t(size_t, count, (max_pfn * KPMSIZE) - src); in kpagecount_read() 41 if (src & KPMMASK || count & KPMMASK) in kpagecount_read() 44 while (count > 0) { in kpagecount_read() 63 count -= KPMSIZE; in kpagecount_read() 207 size_t count, loff_t *ppos) in kpageflags_read() argument 216 count = min_t(unsigned long, count, (max_pfn * KPMSIZE) - src); in kpageflags_read() 217 if (src & KPMMASK || count & KPMMASK) in kpageflags_read() 220 while (count > 0) { in kpageflags_read() 234 count -= KPMSIZE; in kpageflags_read() [all …]
|
/fs/sysfs/ |
D | file.c | 44 ssize_t count; in sysfs_kf_seq_show() local 48 count = seq_get_buf(sf, &buf); in sysfs_kf_seq_show() 49 if (count < PAGE_SIZE) { in sysfs_kf_seq_show() 60 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show() 61 if (count < 0) in sysfs_kf_seq_show() 62 return count; in sysfs_kf_seq_show() 69 if (count >= (ssize_t)PAGE_SIZE) { in sysfs_kf_seq_show() 73 count = PAGE_SIZE - 1; in sysfs_kf_seq_show() 75 seq_commit(sf, count); in sysfs_kf_seq_show() 80 size_t count, loff_t pos) in sysfs_kf_bin_read() argument [all …]
|
/fs/f2fs/ |
D | shrinker.c | 21 long count = NM_I(sbi)->nat_cnt - NM_I(sbi)->dirty_nat_cnt; in __count_nat_entries() local 23 return count > 0 ? count : 0; in __count_nat_entries() 28 long count = NM_I(sbi)->nid_cnt[FREE_NID] - MAX_FREE_NIDS; in __count_free_nids() local 30 return count > 0 ? count : 0; in __count_free_nids() 44 unsigned long count = 0; in f2fs_shrink_count() local 59 count += __count_extent_cache(sbi); in f2fs_shrink_count() 62 count += __count_nat_entries(sbi); in f2fs_shrink_count() 65 count += __count_free_nids(sbi); in f2fs_shrink_count() 72 return count; in f2fs_shrink_count()
|
/fs/ext2/ |
D | balloc.c | 165 struct ext2_group_desc *desc, struct buffer_head *bh, int count) in group_adjust_blocks() argument 167 if (count) { in group_adjust_blocks() 173 desc->bg_free_blocks_count = cpu_to_le16(free_blocks + count); in group_adjust_blocks() 479 unsigned long count) in ext2_free_blocks() argument 493 if (!ext2_data_block_valid(sbi, block, 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() 514 count -= overflow; in ext2_free_blocks() [all …]
|
/fs/hfsplus/ |
D | extents.c | 54 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 …]
|
D | bitmap.c | 164 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/ocfs2/ |
D | filecheck.c | 80 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 …]
|