/kernel/linux/linux-5.10/fs/jffs2/ |
D | erase.c | 45 jeb->offset, jeb->offset, jeb->offset + c->sector_size); in jffs2_erase_block() 52 c->erasing_size -= c->sector_size; in jffs2_erase_block() 53 c->dirty_size += c->sector_size; in jffs2_erase_block() 54 jeb->dirty_size = c->sector_size; in jffs2_erase_block() 63 instr->len = c->sector_size; in jffs2_erase_block() 83 c->erasing_size -= c->sector_size; in jffs2_erase_block() 84 c->dirty_size += c->sector_size; in jffs2_erase_block() 85 jeb->dirty_size = c->sector_size; in jffs2_erase_block() 131 c->erasing_size += c->sector_size; in jffs2_erase_pending_blocks() 186 c->erasing_size -= c->sector_size; in jffs2_erase_failed() [all …]
|
D | build.c | 324 size += c->sector_size - 1; /* ... and round up */ in jffs2_calc_trigger_levels() 326 c->resv_blocks_write = c->resv_blocks_deletion + (size / c->sector_size); in jffs2_calc_trigger_levels() 350 c->nospc_dirty_size = c->sector_size + (c->flash_size / 100); in jffs2_calc_trigger_levels() 353 c->flash_size / 1024, c->sector_size / 1024, c->nr_blocks); in jffs2_calc_trigger_levels() 355 c->resv_blocks_deletion, c->resv_blocks_deletion*c->sector_size/1024); in jffs2_calc_trigger_levels() 357 c->resv_blocks_write, c->resv_blocks_write*c->sector_size/1024); in jffs2_calc_trigger_levels() 359 c->resv_blocks_gctrigger, c->resv_blocks_gctrigger*c->sector_size/1024); in jffs2_calc_trigger_levels() 361 c->resv_blocks_gcmerge, c->resv_blocks_gcmerge*c->sector_size/1024); in jffs2_calc_trigger_levels() 363 c->resv_blocks_gcbad, c->resv_blocks_gcbad*c->sector_size/1024); in jffs2_calc_trigger_levels() 377 c->nr_blocks = c->flash_size / c->sector_size; in jffs2_do_mount_fs() [all …]
|
D | scan.c | 62 static inline uint32_t EMPTY_SCAN_SIZE(uint32_t sector_size) { in EMPTY_SCAN_SIZE() argument 63 if (sector_size < DEFAULT_EMPTY_SCAN_SIZE) in EMPTY_SCAN_SIZE() 64 return sector_size; in EMPTY_SCAN_SIZE() 117 try_size = c->sector_size; in jffs2_scan_medium() 232 c->bad_size += c->sector_size; in jffs2_scan_medium() 233 c->free_size -= c->sector_size; in jffs2_scan_medium() 317 else if (!ISDIRTY(c->sector_size - (jeb->used_size + jeb->unchecked_size))) { in jffs2_scan_classify_jeb() 492 sm = (void *)buf + c->sector_size - sizeof(*sm); in jffs2_scan_eraseblock() 495 sumlen = c->sector_size - je32_to_cpu(sm->offset); in jffs2_scan_eraseblock() 506 jeb->offset + c->sector_size - buf_len, in jffs2_scan_eraseblock() [all …]
|
D | nodemgmt.c | 30 c->erasing_size - c->resv_blocks_write * c->sector_size in jffs2_rp_can_write() 115 …dirty = c->dirty_size + c->erasing_size - c->nr_erasing_blocks * c->sector_size + c->unchecked_siz… in jffs2_reserve_space() 124 c->sector_size); in jffs2_reserve_space() 141 if ( (avail / c->sector_size) <= blocksneeded) { in jffs2_reserve_space() 149 avail, blocksneeded * c->sector_size); in jffs2_reserve_space() 343 if (!(c->wbuf_ofs % c->sector_size) && !c->wbuf_len) in jffs2_find_nextblock() 438 (jeb->offset + c->sector_size - waste) | REF_OBSOLETE, in jffs2_do_reserve_space() 459 if (jeb->free_size != c->sector_size - c->cleanmarker_size) { in jffs2_do_reserve_space() 484 *len, jeb->offset + (c->sector_size - jeb->free_size)); in jffs2_do_reserve_space() 507 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_add_physical_node_ref() [all …]
|
D | debug.c | 33 jeb->unchecked_size != c->sector_size)) { in __jffs2_dbg_acct_sanity_check_nolock() 37 jeb->wasted_size, jeb->unchecked_size, c->sector_size); in __jffs2_dbg_acct_sanity_check_nolock() 251 erasing += c->sector_size; in __jffs2_dbg_superblock_counts() 255 erasing += c->sector_size; in __jffs2_dbg_superblock_counts() 259 erasing += c->sector_size; in __jffs2_dbg_superblock_counts() 263 bad += c->sector_size; in __jffs2_dbg_superblock_counts() 322 ref_offset(ref2) > jeb->offset + c->sector_size) { in __jffs2_dbg_acct_paranoia_check_nolock() 365 && my_used_size + my_unchecked_size + my_dirty_size != c->sector_size) { in __jffs2_dbg_acct_paranoia_check_nolock() 368 c->sector_size); in __jffs2_dbg_acct_paranoia_check_nolock() 479 printk(JFFS2_DBG "sector_size: %#08x\n", c->sector_size); in __jffs2_dbg_dump_block_lists_nolock() [all …]
|
D | wbuf.c | 168 (jeb->offset+c->sector_size-oldfree) | REF_OBSOLETE, in jffs2_block_refile() 285 jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; in jffs2_wbuf_recover() 460 new_jeb = &c->blocks[ofs / c->sector_size]; in jffs2_wbuf_recover() 599 wbuf_jeb = &c->blocks[c->wbuf_ofs / c->sector_size]; in __jffs2_flush_wbuf() 926 jeb = &c->blocks[outvec_to / c->sector_size]; in jffs2_flash_writev() 1253 c->sector_size = 8 * c->mtd->erasesize; in jffs2_dataflash_setup() 1255 while (c->sector_size < 8192) { in jffs2_dataflash_setup() 1256 c->sector_size *= 2; in jffs2_dataflash_setup() 1262 if ((c->flash_size % c->sector_size) != 0) { in jffs2_dataflash_setup() 1263 c->flash_size = (c->flash_size / c->sector_size) * c->sector_size; in jffs2_dataflash_setup() [all …]
|
D | fs.c | 225 if (avail > c->sector_size * c->resv_blocks_write) in jffs2_statfs() 226 avail -= c->sector_size * c->resv_blocks_write; in jffs2_statfs() 538 c->sector_size = c->mtd->erasesize; in jffs2_do_fill_super() 539 blocks = c->flash_size / c->sector_size; in jffs2_do_fill_super() 544 if ((c->sector_size * blocks) != c->flash_size) { in jffs2_do_fill_super() 545 c->flash_size = c->sector_size * blocks; in jffs2_do_fill_super() 550 if (c->flash_size < 5*c->sector_size) { in jffs2_do_fill_super() 552 c->flash_size / c->sector_size); in jffs2_do_fill_super()
|
D | summary.c | 28 uint32_t sum_size = min_t(uint32_t, c->sector_size, MAX_SUMMARY_SIZE); in jffs2_sum_init() 260 jeb = &c->blocks[ofs / c->sector_size]; in jffs2_sum_add_kvec() 376 if ((ofs & ~3) > c->sector_size - jeb->free_size) { in sum_link_node_ref() 378 jffs2_scan_dirty_space(c, jeb, (ofs & ~3) - (c->sector_size - jeb->free_size)); in sum_link_node_ref() 557 c->free_size += c->sector_size - jeb->free_size; in jffs2_sum_process_sum_data() 561 jeb->free_size = c->sector_size; in jffs2_sum_process_sum_data() 580 ofs = c->sector_size - sumsize; in jffs2_sum_scan_sumnode() 806 sm->offset = cpu_to_je32(c->sector_size - jeb->free_size); in jffs2_sum_write_data() 817 sum_ofs = jeb->offset + c->sector_size - jeb->free_size; in jffs2_sum_write_data()
|
/kernel/linux/linux-5.10/arch/x86/boot/ |
D | edd.c | 40 int sector_size; in read_mbr_sig() local 46 sector_size = ei->params.bytes_per_sector; in read_mbr_sig() 47 if (!sector_size) in read_mbr_sig() 48 sector_size = 512; /* Best available guess */ in read_mbr_sig() 52 mbr_base = (buf_base+sector_size-1) & ~(sector_size-1); in read_mbr_sig() 54 mbrbuf_end = mbrbuf_ptr + sector_size; in read_mbr_sig() 62 memset(mbrbuf_ptr, 0, sector_size); in read_mbr_sig()
|
/kernel/linux/linux-5.10/drivers/scsi/ |
D | sd.c | 822 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_discard() 916 u32 data_len = sdp->sector_size; in sd_setup_write_same16_cmnd() 948 u32 data_len = sdp->sector_size; in sd_setup_write_same10_cmnd() 1003 unsigned int logical_block_size = sdkp->device->sector_size; in sd_config_write_same() 1083 BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size); in sd_setup_write_same_cmnd() 1099 cmd->transfersize = sdp->sector_size; in sd_setup_write_same_cmnd() 1112 rq->__data_len = sdp->sector_size; in sd_setup_write_same_cmnd() 1306 cmd->transfersize = sdp->sector_size; in sd_setup_read_write_cmnd() 1309 cmd->sdb.length = nr_blocks * sdp->sector_size; in sd_setup_read_write_cmnd() 1997 if (scsi_bufflen(scmd) <= sdev->sector_size) in sd_completed_bytes() [all …]
|
D | sr.c | 358 if (cd->device->sector_size == 2048) in sr_done() 425 s_size = cd->device->sector_size; in sr_init_command() 505 SCpnt->transfersize = cd->device->sector_size; in sr_init_command() 708 if (cd->device->sector_size > 2048) in sr_release() 774 sdev->sector_size = 2048; /* A guess, just in case */ in sr_probe() 824 int sector_size; in get_sectorsize() local 844 sector_size = 2048; /* A guess, just in case */ in get_sectorsize() 859 sector_size = get_unaligned_be32(&buffer[4]); in get_sectorsize() 860 switch (sector_size) { in get_sectorsize() 870 sector_size = 2048; in get_sectorsize() [all …]
|
D | sd.h | 182 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors() 187 return blocks * sdev->sector_size; in logical_to_bytes() 192 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical() 197 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
|
/kernel/linux/linux-5.10/drivers/nvdimm/ |
D | blk.c | 69 u32 internal_lbasize, sector_size; in nd_blk_rw_integrity() local 73 sector_size = nsblk_sector_size(nsblk); in nd_blk_rw_integrity() 74 ns_offset = lba * internal_lbasize + sector_size; in nd_blk_rw_integrity() 122 u32 internal_lbasize, sector_size; in nsblk_do_bvec() local 128 sector_size = nsblk_sector_size(nsblk); in nsblk_do_bvec() 138 cur_len = bip ? min(len, sector_size) : len; in nsblk_do_bvec() 140 lba = div_u64(sector << SECTOR_SHIFT, sector_size); in nsblk_do_bvec() 159 sector += sector_size >> SECTOR_SHIFT; in nsblk_do_bvec()
|
D | btt.c | 513 unsigned long len = arena->sector_size; in arena_clear_freelist_error() 756 arena->sector_size = btt->sector_size; in alloc_arena() 1058 return btt->lbasize - btt->sector_size; in btt_meta_size() 1072 __u64 lba = div_u64(sector << SECTOR_SHIFT, btt->sector_size); in lba_to_arena() 1151 meta_nsoff = to_namespace_offset(arena, postmap) + btt->sector_size; in btt_rw_integrity() 1215 cur_len = min(btt->sector_size, len); in btt_read_pg() 1283 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg() 1330 cur_len = min(btt->sector_size, len); in btt_write_pg() 1413 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg() 1461 if (len > PAGE_SIZE || len < btt->sector_size || in btt_submit_bio() [all …]
|
D | btt.h | 179 u32 sector_size; member 228 u32 sector_size; member
|
D | badrange.c | 187 const unsigned int sector_size = 512; in __add_badblock_range() local 192 start_sector = div_u64(ns_offset, sector_size); in __add_badblock_range() 193 end_sector = div_u64_rem(ns_offset + len, sector_size, &rem); in __add_badblock_range()
|
/kernel/linux/linux-5.10/block/partitions/ |
D | msdos.c | 138 sector_t sector_size = bdev_logical_block_size(state->bdev) / 512; in parse_extended() local 180 offs = start_sect(p)*sector_size; in parse_extended() 181 size = nr_sects(p)*sector_size; in parse_extended() 214 this_sector = first_sector + start_sect(p) * sector_size; in parse_extended() 215 this_size = nr_sects(p) * sector_size; in parse_extended() 582 sector_t sector_size = bdev_logical_block_size(state->bdev) / 512; in msdos_partition() local 662 sector_t start = start_sect(p)*sector_size; in msdos_partition() 663 sector_t size = nr_sects(p)*sector_size; in msdos_partition() 676 n = min(size, max(sector_size, n)); in msdos_partition() 710 subtypes[n].parse(state, start_sect(p) * sector_size, in msdos_partition() [all …]
|
/kernel/linux/linux-5.10/drivers/md/ |
D | dm-crypt.c | 172 unsigned short int sector_size; member 424 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr() 582 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr() 754 *(__le64 *)buf = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_eboiv_gen() 956 *(__le64 *)es = cpu_to_le64(dmreq->iv_sector * cc->sector_size); in crypt_iv_elephant() 982 memcpy(data_offset, data2 + sg2->offset, cc->sector_size); in crypt_iv_elephant() 987 diffuser_disk_to_cpu((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 988 diffuser_b_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 989 diffuser_a_decrypt((u32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() 990 diffuser_cpu_to_disk((__le32*)data_offset, cc->sector_size / sizeof(u32)); in crypt_iv_elephant() [all …]
|
/kernel/linux/linux-5.10/drivers/mtd/spi-nor/ |
D | core.h | 268 unsigned sector_size; member 329 .sector_size = (_sector_size), \ 344 .sector_size = (_sector_size), \ 350 .sector_size = (_sector_size), \ 363 .sector_size = (8*_page_size), \
|
/kernel/linux/linux-5.10/drivers/video/fbdev/ |
D | broadsheetfb.c | 593 int addr, const char *data, int sector_size) in broadsheet_spiflash_write_sector() argument 598 for (i = 0; i < sector_size; i += BS_SPIFLASH_PAGE_SIZE) { in broadsheet_spiflash_write_sector() 612 int sector_size, int data_start_addr, in broadsheet_spiflash_rewrite_sector() argument 620 sector_buffer = kzalloc(sector_size, GFP_KERNEL); in broadsheet_spiflash_rewrite_sector() 625 start_sector_addr = (data_start_addr / sector_size) * sector_size; in broadsheet_spiflash_rewrite_sector() 649 tail_start_addr = (data_start_addr + data_len) % sector_size; in broadsheet_spiflash_rewrite_sector() 654 tail_len = sector_size - tail_start_addr; in broadsheet_spiflash_rewrite_sector() 672 sector_buffer, sector_size); in broadsheet_spiflash_rewrite_sector() 681 int sector_size; in broadsheet_write_spiflash() local 690 sector_size = 32*1024; in broadsheet_write_spiflash() [all …]
|
/kernel/linux/linux-5.10/drivers/nfc/s3fwrn5/ |
D | firmware.h | 43 __u16 sector_size; member 84 u32 sector_size; member
|
D | firmware.c | 390 fw_info->sector_size = bootinfo.sector_size; in s3fwrn5_fw_setup() 427 image_size = fw_info->sector_size * fw->image_sectors; in s3fwrn5_fw_download() 461 for (off = 0; off < image_size; off += fw_info->sector_size) { in s3fwrn5_fw_download()
|
/kernel/liteos_a/drivers/block/disk/src/ |
D | disk.c | 515 (VOID)memset_s(partitionBuf, info->sector_size, 0, info->sector_size); in OsGPTPartitionRecognition() 542 ret = DiskPartitionMemZalloc(MEM_ADDR_ALIGN_BYTE, info->sector_size, &gptBuf, &partitionBuf); in DiskGPTPartitionRecognition() 561 (VOID)memset_s(gptBuf, info->sector_size, 0, info->sector_size); in DiskGPTPartitionRecognition() 664 (VOID)memset_s(ebrBuf, info->sector_size, 0, info->sector_size); in OsLogicalPartitionRecognition() 714 ret = DiskPartitionMemZalloc(MEM_ADDR_ALIGN_BYTE, info->sector_size, &mbrBuf, &ebrBuf); in DiskPartitionRecognition() 763 parInfo.sector_size = disk->sector_size; in DiskPartitionRegister() 814 if (LOS_IsUserAddressRange((VADDR_T)buf, count * disk->sector_size)) { in disk_read_directly() 825 if (LOS_CopyFromKernel(buf, disk->sector_size * cnt, buffer, disk->sector_size * cnt)) { in disk_read_directly() 829 buf = (UINT8 *)buf + disk->sector_size * cnt; in disk_read_directly() 849 if (LOS_IsUserAddressRange((VADDR_T)buf, count * disk->sector_size)) { in disk_write_directly() [all …]
|
/kernel/linux/linux-5.10/drivers/block/ |
D | swim_asm.S | 43 .equ sector_size, 512 define 193 movel #sector_size-1, %d4 /* sector size */ 236 movel #sector_size, %d0
|
/kernel/linux/linux-5.10/fs/ntfs/ |
D | super.c | 758 vol->sector_size = le16_to_cpu(b->bpb.bytes_per_sector); in parse_ntfs_boot_sector() 759 vol->sector_size_bits = ffs(vol->sector_size) - 1; in parse_ntfs_boot_sector() 760 ntfs_debug("vol->sector_size = %i (0x%x)", vol->sector_size, in parse_ntfs_boot_sector() 761 vol->sector_size); in parse_ntfs_boot_sector() 764 if (vol->sector_size < vol->sb->s_blocksize) { in parse_ntfs_boot_sector() 767 "supported. Sorry.", vol->sector_size, in parse_ntfs_boot_sector() 777 vol->cluster_size = vol->sector_size << sectors_per_cluster_bits; in parse_ntfs_boot_sector() 784 if (vol->cluster_size < vol->sector_size) { in parse_ntfs_boot_sector() 787 "Sorry.", vol->cluster_size, vol->sector_size); in parse_ntfs_boot_sector() 823 if (vol->mft_record_size < vol->sector_size) { in parse_ntfs_boot_sector() [all …]
|