Home
last modified time | relevance | path

Searched refs:SECTOR_SIZE (Results 1 – 25 of 35) sorted by relevance

12

/linux/drivers/mtd/
H A Drfd_ftl.c53 #define SECTOR_SIZE 512 macro
140 (i + part->header_sectors_per_block) * SECTOR_SIZE; in build_block_map()
158 sectors_per_block = part->block_size / SECTOR_SIZE; in scan_header()
167 sizeof(u16) + SECTOR_SIZE - 1) / SECTOR_SIZE; in scan_header()
252 rc = mtd_read(part->mbd.mtd, addr, SECTOR_SIZE, &retlen, in rfd_ftl_readsect()
254 if (!rc && retlen != SECTOR_SIZE) in rfd_ftl_readsect()
263 memset(buf, 0, SECTOR_SIZE); in rfd_ftl_readsect()
328 sector_data = kmalloc(SECTOR_SIZE, GFP_KERNEL); in move_block_contents()
366 (i + part->header_sectors_per_block) * SECTOR_SIZE; in move_block_contents()
376 rc = mtd_read(part->mbd.mtd, addr, SECTOR_SIZE, &retlen, in move_block_contents()
[all …]
H A Dftl.c106 #define SECTOR_SIZE 512 macro
398 le32_to_cpu(part->header.BAMOffset), SECTOR_SIZE); in prepare_xfer()
431 u_char buf[SECTOR_SIZE]; in copy_erase_unit()
490 ret = mtd_read(part->mbd.mtd, src, SECTOR_SIZE, &retlen, in copy_erase_unit()
498 ret = mtd_write(part->mbd.mtd, dest, SECTOR_SIZE, &retlen, in copy_erase_unit()
512 src += SECTOR_SIZE; in copy_erase_unit()
513 dest += SECTOR_SIZE; in copy_erase_unit()
765 if (((sector+i) * SECTOR_SIZE) >= le32_to_cpu(part->header.FormattedSize)) { in ftl_read()
771 memset(buffer, 0, SECTOR_SIZE); in ftl_read()
775 ret = mtd_read(part->mbd.mtd, offset, SECTOR_SIZE, &retlen, in ftl_read()
[all …]
H A Dssfdc.c34 #define SECTOR_SIZE 512 macro
111 sect_buf = kmalloc(SECTOR_SIZE, GFP_KERNEL); in get_valid_cis_sector()
122 ret = mtd_read(mtd, offset, SECTOR_SIZE, &retlen, in get_valid_cis_sector()
126 if (ret < 0 || retlen != SECTOR_SIZE) { in get_valid_cis_sector()
155 ret = mtd_read(mtd, offset, SECTOR_SIZE, &retlen, sect_buf); in read_physical_sector()
156 if (ret < 0 || retlen != SECTOR_SIZE) in read_physical_sector()
400 memset(buf, 0xff, SECTOR_SIZE); in ssfdcr_readsect()
430 .blksize = SECTOR_SIZE,
/linux/block/partitions/
H A Dof.c24 if (offset % SECTOR_SIZE) in validate_of_partition()
29 if (!size || size % SECTOR_SIZE) in validate_of_partition()
48 u64 offset = of_read_number(reg, a_cells) / SECTOR_SIZE; in add_of_partition()
49 u64 size = of_read_number(reg + a_cells, s_cells) / SECTOR_SIZE; in add_of_partition()
H A Dcore.c727 return folio_address(folio) + offset_in_folio(folio, n * SECTOR_SIZE); in read_part_sector()
/linux/include/uapi/linux/
H A Dmsdos_fs.h13 #ifndef SECTOR_SIZE
14 #define SECTOR_SIZE 512 /* sector size (bytes) */ macro
19 #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
/linux/block/
H A Dblk-settings.c40 lim->logical_block_size = SECTOR_SIZE; in blk_set_stacking_limits()
41 lim->physical_block_size = SECTOR_SIZE; in blk_set_stacking_limits()
42 lim->io_min = SECTOR_SIZE; in blk_set_stacking_limits()
43 lim->discard_granularity = SECTOR_SIZE; in blk_set_stacking_limits()
44 lim->dma_alignment = SECTOR_SIZE - 1; in blk_set_stacking_limits()
318 lim->logical_block_size = SECTOR_SIZE; in blk_validate_limits()
372 if (lim->max_user_sectors < BLK_MIN_SEGMENT_SIZE / SECTOR_SIZE) in blk_validate_limits()
462 lim->dma_alignment = SECTOR_SIZE - 1; in blk_validate_limits()
/linux/drivers/scsi/
H A Dsd_zbc.c188 bufsize = roundup((nr_zones + 1) * 64, SECTOR_SIZE); in sd_zbc_alloc_report_buffer()
194 while (bufsize >= SECTOR_SIZE) { in sd_zbc_alloc_report_buffer()
200 bufsize = rounddown(bufsize >> 1, SECTOR_SIZE); in sd_zbc_alloc_report_buffer()
/linux/drivers/infiniband/ulp/iser/
H A Discsi_iser.h101 ((ISER_DEF_MAX_SECTORS * SECTOR_SIZE) >> ilog2(SZ_4K))
103 #define ISCSI_ISER_MAX_SG_TABLESIZE ((32768 * SECTOR_SIZE) >> ilog2(SZ_4K))
H A Diser_verbs.c512 sg_tablesize = DIV_ROUND_UP(max_sectors * SECTOR_SIZE, SZ_4K); in iser_calc_scsi_params()
/linux/drivers/mtd/nand/raw/
H A Ddiskonchip.c116 #define SECTOR_SIZE 512 macro
118 #define NB_DATA (((SECTOR_SIZE + 1) * 8 + 6) / 10)
195 if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) { in doc_ecc_decode()
198 if (index < SECTOR_SIZE) in doc_ecc_decode()
205 if ((index >= 0 && index < SECTOR_SIZE) || index == (SECTOR_SIZE + 1)) { in doc_ecc_decode()
208 if (index < SECTOR_SIZE) in doc_ecc_decode()
/linux/fs/ntfs3/
H A Dfsntfs.c138 if ((fo & 1) || fo + fn * sizeof(short) > SECTOR_SIZE || !fn-- || in ntfs_fix_pre_write()
139 fn * SECTOR_SIZE > bytes) { in ntfs_fix_pre_write()
153 ptr = Add2Ptr(rhdr, SECTOR_SIZE - sizeof(short)); in ntfs_fix_pre_write()
158 ptr += SECTOR_SIZE / sizeof(short); in ntfs_fix_pre_write()
180 if ((fo & 1) || fo + fn * sizeof(short) > SECTOR_SIZE || !fn-- || in ntfs_fix_post_read()
181 fn * SECTOR_SIZE > bytes) { in ntfs_fix_post_read()
188 ptr = Add2Ptr(rhdr, SECTOR_SIZE - sizeof(short)); in ntfs_fix_post_read()
200 ptr += SECTOR_SIZE / sizeof(short); in ntfs_fix_post_read()
1409 if ((fo & 1) || fo + fn * sizeof(short) > SECTOR_SIZE || !fn-- || in ntfs_write_bh()
1410 fn * SECTOR_SIZE > bytes) { in ntfs_write_bh()
[all …]
H A Dfslog.c435 if (sys_page < SECTOR_SIZE || page_size < SECTOR_SIZE || in is_rst_page_hdr_valid()
473 SECTOR_SIZE - sizeof(short)) in is_rst_area_valid()
484 if (!IS_ALIGNED(off, 8) || ro + off > SECTOR_SIZE - sizeof(short)) in is_rst_area_valid()
540 if (usa_error && ra_len + ro > SECTOR_SIZE - sizeof(short)) in is_client_area_valid()
2648 fo = (SECTOR_SIZE - ((bytes >> SECTOR_SHIFT) + 1) * sizeof(short)); in check_index_buffer()
2653 if ((le16_to_cpu(r->fix_num) - 1) * SECTOR_SIZE != bytes) in check_index_buffer()
2795 fo > (SECTOR_SIZE - ((rs >> SECTOR_SHIFT) + 1) * sizeof(short)) || in check_file_record()
2796 (fn - 1) * SECTOR_SIZE != rs || ao < MFTRECORD_FIXUP_OFFSET_1 || in check_file_record()
H A Dsuper.c961 if (boot_sector_size < SECTOR_SIZE || in ntfs_init_from_boot()
1008 if (record_size < SECTOR_SIZE || !is_power_of_2(record_size)) { in ntfs_init_from_boot()
1031 if (sbi->index_size < SECTOR_SIZE || !is_power_of_2(sbi->index_size)) { in ntfs_init_from_boot()
/linux/drivers/vdpa/vdpa_sim/
H A Dvdpa_sim_blk.c378 blk_config->blk_size = cpu_to_vdpasim32(vdpasim, SECTOR_SIZE); in vdpasim_blk_get_config()
381 cpu_to_vdpasim32(vdpasim, SECTOR_SIZE); in vdpasim_blk_get_config()
/linux/drivers/dax/
H A Dsuper.c91 *start_off = get_start_sect(bdev) * SECTOR_SIZE; in fs_dax_get_by_bdev()
92 part_size = bdev_nr_sectors(bdev) * SECTOR_SIZE; in fs_dax_get_by_bdev()
/linux/arch/um/drivers/
H A Dubd_kern.c736 ubd_dev->openflags, SECTOR_SIZE, PAGE_SIZE, in ubd_open_dev()
823 #define ROUND_BLOCK(n) ((n + (SECTOR_SIZE - 1)) & (-SECTOR_SIZE))
1246 io_req->sectorsize = SECTOR_SIZE; in ubd_alloc_req()
/linux/fs/pstore/
H A Dzone.c1335 check_size(kmsg_size, SECTOR_SIZE); in register_pstore_zone()
1336 check_size(pmsg_size, SECTOR_SIZE); in register_pstore_zone()
1337 check_size(console_size, SECTOR_SIZE); in register_pstore_zone()
1338 check_size(ftrace_size, SECTOR_SIZE); in register_pstore_zone()
/linux/drivers/block/
H A Dloop.c465 return SECTOR_SIZE; in loop_query_min_dio_size()
934 return SECTOR_SIZE; in loop_default_blocksize()
1126 lim.logical_block_size = SECTOR_SIZE; in __loop_clr_fd()
1127 lim.physical_block_size = SECTOR_SIZE; in __loop_clr_fd()
1128 lim.io_min = SECTOR_SIZE; in __loop_clr_fd()
/linux/fs/iomap/
H A Dioend.c430 return bioset_init(&iomap_ioend_bioset, 4 * (PAGE_SIZE / SECTOR_SIZE), in iomap_ioend_init()
/linux/fs/nfs/blocklayout/
H A Dblocklayout.c856 if (!is_aligned_req(pgio, req, SECTOR_SIZE, false)) { in bl_pg_init_read()
879 if (!is_aligned_req(pgio, req, SECTOR_SIZE, false)) in bl_pg_test_read()
/linux/drivers/md/
H A Dmd-bitmap.c360 index * (PAGE_SIZE / SECTOR_SIZE); in read_sb_page()
426 start + opt_size / SECTOR_SIZE <= boundary) in bitmap_io_size()
428 if (start + io_size / SECTOR_SIZE <= boundary) in bitmap_io_size()
444 sector_t ps = pg_index * PAGE_SIZE / SECTOR_SIZE; in __write_sb_page()
467 sboff < (doff + mddev->dev_sectors + PAGE_SIZE / SECTOR_SIZE)) in __write_sb_page()
/linux/drivers/mmc/core/
H A Dqueue.c194 lim->discard_granularity = SECTOR_SIZE; in mmc_queue_setup_discard()
/linux/fs/exfat/
H A Dexfat_fs.h148 (DIV_ROUND_UP(EXFAT_DEN_TO_B(ES_MAX_ENTRY_NUM), SECTOR_SIZE) + 1)
/linux/drivers/block/drbd/
H A Ddrbd_bitmap.c1011 if (len_sect < PAGE_SIZE/SECTOR_SIZE) in bm_page_io_async()
1012 len = (unsigned int)len_sect*SECTOR_SIZE; in bm_page_io_async()

12