/drivers/block/drbd/ |
D | drbd_interval.c | 16 #define NODE_END(node) ((node)->sector + ((node)->size >> 9)) 28 sector_t this_end = this->sector + (this->size >> 9); in drbd_insert_interval() 39 if (this->sector < here->sector) in drbd_insert_interval() 41 else if (this->sector > here->sector) in drbd_insert_interval() 68 drbd_contains_interval(struct rb_root *root, sector_t sector, in drbd_contains_interval() argument 77 if (sector < here->sector) in drbd_contains_interval() 79 else if (sector > here->sector) in drbd_contains_interval() 112 drbd_find_overlap(struct rb_root *root, sector_t sector, unsigned int size) in drbd_find_overlap() argument 116 sector_t end = sector + (size >> 9); in drbd_find_overlap() 125 sector < interval_end(node->rb_left)) { in drbd_find_overlap() [all …]
|
D | drbd_actlog.c | 127 sector_t sector, int op) in _drbd_md_sync_page_io() argument 143 bio->bi_iter.bi_sector = sector; in _drbd_md_sync_page_io() 178 sector_t sector, int op) in drbd_md_sync_page_io() argument 187 (unsigned long long)sector, (op == REQ_OP_WRITE) ? "WRITE" : "READ", in drbd_md_sync_page_io() 190 if (sector < drbd_md_first_sector(bdev) || in drbd_md_sync_page_io() 191 sector + 7 > drbd_md_last_sector(bdev)) in drbd_md_sync_page_io() 194 (unsigned long long)sector, in drbd_md_sync_page_io() 197 err = _drbd_md_sync_page_io(device, bdev, sector, op); in drbd_md_sync_page_io() 200 (unsigned long long)sector, in drbd_md_sync_page_io() 245 unsigned first = i->sector >> (AL_EXTENT_SHIFT-9); in drbd_al_begin_io_fastpath() [all …]
|
D | drbd_worker.c | 127 drbd_set_out_of_sync(device, peer_req->i.sector, peer_req->i.size); in drbd_endio_write_sec_final() 157 drbd_rs_complete_io(device, i.sector); in drbd_endio_write_sec_final() 183 (unsigned long long)peer_req->i.sector); in drbd_peer_request_endio() 361 sector_t sector = peer_req->i.sector; in w_e_send_csum() local 372 err = drbd_send_drequest_csum(peer_device, sector, size, in w_e_send_csum() 392 static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector, int size) in read_for_csum() argument 402 peer_req = drbd_alloc_peer_req(peer_device, ID_SYNCER /* unused */, sector, in read_for_csum() 593 sector_t sector; in make_resync_request() local 659 sector = BM_BIT_TO_SECT(bit); in make_resync_request() 661 if (drbd_try_rs_begin_io(device, sector)) { in make_resync_request() [all …]
|
D | drbd_interval.h | 10 sector_t sector; /* start sector of the interval */ member 38 #define drbd_for_each_overlap(i, root, sector, size) \ argument 39 for (i = drbd_find_overlap(root, sector, size); \ 41 i = drbd_next_overlap(i, sector, size))
|
D | drbd_receiver.c | 359 drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in drbd_alloc_peer_req() argument 388 peer_req->i.sector = sector; in drbd_alloc_peer_req() 1602 if (drbd_issue_discard_or_zero_out(device, peer_req->i.sector, in drbd_issue_peer_discard_or_zero_out() 1612 sector_t s = peer_req->i.sector; in drbd_issue_peer_wsame() 1645 sector_t sector = peer_req->i.sector; in drbd_submit_peer_request() local 1696 bio->bi_iter.bi_sector = sector; in drbd_submit_peer_request() 1711 sector += len >> 9; in drbd_submit_peer_request() 1859 read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in read_in_block() argument 1922 if (sector + (ds>>9) > capacity) { in read_in_block() 1926 (unsigned long long)sector, ds); in read_in_block() [all …]
|
/drivers/block/ |
D | brd.c | 56 static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector) in brd_lookup_page() argument 73 idx = sector >> PAGE_SECTORS_SHIFT; /* sector to page index */ in brd_lookup_page() 85 static int brd_insert_page(struct brd_device *brd, sector_t sector) in brd_insert_page() argument 91 page = brd_lookup_page(brd, sector); in brd_insert_page() 110 idx = sector >> PAGE_SECTORS_SHIFT; in brd_insert_page() 170 static int copy_to_brd_setup(struct brd_device *brd, sector_t sector, size_t n) in copy_to_brd_setup() argument 172 unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; in copy_to_brd_setup() 177 ret = brd_insert_page(brd, sector); in copy_to_brd_setup() 181 sector += copy >> SECTOR_SHIFT; in copy_to_brd_setup() 182 ret = brd_insert_page(brd, sector); in copy_to_brd_setup() [all …]
|
/drivers/block/null_blk/ |
D | zoned.c | 19 sector_t sector = 0; in null_init_zoned_dev() local 93 zone->start = sector; in null_init_zoned_dev() 100 sector += dev->zone_size_sects; in null_init_zoned_dev() 106 zone->start = zone->wp = sector; in null_init_zoned_dev() 116 sector += dev->zone_size_sects; in null_init_zoned_dev() 170 int null_report_zones(struct gendisk *disk, sector_t sector, in null_report_zones() argument 179 first_zone = null_zone_no(dev, sector); in null_report_zones() 211 sector_t sector, unsigned int len) in null_zone_valid_read_len() argument 214 struct blk_zone *zone = &dev->zones[null_zone_no(dev, sector)]; in null_zone_valid_read_len() 219 sector + nr_sectors <= zone->wp) in null_zone_valid_read_len() [all …]
|
D | main.c | 758 static void null_free_sector(struct nullb *nullb, sector_t sector, in null_free_sector() argument 767 idx = sector >> PAGE_SECTORS_SHIFT; in null_free_sector() 768 sector_bit = (sector & SECTOR_MASK); in null_free_sector() 831 sector_t sector, bool for_write, bool is_cache) in __null_lookup_page() argument 838 idx = sector >> PAGE_SECTORS_SHIFT; in __null_lookup_page() 839 sector_bit = (sector & SECTOR_MASK); in __null_lookup_page() 852 sector_t sector, bool for_write, bool ignore_cache) in null_lookup_page() argument 857 page = __null_lookup_page(nullb, sector, for_write, true); in null_lookup_page() 860 return __null_lookup_page(nullb, sector, for_write, false); in null_lookup_page() 864 sector_t sector, bool ignore_cache) in null_insert_page() argument [all …]
|
D | null_blk.h | 98 enum req_opf op, sector_t sector, 105 int null_report_zones(struct gendisk *disk, sector_t sector, 108 enum req_opf op, sector_t sector, 111 sector_t sector, unsigned int len); 125 enum req_opf op, sector_t sector, sector_t nr_sectors) in null_process_zoned_cmd() argument 130 sector_t sector, in null_zone_valid_read_len() argument
|
/drivers/scsi/ |
D | sr_vendor.c | 174 unsigned long sector; in sr_cd_check() local 186 sector = 0; /* the multisession sector offset goes here */ in sr_cd_check() 212 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check() 216 sector = 0; in sr_cd_check() 243 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check() 271 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check() 272 if (sector) in sr_cd_check() 273 sector -= CD_MSF_OFFSET; in sr_cd_check() 309 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check() 318 sector = 0; in sr_cd_check() [all …]
|
/drivers/md/ |
D | dm-bow.c | 50 sector_t sector; member 100 ->sector; in range_top() 105 return (range_top(br) - br->sector) * SECTOR_SIZE; in range_size() 126 if (br->sector <= bi_iter->bi_sector in find_first_overlapping_range() 130 if (bi_iter->bi_sector < br->sector) in find_first_overlapping_range() 176 if (bi_iter->bi_sector < (*br)->sector) { in split_range() 181 if (bi_iter->bi_sector > (*br)->sector) { in split_range() 193 (*br)->sector = bi_iter->bi_sector; in split_range() 197 bi_iter->bi_size = (range_top(*br) - (*br)->sector) in split_range() 207 new_br->sector = (*br)->sector; in split_range() [all …]
|
D | dm-log-writes.c | 96 __le64 sector; member 125 sector_t sector; member 213 sector_t sector) in write_metadata() argument 226 bio->bi_iter.bi_sector = sector; in write_metadata() 228 bio->bi_end_io = (sector == WRITE_LOG_SUPER_SECTOR) ? in write_metadata() 265 sector_t sector) in write_inline_data() argument 285 bio->bi_iter.bi_sector = sector; in write_inline_data() 319 sector += bio_pages * PAGE_SECTORS; in write_inline_data() 331 struct pending_block *block, sector_t sector) in log_one_block() argument 338 entry.sector = cpu_to_le64(block->sector); in log_one_block() [all …]
|
D | dm-linear.c | 143 sector_t sector = linear_map_sector(ti, args->next_sector); in linear_report_zones() local 146 return blkdev_report_zones(lc->dev->bdev, sector, nr_zones, in linear_report_zones() 167 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in linear_dax_direct_access() local 169 dev_sector = linear_map_sector(ti, sector); in linear_dax_direct_access() 182 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in linear_dax_copy_from_iter() local 184 dev_sector = linear_map_sector(ti, sector); in linear_dax_copy_from_iter() 196 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in linear_dax_copy_to_iter() local 198 dev_sector = linear_map_sector(ti, sector); in linear_dax_copy_to_iter() 211 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in linear_dax_zero_page_range() local 213 dev_sector = linear_map_sector(ti, sector); in linear_dax_zero_page_range()
|
D | dm-stripe.c | 203 static void stripe_map_sector(struct stripe_c *sc, sector_t sector, in stripe_map_sector() argument 206 sector_t chunk = dm_target_offset(sc->ti, sector); in stripe_map_sector() 231 static void stripe_map_range_sector(struct stripe_c *sc, sector_t sector, in stripe_map_range_sector() argument 236 stripe_map_sector(sc, sector, &stripe, result); in stripe_map_range_sector() 241 sector = *result; in stripe_map_range_sector() 243 *result -= sector_div(sector, sc->chunk_size); in stripe_map_range_sector() 245 *result = sector & ~(sector_t)(sc->chunk_size - 1); in stripe_map_range_sector() 307 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in stripe_dax_direct_access() local 314 stripe_map_sector(sc, sector, &stripe, &dev_sector); in stripe_dax_direct_access() 328 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in stripe_dax_copy_from_iter() local [all …]
|
D | raid0.c | 309 sector_t sector = *sectorp; in find_zone() local 312 if (sector < z[i].zone_end) { in find_zone() 314 *sectorp = sector - z[i-1].zone_end; in find_zone() 325 sector_t sector, sector_t *sector_offset) in map_sector() argument 336 sect_in_chunk = sector & (chunk_sects - 1); in map_sector() 337 sector >>= chunksect_bits; in map_sector() 343 sect_in_chunk = sector_div(sector, chunk_sects); in map_sector() 354 + sector_div(sector, zone->nb_dev)]; in map_sector() 572 sector_t sector; in raid0_make_request() local 587 sector = bio_sector; in raid0_make_request() [all …]
|
D | raid5-ppl.c | 166 pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); in ops_run_partial_parity() 276 pr_debug("%s: stripe: %llu\n", __func__, (unsigned long long)sh->sector); in ppl_log_stripe() 302 if (!data_disks || dev->sector < data_sector) in ppl_log_stripe() 303 data_sector = dev->sector; in ppl_log_stripe() 327 if ((sh->sector == sh_last->sector + RAID5_STRIPE_SECTORS(conf)) && in ppl_log_stripe() 462 log->rdev->ppl.sector + log->rdev->ppl.size - log->next_io_sector < in ppl_submit_iounit() 464 log->next_io_sector = log->rdev->ppl.sector; in ppl_submit_iounit() 869 sector_t sector; in ppl_recover_entry() local 888 sector = raid5_compute_sector(conf, r_sector, 0, in ppl_recover_entry() 893 (unsigned long long)sector); in ppl_recover_entry() [all …]
|
D | raid5.c | 416 (unsigned long long)sh->sector); in remove_hash() 423 struct hlist_head *hp = stripe_hash(conf, sh->sector); in insert_hash() 426 (unsigned long long)sh->sector); in insert_hash() 565 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) in init_stripe() argument 576 (unsigned long long)sector); in init_stripe() 581 sh->sector = sector; in init_stripe() 582 stripe_set_idx(sector, conf, previous, sh); in init_stripe() 591 (unsigned long long)sh->sector, i, dev->toread, in init_stripe() 597 dev->sector = raid5_compute_blocknr(sh, i, previous); in init_stripe() 607 static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector, in __find_stripe() argument [all …]
|
/drivers/usb/storage/ |
D | jumpshot.c | 155 u32 sector, in jumpshot_read_data() argument 171 if (sector > 0x0FFFFFFF) in jumpshot_read_data() 193 command[2] = sector & 0xFF; in jumpshot_read_data() 194 command[3] = (sector >> 8) & 0xFF; in jumpshot_read_data() 195 command[4] = (sector >> 16) & 0xFF; in jumpshot_read_data() 197 command[5] = 0xE0 | ((sector >> 24) & 0x0F); in jumpshot_read_data() 217 sector += thistime; in jumpshot_read_data() 232 u32 sector, in jumpshot_write_data() argument 248 if (sector > 0x0FFFFFFF) in jumpshot_write_data() 275 command[2] = sector & 0xFF; in jumpshot_write_data() [all …]
|
D | datafab.c | 137 u32 sector, in datafab_read_data() argument 182 command[2] = sector & 0xFF; in datafab_read_data() 183 command[3] = (sector >> 8) & 0xFF; in datafab_read_data() 184 command[4] = (sector >> 16) & 0xFF; in datafab_read_data() 187 command[5] |= (sector >> 24) & 0x0F; in datafab_read_data() 205 sector += thistime; in datafab_read_data() 220 u32 sector, in datafab_write_data() argument 270 command[2] = sector & 0xFF; in datafab_write_data() 271 command[3] = (sector >> 8) & 0xFF; in datafab_write_data() 272 command[4] = (sector >> 16) & 0xFF; in datafab_write_data() [all …]
|
D | shuttle_usbat.c | 200 u32 sector, unsigned char cmd) in usbat_pack_ata_sector_cmd() argument 204 buf[2] = sector & 0xFF; in usbat_pack_ata_sector_cmd() 205 buf[3] = (sector >> 8) & 0xFF; in usbat_pack_ata_sector_cmd() 206 buf[4] = (sector >> 16) & 0xFF; in usbat_pack_ata_sector_cmd() 207 buf[5] = 0xE0 | ((sector >> 24) & 0x0F); in usbat_pack_ata_sector_cmd() 1109 u32 sector, in usbat_flash_read_data() argument 1140 if (sector > 0x0FFFFFFF) in usbat_flash_read_data() 1165 usbat_pack_ata_sector_cmd(command, thistime, sector, 0x20); in usbat_flash_read_data() 1183 sector += thistime; in usbat_flash_read_data() 1200 u32 sector, in usbat_flash_write_data() argument [all …]
|
/drivers/char/ |
D | ps3flash.c | 98 u64 size, sector, offset; in ps3flash_read() local 118 sector = *pos / dev->bounce_size * priv->chunk_sectors; in ps3flash_read() 128 res = ps3flash_fetch(dev, sector); in ps3flash_read() 151 sector += priv->chunk_sectors; in ps3flash_read() 167 u64 size, sector, offset; in ps3flash_write() local 187 sector = *pos / dev->bounce_size * priv->chunk_sectors; in ps3flash_write() 198 res = ps3flash_fetch(dev, sector); in ps3flash_write() 199 else if (sector != priv->tag) in ps3flash_write() 219 priv->tag = sector; in ps3flash_write() 226 sector += priv->chunk_sectors; in ps3flash_write()
|
/drivers/nvdimm/ |
D | pmem.c | 75 sector_t sector; in pmem_clear_poison() local 79 sector = (offset - pmem->data_offset) / 512; in pmem_clear_poison() 88 (unsigned long long) sector, cleared, in pmem_clear_poison() 90 badblocks_clear(&pmem->bb, sector, cleared); in pmem_clear_poison() 142 sector_t sector, unsigned int len) in pmem_do_read() argument 145 phys_addr_t pmem_off = sector * 512 + pmem->data_offset; in pmem_do_read() 148 if (unlikely(is_bad_pmem(&pmem->bb, sector, len))) in pmem_do_read() 158 sector_t sector, unsigned int len) in pmem_do_write() argument 162 phys_addr_t pmem_off = sector * 512 + pmem->data_offset; in pmem_do_write() 165 if (unlikely(is_bad_pmem(&pmem->bb, sector, len))) in pmem_do_write() [all …]
|
/drivers/mtd/nand/raw/ |
D | sh_flctl.c | 485 (struct sh_flctl *flctl, uint8_t *buff, int sector) in read_ecfiforeg() argument 491 res = wait_recfifo_ready(flctl , sector); in read_ecfiforeg() 625 int sector, page_sectors; in execmd_read_page_sector() local 641 for (sector = 0; sector < page_sectors; sector++) { in execmd_read_page_sector() 642 read_fiforeg(flctl, 512, 512 * sector); in execmd_read_page_sector() 645 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector() 646 sector); in execmd_read_page_sector() 696 int sector, page_sectors; in execmd_write_page_sector() local 709 for (sector = 0; sector < page_sectors; sector++) { in execmd_write_page_sector() 710 write_fiforeg(flctl, 512, 512 * sector); in execmd_write_page_sector() [all …]
|
/drivers/mtd/devices/ |
D | docg3.c | 418 static void doc_setup_addr_sector(struct docg3 *docg3, int sector) in doc_setup_addr_sector() argument 421 doc_flash_address(docg3, sector & 0xff); in doc_setup_addr_sector() 422 doc_flash_address(docg3, (sector >> 8) & 0xff); in doc_setup_addr_sector() 423 doc_flash_address(docg3, (sector >> 16) & 0xff); in doc_setup_addr_sector() 433 static void doc_setup_writeaddr_sector(struct docg3 *docg3, int sector, int ofs) in doc_setup_writeaddr_sector() argument 438 doc_flash_address(docg3, sector & 0xff); in doc_setup_writeaddr_sector() 439 doc_flash_address(docg3, (sector >> 8) & 0xff); in doc_setup_writeaddr_sector() 440 doc_flash_address(docg3, (sector >> 16) & 0xff); in doc_setup_writeaddr_sector() 459 int sector, ret = 0; in doc_read_seek() local 481 sector = (block0 << DOC_ADDR_BLOCK_SHIFT) + (page & DOC_ADDR_PAGE_MASK); in doc_read_seek() [all …]
|
/drivers/nvme/host/ |
D | zns.c | 169 static int nvme_ns_report_zones(struct nvme_ns *ns, sector_t sector, in nvme_ns_report_zones() argument 189 sector &= ~(ns->zsze - 1); in nvme_ns_report_zones() 190 while (zone_idx < nr_zones && sector < get_capacity(ns->disk)) { in nvme_ns_report_zones() 193 c.zmr.slba = cpu_to_le64(nvme_sect_to_lba(ns, sector)); in nvme_ns_report_zones() 213 sector += ns->zsze * nz; in nvme_ns_report_zones() 225 int nvme_report_zones(struct gendisk *disk, sector_t sector, in nvme_report_zones() argument 237 ret = nvme_ns_report_zones(ns, sector, nr_zones, cb, data); in nvme_report_zones()
|