Home
last modified time | relevance | path

Searched refs:SECTOR_SHIFT (Results 1 – 25 of 100) sorted by relevance

1234

/linux-5.19.10/fs/nfs/blocklayout/
Dblocklayout.c141 disk_addr = (u64)isect << SECTOR_SHIFT; in do_add_page_to_bio()
158 bio->bi_iter.bi_sector = disk_addr >> SECTOR_SHIFT; in do_add_page_to_bio()
176 isect = header->args.offset >> SECTOR_SHIFT; in bl_mark_devices_unavailable()
177 bytes_left += header->args.offset - (isect << SECTOR_SHIFT); in bl_mark_devices_unavailable()
185 if (bytes_left > extent_length << SECTOR_SHIFT) in bl_mark_devices_unavailable()
186 bytes_left -= extent_length << SECTOR_SHIFT; in bl_mark_devices_unavailable()
258 isect = (sector_t) (f_offset >> SECTOR_SHIFT); in bl_read_pagelist()
304 isect += (pg_len >> SECTOR_SHIFT); in bl_read_pagelist()
305 extent_length -= (pg_len >> SECTOR_SHIFT); in bl_read_pagelist()
310 if ((isect << SECTOR_SHIFT) >= header->inode->i_size) { in bl_read_pagelist()
[all …]
Dblocklayout.h43 #define PAGE_CACHE_SECTORS (PAGE_SIZE >> SECTOR_SHIFT)
44 #define PAGE_CACHE_SECTOR_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)
45 #define SECTOR_SIZE (1 << SECTOR_SHIFT)
/linux-5.19.10/block/
Dblk-settings.c134 limits->logical_block_size >> SECTOR_SHIFT); in blk_queue_max_hw_sectors()
140 limits->logical_block_size >> SECTOR_SHIFT); in blk_queue_max_hw_sectors()
316 round_down(limits->max_hw_sectors, size >> SECTOR_SHIFT); in blk_queue_logical_block_size()
318 round_down(limits->max_sectors, size >> SECTOR_SHIFT); in blk_queue_logical_block_size()
488 unsigned int alignment = sector_div(sector, granularity >> SECTOR_SHIFT) in queue_limit_alignment_offset()
489 << SECTOR_SHIFT; in queue_limit_alignment_offset()
503 alignment = lim->discard_alignment >> SECTOR_SHIFT; in queue_limit_discard_alignment()
504 granularity = lim->discard_granularity >> SECTOR_SHIFT; in queue_limit_discard_alignment()
515 return offset << SECTOR_SHIFT; in queue_limit_discard_alignment()
520 sectors = round_down(sectors, lbs >> SECTOR_SHIFT); in blk_round_down_sectors()
[all …]
Dfops.c77 bio.bi_iter.bi_sector = pos >> SECTOR_SHIFT; in __blkdev_direct_IO_simple()
208 bio->bi_iter.bi_sector = pos >> SECTOR_SHIFT; in __blkdev_direct_IO()
312 bio->bi_iter.bi_sector = pos >> SECTOR_SHIFT; in __blkdev_direct_IO_async()
647 error = blkdev_issue_zeroout(bdev, start >> SECTOR_SHIFT, in blkdev_fallocate()
648 len >> SECTOR_SHIFT, GFP_KERNEL, in blkdev_fallocate()
652 error = blkdev_issue_zeroout(bdev, start >> SECTOR_SHIFT, in blkdev_fallocate()
653 len >> SECTOR_SHIFT, GFP_KERNEL, in blkdev_fallocate()
657 error = blkdev_issue_discard(bdev, start >> SECTOR_SHIFT, in blkdev_fallocate()
658 len >> SECTOR_SHIFT, GFP_KERNEL); in blkdev_fallocate()
Dblk-lib.c22 round_up(sector, discard_granularity >> SECTOR_SHIFT); in bio_discard_limit()
35 return round_down(UINT_MAX, discard_granularity) >> SECTOR_SHIFT; in bio_discard_limit()
329 sector += len << SECTOR_SHIFT; in blkdev_issue_secure_erase()
330 nr_sects -= len << SECTOR_SHIFT; in blkdev_issue_secure_erase()
/linux-5.19.10/fs/btrfs/
Dzoned.c62 #define SUPER_INFO_SECTORS ((u64)BTRFS_SUPER_INFO_SIZE >> SECTOR_SHIFT)
112 *wp_ret = zones[0].start << SECTOR_SHIFT; in sb_write_pointer()
125 << SECTOR_SHIFT) - BTRFS_SUPER_INFO_SIZE; in sb_write_pointer()
151 *wp_ret = sector << SECTOR_SHIFT; in sb_write_pointer()
194 const sector_t zone_sectors = device->fs_info->zone_size >> SECTOR_SHIFT; in emulate_report_zones()
198 pos >>= SECTOR_SHIFT; in emulate_report_zones()
260 ret = blkdev_report_zones(device->bdev, pos >> SECTOR_SHIFT, *nr_zones, in btrfs_get_dev_zones()
389 zone_sectors = fs_info->zone_size >> SECTOR_SHIFT; in btrfs_get_dev_zone_info()
396 zone_info->zone_size = zone_sectors << SECTOR_SHIFT; in btrfs_get_dev_zone_info()
431 (u64)bdev_max_zone_append_sectors(bdev) << SECTOR_SHIFT, in btrfs_get_dev_zone_info()
[all …]
/linux-5.19.10/drivers/mtd/
Dssfdc.c36 #define SECTOR_SHIFT 9 macro
133 cis_sector = (int)(offset >> SECTOR_SHIFT); in get_valid_cis_sector()
154 loff_t offset = (loff_t)sect_no << SECTOR_SHIFT; in read_physical_sector()
308 ssfdc->cis_block = cis_sector / (mtd->erasesize >> SECTOR_SHIFT); in ssfdcr_add_mtd()
320 ssfdc->cylinders = (unsigned short)(((u32)mtd->size >> SECTOR_SHIFT) / in ssfdcr_add_mtd()
373 sectors_per_block = ssfdc->erase_size >> SECTOR_SHIFT; in ssfdcr_readsect()
/linux-5.19.10/drivers/block/
Dbrd.c175 unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; in copy_to_brd_setup()
182 sector += copy >> SECTOR_SHIFT; in copy_to_brd_setup()
197 unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; in copy_to_brd()
210 sector += copy >> SECTOR_SHIFT; in copy_to_brd()
229 unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; in copy_from_brd()
243 sector += copy >> SECTOR_SHIFT; in copy_from_brd()
306 sector += len >> SECTOR_SHIFT; in brd_submit_bio()
Dn64cart.c92 u32 pos = bio->bi_iter.bi_sector << SECTOR_SHIFT; in n64cart_submit_bio()
144 set_capacity(disk, size >> SECTOR_SHIFT); in n64cart_probe()
/linux-5.19.10/drivers/md/
Ddm-integrity.c120 #define JOURNAL_SECTOR_DATA ((1 << SECTOR_SHIFT) - sizeof(commit_id_t))
457 ms += offset >> (SECTOR_SHIFT + ic->log2_buffer_sectors - ic->log2_tag_size); in get_metadata_sector_and_offset()
458 mo = (offset << ic->log2_tag_size) & ((1U << SECTOR_SHIFT << ic->log2_buffer_sectors) - 1); in get_metadata_sector_and_offset()
460 ms += (__u64)offset * ic->tag_size >> (SECTOR_SHIFT + ic->log2_buffer_sectors); in get_metadata_sector_and_offset()
461 mo = (offset * ic->tag_size) & ((1U << SECTOR_SHIFT << ic->log2_buffer_sectors) - 1); in get_metadata_sector_and_offset()
512 if (sizeof(struct superblock) + size > 1 << SECTOR_SHIFT) { in sb_mac()
525 r = crypto_shash_update(desc, (__u8 *)ic->sb, (1 << SECTOR_SHIFT) - size); in sb_mac()
532 r = crypto_shash_final(desc, (__u8 *)ic->sb + (1 << SECTOR_SHIFT) - size); in sb_mac()
544 if (memcmp((__u8 *)ic->sb + (1 << SECTOR_SHIFT) - size, result, size)) { in sb_mac()
749 *pl_index = sector >> (PAGE_SHIFT - SECTOR_SHIFT); in page_list_location()
[all …]
Ddm-verity-fec.c618 ((sector_t)(num_ll << (v->data_dev_block_bits - SECTOR_SHIFT)) in verity_fec_parse_opt_args()
619 >> (v->data_dev_block_bits - SECTOR_SHIFT) != num_ll)) { in verity_fec_parse_opt_args()
627 ((sector_t)(num_ll << (v->data_dev_block_bits - SECTOR_SHIFT)) >> in verity_fec_parse_opt_args()
628 (v->data_dev_block_bits - SECTOR_SHIFT) != num_ll)) { in verity_fec_parse_opt_args()
745 if ((f->roots << SECTOR_SHIFT) & ((1 << v->data_dev_block_bits) - 1)) in verity_fec_ctr()
748 f->io_size = v->fec->roots << SECTOR_SHIFT; in verity_fec_ctr()
758 dm_bufio_set_sector_offset(f->bufio, f->start << (v->data_dev_block_bits - SECTOR_SHIFT)); in verity_fec_ctr()
760 fec_blocks = div64_u64(f->rounds * f->roots, v->fec->roots << SECTOR_SHIFT); in verity_fec_ctr()
Ddm-writecache.c340 wc->memory_map += (size_t)wc->start_sector << SECTOR_SHIFT; in persistent_memory_claim()
341 wc->memory_map_size -= (size_t)wc->start_sector << SECTOR_SHIFT; in persistent_memory_claim()
361 vunmap(wc->memory_map - ((size_t)wc->start_sector << SECTOR_SHIFT)); in persistent_memory_release()
407 ((sector_t)e->index << (wc->block_size_bits - SECTOR_SHIFT)); in cache_sector()
516 region.sector = (sector_t)i * (BITMAP_GRANULARITY >> SECTOR_SHIFT); in ssd_commit_flushed()
517 region.count = (sector_t)(j - i) * (BITMAP_GRANULARITY >> SECTOR_SHIFT); in ssd_commit_flushed()
558 region.count = max(4096U, wc->block_size) >> SECTOR_SHIFT; in ssd_commit_superblock()
1015 (wc->metadata_sectors << SECTOR_SHIFT) - sb_entries_offset); in writecache_resume()
1338 if (next_boundary < bio->bi_iter.bi_size >> SECTOR_SHIFT) in writecache_map_remap_origin()
1359 dm_accept_partial_bio(bio, wc->block_size >> SECTOR_SHIFT); in writecache_map_read()
[all …]
Ddm-snap-persistent.c172 len = ps->store->chunk_size << SECTOR_SHIFT; in alloc_area()
294 memset(ps->area, 0, ps->store->chunk_size << SECTOR_SHIFT); in zero_memory_area()
385 memset(ps->header_area, 0, ps->store->chunk_size << SECTOR_SHIFT); in write_header()
496 ps->store->chunk_size << SECTOR_SHIFT, in read_exceptions()
541 memcpy(ps->area, area, ps->store->chunk_size << SECTOR_SHIFT); in read_exceptions()
622 ps->exceptions_per_area = (ps->store->chunk_size << SECTOR_SHIFT) / in persistent_read_metadata()
Ddm-bufio.c413 c->sectors_per_block_bits - (PAGE_SHIFT - SECTOR_SHIFT)); in alloc_buffer_data()
451 c->sectors_per_block_bits - (PAGE_SHIFT - SECTOR_SHIFT)); in free_buffer_data()
627 if (unlikely(b->c->sectors_per_block_bits < PAGE_SHIFT - SECTOR_SHIFT)) in use_bio()
642 len = n_sectors << SECTOR_SHIFT; in use_bio()
666 sector = block * (c->block_size >> SECTOR_SHIFT); in block_to_sector()
683 n_sectors = b->c->block_size >> SECTOR_SHIFT; in submit_io()
696 sector += offset >> SECTOR_SHIFT; in submit_io()
697 n_sectors = (end - offset) >> SECTOR_SHIFT; in submit_io()
1535 sector_div(s, c->block_size >> SECTOR_SHIFT); in dm_bufio_get_device_size()
1643 retain_bytes >>= c->sectors_per_block_bits + SECTOR_SHIFT; in get_retain_buffers()
[all …]
Ddm-verity-target.c680 ((1 << (v->data_dev_block_bits - SECTOR_SHIFT)) - 1)) { in verity_map()
686 (v->data_dev_block_bits - SECTOR_SHIFT) > v->data_blocks) { in verity_map()
697 io->block = bio->bi_iter.bi_sector >> (v->data_dev_block_bits - SECTOR_SHIFT); in verity_map()
1129 (sector_t)(num_ll << (v->data_dev_block_bits - SECTOR_SHIFT)) in verity_ctr()
1130 >> (v->data_dev_block_bits - SECTOR_SHIFT) != num_ll) { in verity_ctr()
1137 if (ti->len > (v->data_blocks << (v->data_dev_block_bits - SECTOR_SHIFT))) { in verity_ctr()
1144 (sector_t)(num_ll << (v->hash_dev_block_bits - SECTOR_SHIFT)) in verity_ctr()
1145 >> (v->hash_dev_block_bits - SECTOR_SHIFT) != num_ll) { in verity_ctr()
Ddm-clone-metadata.h22 #define DM_CLONE_METADATA_MAX_SECTORS_WARNING (16 * (1024 * 1024 * 1024 >> SECTOR_SHIFT))
/linux-5.19.10/include/linux/
Dblk_types.h29 #ifndef SECTOR_SHIFT
30 #define SECTOR_SHIFT 9 macro
33 #define SECTOR_SIZE (1 << SECTOR_SHIFT)
36 #define PAGE_SECTORS_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)
313 #define BIO_MAX_SECTORS (UINT_MAX >> SECTOR_SHIFT)
Dt10-pi.h48 return blk_rq_pos(rq) >> (shift - SECTOR_SHIFT) & 0xffffffff; in t10_pi_ref_tag()
79 return lower_48_bits(blk_rq_pos(rq) >> (shift - SECTOR_SHIFT)); in ext_pi_ref_tag()
Dblkdev.h799 return (loff_t)bdev_nr_sectors(bdev) << SECTOR_SHIFT; in bdev_nr_bytes()
810 (sb->s_blocksize_bits - SECTOR_SHIFT); in sb_bdev_nr_blocks()
924 UINT_MAX >> SECTOR_SHIFT); in blk_queue_get_max_sectors()
1126 SECTOR_SHIFT), in sb_issue_discard()
1128 SECTOR_SHIFT), in sb_issue_discard()
1136 SECTOR_SHIFT), in sb_issue_zeroout()
1138 SECTOR_SHIFT), in sb_issue_zeroout()
/linux-5.19.10/drivers/block/zram/
Dzram_drv.h24 #define SECTORS_PER_PAGE_SHIFT (PAGE_SHIFT - SECTOR_SHIFT)
29 (1 << (ZRAM_LOGICAL_BLOCK_SHIFT - SECTOR_SHIFT))
/linux-5.19.10/drivers/nvdimm/
Dpmem.c55 return (offset - pmem->data_offset) >> SECTOR_SHIFT; in to_sect()
60 return (sector << SECTOR_SHIFT) + pmem->data_offset; in to_offset()
118 pmem_clear_bb(pmem, to_sect(pmem, offset), cleared >> SECTOR_SHIFT); in pmem_clear_poison()
269 sector_t sector = PFN_PHYS(pgoff) >> SECTOR_SHIFT; in __pmem_direct_access()
270 unsigned int num = PFN_PHYS(nr_pages) >> SECTOR_SHIFT; in __pmem_direct_access()
293 PAGE_ALIGN((first_bad - sector) << SECTOR_SHIFT)); in __pmem_direct_access()
322 PFN_PHYS(pgoff) >> SECTOR_SHIFT, in pmem_dax_zero_page_range()
359 if (!is_bad_pmem(&pmem->bb, PFN_PHYS(pgoff) >> SECTOR_SHIFT, len)) in pmem_recovery_write()
385 pmem_clear_bb(pmem, to_sect(pmem, pmem_off), cleared >> SECTOR_SHIFT); in pmem_recovery_write()
/linux-5.19.10/arch/xtensa/platforms/iss/
Dsimdisk.c73 unsigned long offset = sector << SECTOR_SHIFT; in simdisk_transfer()
74 unsigned long nbytes = nsect << SECTOR_SHIFT; in simdisk_transfer()
112 unsigned len = bvec.bv_len >> SECTOR_SHIFT; in simdisk_submit_bio()
172 set_capacity(dev->gd, dev->size >> SECTOR_SHIFT); in simdisk_attach()
/linux-5.19.10/drivers/vdpa/vdpa_sim/
Dvdpa_sim_blk.c47 u64 range_sectors = range_size >> SECTOR_SHIFT; in vdpasim_blk_check_range()
111 offset = sector << SECTOR_SHIFT; in vdpasim_blk_handle_req()
272 dev_attr.buffer_size = VDPASIM_BLK_CAPACITY << SECTOR_SHIFT; in vdpasim_blk_dev_add()
/linux-5.19.10/drivers/md/persistent-data/
Ddm-space-map-metadata.h12 #define DM_SM_METADATA_BLOCK_SIZE (4096 >> SECTOR_SHIFT)
/linux-5.19.10/include/scsi/
Dscsi_cmnd.h224 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_get_lba()
231 unsigned int shift = ilog2(scmd->device->sector_size) - SECTOR_SHIFT; in scsi_logical_block_count()

1234