Home
last modified time | relevance | path

Searched refs:sector (Results 1 – 25 of 102) sorted by relevance

12345

/drivers/block/drbd/
Ddrbd_interval.c26 sector_t max = node->sector + (node->size >> 9); in compute_subtree_last()
51 sector_t this_end = this->sector + (this->size >> 9); in drbd_insert_interval()
62 if (this->sector < here->sector) in drbd_insert_interval()
64 else if (this->sector > here->sector) in drbd_insert_interval()
91 drbd_contains_interval(struct rb_root *root, sector_t sector, in drbd_contains_interval() argument
100 if (sector < here->sector) in drbd_contains_interval()
102 else if (sector > here->sector) in drbd_contains_interval()
135 drbd_find_overlap(struct rb_root *root, sector_t sector, unsigned int size) in drbd_find_overlap() argument
139 sector_t end = sector + (size >> 9); in drbd_find_overlap()
148 sector < interval_end(node->rb_left)) { in drbd_find_overlap()
[all …]
Ddrbd_actlog.c139 sector_t sector, int op) in _drbd_md_sync_page_io() argument
155 bio->bi_iter.bi_sector = sector; in _drbd_md_sync_page_io()
190 sector_t sector, int op) in drbd_md_sync_page_io() argument
199 (unsigned long long)sector, (op == REQ_OP_WRITE) ? "WRITE" : "READ", in drbd_md_sync_page_io()
202 if (sector < drbd_md_first_sector(bdev) || in drbd_md_sync_page_io()
203 sector + 7 > drbd_md_last_sector(bdev)) in drbd_md_sync_page_io()
206 (unsigned long long)sector, in drbd_md_sync_page_io()
209 err = _drbd_md_sync_page_io(device, bdev, sector, op); in drbd_md_sync_page_io()
212 (unsigned long long)sector, in drbd_md_sync_page_io()
257 unsigned first = i->sector >> (AL_EXTENT_SHIFT-9); in drbd_al_begin_io_fastpath()
[all …]
Ddrbd_worker.c138 drbd_set_out_of_sync(device, peer_req->i.sector, peer_req->i.size); in drbd_endio_write_sec_final()
168 drbd_rs_complete_io(device, i.sector); in drbd_endio_write_sec_final()
194 (unsigned long long)peer_req->i.sector); in drbd_peer_request_endio()
373 sector_t sector = peer_req->i.sector; in w_e_send_csum() local
384 err = drbd_send_drequest_csum(peer_device, sector, size, in w_e_send_csum()
404 static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector, int size) in read_for_csum() argument
414 peer_req = drbd_alloc_peer_req(peer_device, ID_SYNCER /* unused */, sector, in read_for_csum()
605 sector_t sector; in make_resync_request() local
671 sector = BM_BIT_TO_SECT(bit); in make_resync_request()
673 if (drbd_try_rs_begin_io(device, sector)) { in make_resync_request()
[all …]
Ddrbd_receiver.c370 drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in drbd_alloc_peer_req() argument
399 peer_req->i.sector = sector; in drbd_alloc_peer_req()
1496 if (blkdev_issue_zeroout(bdev, peer_req->i.sector, peer_req->i.size >> 9, in drbd_issue_peer_discard()
1507 sector_t s = peer_req->i.sector; in drbd_issue_peer_wsame()
1540 sector_t sector = peer_req->i.sector; in drbd_submit_peer_request() local
1591 bio->bi_iter.bi_sector = sector; in drbd_submit_peer_request()
1606 sector += len >> 9; in drbd_submit_peer_request()
1754 read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in read_in_block() argument
1812 if (sector + (ds>>9) > capacity) { in read_in_block()
1816 (unsigned long long)sector, ds); in read_in_block()
[all …]
Ddrbd_interval.h10 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))
/drivers/block/
Dbrd.c64 static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector) in brd_lookup_page() argument
81 idx = sector >> PAGE_SECTORS_SHIFT; /* sector to page index */ in brd_lookup_page()
95 static struct page *brd_insert_page(struct brd_device *brd, sector_t sector) in brd_insert_page() argument
101 page = brd_lookup_page(brd, sector); in brd_insert_page()
128 idx = sector >> PAGE_SECTORS_SHIFT; in brd_insert_page()
183 static int copy_to_brd_setup(struct brd_device *brd, sector_t sector, size_t n) in copy_to_brd_setup() argument
185 unsigned int offset = (sector & (PAGE_SECTORS-1)) << SECTOR_SHIFT; in copy_to_brd_setup()
189 if (!brd_insert_page(brd, sector)) in copy_to_brd_setup()
192 sector += copy >> SECTOR_SHIFT; in copy_to_brd_setup()
193 if (!brd_insert_page(brd, sector)) in copy_to_brd_setup()
[all …]
Dnull_blk.c753 static void null_free_sector(struct nullb *nullb, sector_t sector, in null_free_sector() argument
762 idx = sector >> PAGE_SECTORS_SHIFT; in null_free_sector()
763 sector_bit = (sector & SECTOR_MASK); in null_free_sector()
826 sector_t sector, bool for_write, bool is_cache) in __null_lookup_page() argument
833 idx = sector >> PAGE_SECTORS_SHIFT; in __null_lookup_page()
834 sector_bit = (sector & SECTOR_MASK); in __null_lookup_page()
847 sector_t sector, bool for_write, bool ignore_cache) in null_lookup_page() argument
852 page = __null_lookup_page(nullb, sector, for_write, true); in null_lookup_page()
855 return __null_lookup_page(nullb, sector, for_write, false); in null_lookup_page()
859 sector_t sector, bool ignore_cache) in null_insert_page() argument
[all …]
/drivers/scsi/
Dsr_vendor.c162 unsigned long sector; in sr_cd_check() local
174 sector = 0; /* the multisession sector offset goes here */ in sr_cd_check()
200 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check()
204 sector = 0; in sr_cd_check()
232 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check()
260 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check()
261 if (sector) in sr_cd_check()
262 sector -= CD_MSF_OFFSET; in sr_cd_check()
298 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check()
308 sector = 0; in sr_cd_check()
[all …]
Dsd_zbc.c130 sector_t lba, sector = blk_rq_pos(rq); in sd_zbc_setup_report_cmnd() local
148 lba = sectors_to_logical(sdkp->device, sector); in sd_zbc_setup_report_cmnd()
229 sector_t sector) in sd_zbc_zone_no() argument
231 return sectors_to_logical(sdkp->device, sector) >> sdkp->zone_shift; in sd_zbc_zone_no()
238 sector_t sector = blk_rq_pos(rq); in sd_zbc_setup_reset_cmnd() local
239 sector_t block = sectors_to_logical(sdkp->device, sector); in sd_zbc_setup_reset_cmnd()
248 if (sector & (sd_zbc_zone_sectors(sdkp) - 1)) in sd_zbc_setup_reset_cmnd()
270 sector_t sector = blk_rq_pos(rq); in sd_zbc_write_lock_zone() local
272 unsigned int zno = sd_zbc_zone_no(sdkp, sector); in sd_zbc_write_lock_zone()
281 (sector & (zone_sectors - 1)) + blk_rq_sectors(rq) > zone_sectors) in sd_zbc_write_lock_zone()
/drivers/md/
Ddm-bow.c51 sector_t sector; member
101 ->sector; in range_top()
106 return (range_top(br) - br->sector) * SECTOR_SIZE; in range_size()
127 if (br->sector <= bi_iter->bi_sector in find_first_overlapping_range()
131 if (bi_iter->bi_sector < br->sector) in find_first_overlapping_range()
177 if (bi_iter->bi_sector < (*br)->sector) { in split_range()
182 if (bi_iter->bi_sector > (*br)->sector) { in split_range()
194 (*br)->sector = bi_iter->bi_sector; in split_range()
198 bi_iter->bi_size = (range_top(*br) - (*br)->sector) in split_range()
208 new_br->sector = (*br)->sector; in split_range()
[all …]
Draid0.c313 sector_t sector = *sectorp; in find_zone() local
316 if (sector < z[i].zone_end) { in find_zone()
318 *sectorp = sector - z[i-1].zone_end; in find_zone()
329 sector_t sector, sector_t *sector_offset) in map_sector() argument
340 sect_in_chunk = sector & (chunk_sects - 1); in map_sector()
341 sector >>= chunksect_bits; in map_sector()
347 sect_in_chunk = sector_div(sector, chunk_sects); in map_sector()
358 + sector_div(sector, zone->nb_dev)]; in map_sector()
473 sector_t sector = bio->bi_iter.bi_sector; in is_io_in_chunk_boundary() local
474 return chunk_sects >= (sector_div(sector, chunk_sects) in is_io_in_chunk_boundary()
[all …]
Draid5-ppl.c165 pr_debug("%s: stripe %llu\n", __func__, (unsigned long long)sh->sector); in ops_run_partial_parity()
275 pr_debug("%s: stripe: %llu\n", __func__, (unsigned long long)sh->sector); in ppl_log_stripe()
301 if (!data_disks || dev->sector < data_sector) in ppl_log_stripe()
302 data_sector = dev->sector; in ppl_log_stripe()
326 if ((sh->sector == sh_last->sector + STRIPE_SECTORS) && in ppl_log_stripe()
461 log->rdev->ppl.sector + log->rdev->ppl.size - log->next_io_sector < in ppl_submit_iounit()
463 log->next_io_sector = log->rdev->ppl.sector; in ppl_submit_iounit()
734 sector_t sector; in ppl_recover_entry() local
753 sector = raid5_compute_sector(conf, r_sector, 0, in ppl_recover_entry()
758 (unsigned long long)sector); in ppl_recover_entry()
[all …]
Ddm-log-writes.c93 __le64 sector; member
122 sector_t sector; member
210 sector_t sector) in write_metadata() argument
223 bio->bi_iter.bi_sector = sector; in write_metadata()
225 bio->bi_end_io = (sector == WRITE_LOG_SUPER_SECTOR) ? in write_metadata()
261 struct pending_block *block, sector_t sector) in log_one_block() argument
268 entry.sector = cpu_to_le64(block->sector); in log_one_block()
273 block->datalen, sector)) { in log_one_block()
280 sector += dev_to_bio_sectors(lc, 1); in log_one_block()
289 bio->bi_iter.bi_sector = sector; in log_one_block()
[all …]
Ddm-stripe.c215 static void stripe_map_sector(struct stripe_c *sc, sector_t sector, in stripe_map_sector() argument
218 sector_t chunk = dm_target_offset(sc->ti, sector); in stripe_map_sector()
243 static void stripe_map_range_sector(struct stripe_c *sc, sector_t sector, in stripe_map_range_sector() argument
248 stripe_map_sector(sc, sector, &stripe, result); in stripe_map_range_sector()
253 sector = *result; in stripe_map_range_sector()
255 *result -= sector_div(sector, sc->chunk_size); in stripe_map_range_sector()
257 *result = sector & ~(sector_t)(sc->chunk_size - 1); in stripe_map_range_sector()
317 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in stripe_dax_direct_access() local
324 stripe_map_sector(sc, sector, &stripe, &dev_sector); in stripe_dax_direct_access()
338 sector_t dev_sector, sector = pgoff * PAGE_SECTORS; in stripe_dax_copy_from_iter() local
[all …]
Draid5.c428 (unsigned long long)sh->sector); in remove_hash()
435 struct hlist_head *hp = stripe_hash(conf, sh->sector); in insert_hash()
438 (unsigned long long)sh->sector); in insert_hash()
500 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) in init_stripe() argument
511 (unsigned long long)sector); in init_stripe()
516 sh->sector = sector; in init_stripe()
517 stripe_set_idx(sector, conf, previous, sh); in init_stripe()
526 (unsigned long long)sh->sector, i, dev->toread, in init_stripe()
532 dev->sector = raid5_compute_blocknr(sh, i, previous); in init_stripe()
542 static struct stripe_head *__find_stripe(struct r5conf *conf, sector_t sector, in __find_stripe() argument
[all …]
Draid1.c231 sector_t sect = r1_bio->sector; in put_buf()
252 idx = sector_to_idx(r1_bio->sector); in reschedule_retry()
280 allow_barrier(conf, r1_bio->sector); in call_bio_endio()
307 r1_bio->sector + (r1_bio->sectors); in update_head_pos()
373 (unsigned long long)r1_bio->sector); in raid1_end_read_request()
389 bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector, in close_write()
482 if (is_badblock(rdev, r1_bio->sector, r1_bio->sectors, in raid1_end_write_request()
561 const sector_t this_sector = r1_bio->sector; in read_balance()
1152 r1_bio->sector = bio->bi_iter.bi_sector; in init_r1bio()
1225 (unsigned long long)r1_bio->sector); in raid1_read_request()
[all …]
Draid5.h205 sector_t sector; /* sector of this row */ member
257 sector_t sector; /* sector of this page */ member
481 static inline struct bio *r5_next_bio(struct bio *bio, sector_t sector) in r5_next_bio() argument
485 if (bio->bi_iter.bi_sector + sectors < sector + STRIPE_SECTORS) in r5_next_bio()
552 sector_t sector; /* stripe sector */ member
752 raid5_get_active_stripe(struct r5conf *conf, sector_t sector,
/drivers/nvme/target/
Dio-cmd.c48 sector_t sector; in nvmet_execute_rw() local
66 sector = le64_to_cpu(req->cmd->rw.slba); in nvmet_execute_rw()
67 sector <<= (req->ns->blksize_shift - 9); in nvmet_execute_rw()
72 bio->bi_iter.bi_sector = sector; in nvmet_execute_rw()
84 bio->bi_iter.bi_sector = sector; in nvmet_execute_rw()
91 sector += sg->length >> 9; in nvmet_execute_rw()
178 sector_t sector; in nvmet_execute_write_zeroes() local
181 sector = le64_to_cpu(write_zeroes->slba) << in nvmet_execute_write_zeroes()
186 if (__blkdev_issue_zeroout(req->ns->bdev, sector, nr_sector, in nvmet_execute_write_zeroes()
/drivers/usb/storage/
Djumpshot.c167 u32 sector, in jumpshot_read_data() argument
183 if (sector > 0x0FFFFFFF) in jumpshot_read_data()
205 command[2] = sector & 0xFF; in jumpshot_read_data()
206 command[3] = (sector >> 8) & 0xFF; in jumpshot_read_data()
207 command[4] = (sector >> 16) & 0xFF; in jumpshot_read_data()
209 command[5] = 0xE0 | ((sector >> 24) & 0x0F); in jumpshot_read_data()
229 sector += thistime; in jumpshot_read_data()
244 u32 sector, in jumpshot_write_data() argument
260 if (sector > 0x0FFFFFFF) in jumpshot_write_data()
287 command[2] = sector & 0xFF; in jumpshot_write_data()
[all …]
Ddatafab.c149 u32 sector, in datafab_read_data() argument
194 command[2] = sector & 0xFF; in datafab_read_data()
195 command[3] = (sector >> 8) & 0xFF; in datafab_read_data()
196 command[4] = (sector >> 16) & 0xFF; in datafab_read_data()
199 command[5] |= (sector >> 24) & 0x0F; in datafab_read_data()
217 sector += thistime; in datafab_read_data()
232 u32 sector, in datafab_write_data() argument
282 command[2] = sector & 0xFF; in datafab_write_data()
283 command[3] = (sector >> 8) & 0xFF; in datafab_write_data()
284 command[4] = (sector >> 16) & 0xFF; in datafab_write_data()
[all …]
Dshuttle_usbat.c212 u32 sector, unsigned char cmd) in usbat_pack_ata_sector_cmd() argument
216 buf[2] = sector & 0xFF; in usbat_pack_ata_sector_cmd()
217 buf[3] = (sector >> 8) & 0xFF; in usbat_pack_ata_sector_cmd()
218 buf[4] = (sector >> 16) & 0xFF; in usbat_pack_ata_sector_cmd()
219 buf[5] = 0xE0 | ((sector >> 24) & 0x0F); in usbat_pack_ata_sector_cmd()
1121 u32 sector, in usbat_flash_read_data() argument
1152 if (sector > 0x0FFFFFFF) in usbat_flash_read_data()
1177 usbat_pack_ata_sector_cmd(command, thistime, sector, 0x20); in usbat_flash_read_data()
1195 sector += thistime; in usbat_flash_read_data()
1212 u32 sector, in usbat_flash_write_data() argument
[all …]
/drivers/char/
Dps3flash.c110 u64 size, sector, offset; in ps3flash_read() local
130 sector = *pos / dev->bounce_size * priv->chunk_sectors; in ps3flash_read()
140 res = ps3flash_fetch(dev, sector); in ps3flash_read()
163 sector += priv->chunk_sectors; in ps3flash_read()
179 u64 size, sector, offset; in ps3flash_write() local
199 sector = *pos / dev->bounce_size * priv->chunk_sectors; in ps3flash_write()
210 res = ps3flash_fetch(dev, sector); in ps3flash_write()
211 else if (sector != priv->tag) in ps3flash_write()
231 priv->tag = sector; in ps3flash_write()
238 sector += priv->chunk_sectors; in ps3flash_write()
/drivers/mtd/nand/
Dsh_flctl.c498 (struct sh_flctl *flctl, uint8_t *buff, int sector) in read_ecfiforeg() argument
504 res = wait_recfifo_ready(flctl , sector); in read_ecfiforeg()
635 int sector, page_sectors; in execmd_read_page_sector() local
651 for (sector = 0; sector < page_sectors; sector++) { in execmd_read_page_sector()
652 read_fiforeg(flctl, 512, 512 * sector); in execmd_read_page_sector()
655 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector()
656 sector); in execmd_read_page_sector()
706 int sector, page_sectors; in execmd_write_page_sector() local
719 for (sector = 0; sector < page_sectors; sector++) { in execmd_write_page_sector()
720 write_fiforeg(flctl, 512, 512 * sector); in execmd_write_page_sector()
[all …]
/drivers/mtd/devices/
Ddocg3.c432 static void doc_setup_addr_sector(struct docg3 *docg3, int sector) in doc_setup_addr_sector() argument
435 doc_flash_address(docg3, sector & 0xff); in doc_setup_addr_sector()
436 doc_flash_address(docg3, (sector >> 8) & 0xff); in doc_setup_addr_sector()
437 doc_flash_address(docg3, (sector >> 16) & 0xff); in doc_setup_addr_sector()
447 static void doc_setup_writeaddr_sector(struct docg3 *docg3, int sector, int ofs) in doc_setup_writeaddr_sector() argument
452 doc_flash_address(docg3, sector & 0xff); in doc_setup_writeaddr_sector()
453 doc_flash_address(docg3, (sector >> 8) & 0xff); in doc_setup_writeaddr_sector()
454 doc_flash_address(docg3, (sector >> 16) & 0xff); in doc_setup_writeaddr_sector()
473 int sector, ret = 0; in doc_read_seek() local
495 sector = (block0 << DOC_ADDR_BLOCK_SHIFT) + (page & DOC_ADDR_PAGE_MASK); in doc_read_seek()
[all …]
/drivers/mtd/
Drfd_ftl.c90 static int rfd_ftl_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf);
241 static int rfd_ftl_readsect(struct mtd_blktrans_dev *dev, u_long sector, char *buf) in rfd_ftl_readsect() argument
248 if (sector >= part->sector_count) in rfd_ftl_readsect()
251 addr = part->sector_map[sector]; in rfd_ftl_readsect()
639 static int do_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf, ulong *old_addr) in do_writesect() argument
680 part->sector_map[sector] = addr; in do_writesect()
682 entry = cpu_to_le16(sector == 0 ? SECTOR_ZERO : sector); in do_writesect()
705 static int rfd_ftl_writesect(struct mtd_blktrans_dev *dev, u_long sector, char *buf) in rfd_ftl_writesect() argument
712 pr_debug("rfd_ftl_writesect(sector=0x%lx)\n", sector); in rfd_ftl_writesect()
719 if (sector >= part->sector_count) { in rfd_ftl_writesect()
[all …]

12345