/linux/fs/jffs2/ |
A D | erase.c | 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() 198 c->bad_size += c->sector_size; in jffs2_erase_failed() 328 if (retlen < c->sector_size) { in jffs2_block_check_erase() 451 jeb->free_size = c->sector_size; in jffs2_mark_erased_block() [all …]
|
A 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() 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() 390 c->blocks[i].offset = i * c->sector_size; in jffs2_do_mount_fs() [all …]
|
A D | scan.c | 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() 515 if (sumlen > c->sector_size) in jffs2_scan_eraseblock() 560 buf_len = c->sector_size; in jffs2_scan_eraseblock() 562 buf_len = EMPTY_SCAN_SIZE(c->sector_size); in jffs2_scan_eraseblock() 570 max_ofs = EMPTY_SCAN_SIZE(c->sector_size); in jffs2_scan_eraseblock() 642 jeb->offset, c->sector_size, ofs, in jffs2_scan_eraseblock() [all …]
|
A D | nodemgmt.c | 30 c->erasing_size - c->resv_blocks_write * c->sector_size in jffs2_rp_can_write() 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() 524 jeb->offset + (c->sector_size - jeb->free_size)); in jffs2_add_physical_node_ref() [all …]
|
A 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 …]
|
A D | wbuf.c | 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() 1281 c->wbuf_pagesize, c->sector_size); in jffs2_dataflash_setup() [all …]
|
A D | fs.c | 226 if (avail > c->sector_size * c->resv_blocks_write) in jffs2_statfs() 227 avail -= c->sector_size * c->resv_blocks_write; in jffs2_statfs() 539 c->sector_size = c->mtd->erasesize; in jffs2_do_fill_super() 540 blocks = c->flash_size / c->sector_size; in jffs2_do_fill_super() 545 if ((c->sector_size * blocks) != c->flash_size) { in jffs2_do_fill_super() 546 c->flash_size = c->sector_size * blocks; in jffs2_do_fill_super() 551 if (c->flash_size < 5*c->sector_size) { in jffs2_do_fill_super() 553 c->flash_size / c->sector_size); in jffs2_do_fill_super()
|
A 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()
|
/linux/arch/x86/boot/ |
A 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()
|
/linux/drivers/scsi/ |
A D | sd.c | 2033 unsigned int sector_size = SCpnt->device->sector_size; in sd_done() local 2362 unsigned sector_size; in read_capacity_16() local 2440 return sector_size; in read_capacity_16() 2495 return sector_size; in read_capacity_10() 2500 return sector_size; in read_capacity_10() 2522 int sector_size; in sd_read_capacity() local 2579 sector_size = 512; in sd_read_capacity() 2589 sector_size); in sd_read_capacity() 2603 sector_size = 512; in sd_read_capacity() 2608 sdkp->device->sector_size = sector_size; in sd_read_capacity() [all …]
|
A D | sr.c | 364 if (cd->device->sector_size == 2048) in sr_done() 426 s_size = cd->device->sector_size; in sr_init_command() 498 SCpnt->transfersize = cd->device->sector_size; in sr_init_command() 763 int sector_size; in get_sectorsize() local 783 sector_size = 2048; /* A guess, just in case */ in get_sectorsize() 798 sector_size = get_unaligned_be32(&buffer[4]); in get_sectorsize() 799 switch (sector_size) { in get_sectorsize() 809 sector_size = 2048; in get_sectorsize() 818 "unsupported sector size %d.", sector_size); in get_sectorsize() 822 cd->device->sector_size = sector_size; in get_sectorsize() [all …]
|
A D | sd.h | 183 return blocks << (ilog2(sdev->sector_size) - 9); in logical_to_sectors() 188 return blocks * sdev->sector_size; in logical_to_bytes() 193 return bytes >> ilog2(sdev->sector_size); in bytes_to_logical() 198 return sector >> (ilog2(sdev->sector_size) - 9); in sectors_to_logical()
|
/linux/block/partitions/ |
A D | msdos.c | 138 sector_t sector_size; in parse_extended() local 181 offs = start_sect(p)*sector_size; in parse_extended() 182 size = nr_sects(p)*sector_size; in parse_extended() 215 this_sector = first_sector + start_sect(p) * sector_size; in parse_extended() 216 this_size = nr_sects(p) * sector_size; in parse_extended() 583 sector_t sector_size; in msdos_partition() local 664 sector_t start = start_sect(p)*sector_size; in msdos_partition() 665 sector_t size = nr_sects(p)*sector_size; in msdos_partition() 678 n = min(size, max(sector_size, n)); in msdos_partition() 712 subtypes[n].parse(state, start_sect(p) * sector_size, in msdos_partition() [all …]
|
/linux/drivers/nvdimm/ |
A 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()
|
A D | btt.c | 514 unsigned long len = arena->sector_size; in arena_clear_freelist_error() 757 arena->sector_size = btt->sector_size; in alloc_arena() 1059 return btt->lbasize - btt->sector_size; in btt_meta_size() 1216 cur_len = min(btt->sector_size, len); in btt_read_pg() 1284 sector += btt->sector_size >> SECTOR_SHIFT; in btt_read_pg() 1331 cur_len = min(btt->sector_size, len); in btt_write_pg() 1414 sector += btt->sector_size >> SECTOR_SHIFT; in btt_write_pg() 1462 if (len > PAGE_SIZE || len < btt->sector_size || in btt_submit_bio() 1463 len % btt->sector_size) { in btt_submit_bio() 1548 btt->nd_btt->size = btt->nlba * (u64)btt->sector_size; in btt_blk_init() [all …]
|
A 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()
|
A D | btt.h | 178 u32 sector_size; member 227 u32 sector_size; member
|
/linux/drivers/md/ |
A D | dm-crypt.c | 174 unsigned short int sector_size; member 426 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_lmk_ctr() 584 if (cc->sector_size != (1 << SECTOR_SHIFT)) { in crypt_iv_tcw_ctr() 995 for (i = 0; i < (cc->sector_size / 32); i++) in crypt_iv_elephant() 1355 cc->sector_size, iv); in crypt_convert_block_aead() 3133 cc->sector_size > 4096 || in crypt_ctr_optional() 3134 (cc->sector_size & (cc->sector_size - 1))) { in crypt_ctr_optional() 3200 cc->sector_size = (1 << SECTOR_SHIFT); in crypt_ctr() 3502 if (cc->sector_size != (1 << SECTOR_SHIFT)) in crypt_status() 3525 if (cc->sector_size != (1 << SECTOR_SHIFT)) in crypt_status() [all …]
|
/linux/drivers/video/fbdev/ |
A 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() 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() 694 sector_size = 64*1024; in broadsheet_write_spiflash() [all …]
|
/linux/drivers/mtd/spi-nor/ |
A D | core.h | 327 unsigned sector_size; member 402 .sector_size = (_sector_size), \ 417 .sector_size = (_sector_size), \ 423 .sector_size = (_sector_size), \ 436 .sector_size = (8*_page_size), \
|
/linux/drivers/nfc/s3fwrn5/ |
A D | firmware.h | 43 __u16 sector_size; member 84 u32 sector_size; member
|
A D | firmware.c | 380 fw_info->sector_size = bootinfo.sector_size; in s3fwrn5_fw_setup() 418 image_size = fw_info->sector_size * fw->image_sectors; in s3fwrn5_fw_download() 447 for (off = 0; off < image_size; off += fw_info->sector_size) { in s3fwrn5_fw_download()
|
/linux/include/scsi/ |
A D | scsi_cmnd.h | 238 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_get_lba() 245 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_logical_block_count() 321 return scmd->device->sector_size; in scsi_prot_interval()
|
/linux/drivers/block/ |
A D | swim_asm.S | 43 .equ sector_size, 512 define 193 movel #sector_size-1, %d4 /* sector size */ 236 movel #sector_size, %d0
|
/linux/fs/ntfs/ |
A D | super.c | 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() 784 if (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() 827 vol->sector_size); in parse_ntfs_boot_sector() 854 if (vol->index_record_size < vol->sector_size) { in parse_ntfs_boot_sector() 858 vol->sector_size); in parse_ntfs_boot_sector() 2808 if (vol->sector_size > blocksize) { in ntfs_fill_super() 2810 if (blocksize != vol->sector_size) { in ntfs_fill_super() [all …]
|