Home
last modified time | relevance | path

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

1234

/drivers/block/drbd/
Ddrbd_interval.c25 sector_t max = node->sector + (node->size >> 9); in compute_subtree_last()
50 sector_t this_end = this->sector + (this->size >> 9); in drbd_insert_interval()
61 if (this->sector < here->sector) in drbd_insert_interval()
63 else if (this->sector > here->sector) in drbd_insert_interval()
90 drbd_contains_interval(struct rb_root *root, sector_t sector, in drbd_contains_interval() argument
99 if (sector < here->sector) in drbd_contains_interval()
101 else if (sector > here->sector) in drbd_contains_interval()
134 drbd_find_overlap(struct rb_root *root, sector_t sector, unsigned int size) in drbd_find_overlap() argument
138 sector_t end = sector + (size >> 9); in drbd_find_overlap()
147 sector < interval_end(node->rb_left)) { in drbd_find_overlap()
[all …]
Ddrbd_actlog.c140 sector_t sector, int rw) in _drbd_md_sync_page_io() argument
156 bio->bi_iter.bi_sector = sector; in _drbd_md_sync_page_io()
191 sector_t sector, int rw) in drbd_md_sync_page_io() argument
200 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ", in drbd_md_sync_page_io()
203 if (sector < drbd_md_first_sector(bdev) || in drbd_md_sync_page_io()
204 sector + 7 > drbd_md_last_sector(bdev)) in drbd_md_sync_page_io()
207 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ"); in drbd_md_sync_page_io()
209 err = _drbd_md_sync_page_io(device, bdev, sector, rw); in drbd_md_sync_page_io()
212 (unsigned long long)sector, (rw & WRITE) ? "WRITE" : "READ", err); in drbd_md_sync_page_io()
256 unsigned first = i->sector >> (AL_EXTENT_SHIFT-9); in drbd_al_begin_io_fastpath()
[all …]
Ddrbd_worker.c158 drbd_rs_complete_io(device, i.sector); in drbd_endio_write_sec_final()
185 (unsigned long long)peer_req->i.sector); in drbd_peer_request_endio()
190 (unsigned long long)peer_req->i.sector); in drbd_peer_request_endio()
360 sector_t sector = peer_req->i.sector; in w_e_send_csum() local
371 err = drbd_send_drequest_csum(peer_device, sector, size, in w_e_send_csum()
391 static int read_for_csum(struct drbd_peer_device *peer_device, sector_t sector, int size) in read_for_csum() argument
401 peer_req = drbd_alloc_peer_req(peer_device, ID_SYNCER /* unused */, sector, in read_for_csum()
591 sector_t sector; in make_resync_request() local
650 sector = BM_BIT_TO_SECT(bit); in make_resync_request()
652 if (drbd_try_rs_begin_io(device, sector)) { in make_resync_request()
[all …]
Ddrbd_receiver.c341 drbd_alloc_peer_req(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in drbd_alloc_peer_req() argument
369 peer_req->i.sector = sector; in drbd_alloc_peer_req()
1373 sector_t sector = peer_req->i.sector; in drbd_submit_peer_request() local
1391 sector, data_size >> 9, GFP_NOIO)) in drbd_submit_peer_request()
1418 bio->bi_iter.bi_sector = sector; in drbd_submit_peer_request()
1450 sector += len >> 9; in drbd_submit_peer_request()
1587 read_in_block(struct drbd_peer_device *peer_device, u64 id, sector_t sector, in read_in_block() argument
1627 if (sector + (data_size>>9) > capacity) { in read_in_block()
1631 (unsigned long long)sector, data_size); in read_in_block()
1638 peer_req = drbd_alloc_peer_req(peer_device, id, sector, data_size, trim == NULL, GFP_NOIO); in read_in_block()
[all …]
Ddrbd_interval.h9 sector_t sector; /* start sector of the interval */ member
37 #define drbd_for_each_overlap(i, root, sector, size) \ argument
38 for (i = drbd_find_overlap(root, sector, size); \
40 i = drbd_next_overlap(i, sector, size))
Ddrbd_req.c34 static bool drbd_may_do_local_read(struct drbd_device *device, sector_t sector, int size);
80 req->i.sector = bio_src->bi_iter.bi_sector; in drbd_req_new()
147 s, (unsigned long long)req->i.sector, req->i.size); in drbd_req_destroy()
166 drbd_set_out_of_sync(device, req->i.sector, req->i.size); in drbd_req_destroy()
169 drbd_set_in_sync(device, req->i.sector, req->i.size); in drbd_req_destroy()
189 (unsigned long long) req->i.sector, req->i.size); in drbd_req_destroy()
560 (unsigned long long)req->i.sector, in drbd_report_io_error()
654 drbd_set_out_of_sync(device, req->i.sector, req->i.size); in __req_mod()
924 static bool drbd_may_do_local_read(struct drbd_device *device, sector_t sector, int size) in drbd_may_do_local_read() argument
933 esector = sector + (size >> 9) - 1; in drbd_may_do_local_read()
[all …]
Ddrbd_protocol.h121 u64 sector; /* 64 bits sector number */ member
141 u64 sector; member
148 u64 sector; member
271 u64 sector; member
/drivers/block/
Dbrd.c55 static struct page *brd_lookup_page(struct brd_device *brd, sector_t sector) in brd_lookup_page() argument
72 idx = sector >> PAGE_SECTORS_SHIFT; /* sector to page index */ in brd_lookup_page()
86 static struct page *brd_insert_page(struct brd_device *brd, sector_t sector) in brd_insert_page() argument
92 page = brd_lookup_page(brd, sector); in brd_insert_page()
119 idx = sector >> PAGE_SECTORS_SHIFT; in brd_insert_page()
134 static void brd_free_page(struct brd_device *brd, sector_t sector) in brd_free_page() argument
140 idx = sector >> PAGE_SECTORS_SHIFT; in brd_free_page()
147 static void brd_zero_page(struct brd_device *brd, sector_t sector) in brd_zero_page() argument
151 page = brd_lookup_page(brd, sector); in brd_zero_page()
196 static int copy_to_brd_setup(struct brd_device *brd, sector_t sector, size_t n) in copy_to_brd_setup() argument
[all …]
/drivers/scsi/
Dsr_vendor.c161 unsigned long sector; in sr_cd_check() local
173 sector = 0; /* the multisession sector offset goes here */ in sr_cd_check()
199 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check()
203 sector = 0; in sr_cd_check()
231 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check()
259 sector = min * CD_SECS * CD_FRAMES + sec * CD_FRAMES + frame; in sr_cd_check()
260 if (sector) in sr_cd_check()
261 sector -= CD_MSF_OFFSET; in sr_cd_check()
297 sector = buffer[11] + (buffer[10] << 8) + in sr_cd_check()
307 sector = 0; in sr_cd_check()
[all …]
/drivers/md/
Draid0.c309 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()
371 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); in raid0_mergeable_bvec() local
372 sector_t sector_offset = sector; in raid0_mergeable_bvec()
[all …]
Draid5.c137 static inline struct bio *r5_next_bio(struct bio *bio, sector_t sector) in r5_next_bio() argument
140 if (bio->bi_iter.bi_sector + sectors < sector + STRIPE_SECTORS) in r5_next_bio()
451 (unsigned long long)sh->sector); in remove_hash()
458 struct hlist_head *hp = stripe_hash(conf, sh->sector); in insert_hash()
461 (unsigned long long)sh->sector); in insert_hash()
523 static void init_stripe(struct stripe_head *sh, sector_t sector, int previous) in init_stripe() argument
533 (unsigned long long)sector); in init_stripe()
538 sh->sector = sector; in init_stripe()
539 stripe_set_idx(sector, conf, previous, sh); in init_stripe()
548 (unsigned long long)sh->sector, i, dev->toread, in init_stripe()
[all …]
Draid1.c293 r1_bio->sector + (r1_bio->sectors); in update_head_pos()
358 (unsigned long long)r1_bio->sector); in raid1_end_read_request()
377 bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector, in close_write()
452 r1_bio->sector, r1_bio->sectors, in raid1_end_write_request()
513 const sector_t this_sector = r1_bio->sector; in read_balance()
711 sector_t sector = bvm->bi_sector + get_start_sect(bvm->bi_bdev); in raid1_mergeable_bvec() local
724 bvm->bi_sector = sector + in raid1_mergeable_bvec()
895 sector_t sector = 0; in wait_barrier() local
933 sector = conf->start_next_window; in wait_barrier()
939 return sector; in wait_barrier()
[all …]
Draid10.c410 (unsigned long long)r10_bio->sector); in raid10_end_read_request()
419 bitmap_endwrite(r10_bio->mddev->bitmap, r10_bio->sector, in close_write()
555 sector_t sector; in __raid10_find_phys() local
569 chunk = r10bio->sector >> geo->chunk_shift; in __raid10_find_phys()
570 sector = r10bio->sector & geo->chunk_mask; in __raid10_find_phys()
578 sector += stripe << geo->chunk_shift; in __raid10_find_phys()
584 sector_t s = sector; in __raid10_find_phys()
610 sector += (geo->chunk_mask + 1); in __raid10_find_phys()
620 ((r10bio->sector >= conf->reshape_progress) != in raid10_find_phys()
630 static sector_t raid10_find_virt(struct r10conf *conf, sector_t sector, int dev) in raid10_find_virt() argument
[all …]
Ddm-crypt.c62 sector_t sector; member
681 u64 sector = cpu_to_le64((u64)dmreq->iv_sector); in crypt_iv_tcw_whitening() local
688 crypto_xor(buf, (u8 *)&sector, 8); in crypt_iv_tcw_whitening()
689 crypto_xor(&buf[8], (u8 *)&sector, 8); in crypt_iv_tcw_whitening()
720 u64 sector = cpu_to_le64((u64)dmreq->iv_sector); in crypt_iv_tcw_gen() local
733 crypto_xor(iv, (u8 *)&sector, 8); in crypt_iv_tcw_gen()
735 crypto_xor(&iv[8], (u8 *)&sector, cc->iv_size - 8); in crypt_iv_tcw_gen()
804 sector_t sector) in crypt_convert_init() argument
812 ctx->cc_sector = sector + cc->iv_offset; in crypt_convert_init()
1034 struct bio *bio, sector_t sector) in crypt_io_init() argument
[all …]
Ddm-stripe.c211 static void stripe_map_sector(struct stripe_c *sc, sector_t sector, in stripe_map_sector() argument
214 sector_t chunk = dm_target_offset(sc->ti, sector); in stripe_map_sector()
239 static void stripe_map_range_sector(struct stripe_c *sc, sector_t sector, in stripe_map_range_sector() argument
244 stripe_map_sector(sc, sector, &stripe, result); in stripe_map_range_sector()
249 sector = *result; in stripe_map_range_sector()
251 *result -= sector_div(sector, sc->chunk_size); in stripe_map_range_sector()
253 *result = sector & ~(sector_t)(sc->chunk_size - 1); in stripe_map_range_sector()
/drivers/usb/storage/
Djumpshot.c164 u32 sector, in jumpshot_read_data() argument
180 if (sector > 0x0FFFFFFF) in jumpshot_read_data()
202 command[2] = sector & 0xFF; in jumpshot_read_data()
203 command[3] = (sector >> 8) & 0xFF; in jumpshot_read_data()
204 command[4] = (sector >> 16) & 0xFF; in jumpshot_read_data()
206 command[5] = 0xE0 | ((sector >> 24) & 0x0F); in jumpshot_read_data()
226 sector += thistime; in jumpshot_read_data()
241 u32 sector, in jumpshot_write_data() argument
257 if (sector > 0x0FFFFFFF) in jumpshot_write_data()
284 command[2] = sector & 0xFF; in jumpshot_write_data()
[all …]
Ddatafab.c145 u32 sector, in datafab_read_data() argument
190 command[2] = sector & 0xFF; in datafab_read_data()
191 command[3] = (sector >> 8) & 0xFF; in datafab_read_data()
192 command[4] = (sector >> 16) & 0xFF; in datafab_read_data()
195 command[5] |= (sector >> 24) & 0x0F; in datafab_read_data()
213 sector += thistime; in datafab_read_data()
228 u32 sector, in datafab_write_data() argument
278 command[2] = sector & 0xFF; in datafab_write_data()
279 command[3] = (sector >> 8) & 0xFF; in datafab_write_data()
280 command[4] = (sector >> 16) & 0xFF; in datafab_write_data()
[all …]
Dshuttle_usbat.c208 u32 sector, unsigned char cmd) in usbat_pack_ata_sector_cmd() argument
212 buf[2] = sector & 0xFF; in usbat_pack_ata_sector_cmd()
213 buf[3] = (sector >> 8) & 0xFF; in usbat_pack_ata_sector_cmd()
214 buf[4] = (sector >> 16) & 0xFF; in usbat_pack_ata_sector_cmd()
215 buf[5] = 0xE0 | ((sector >> 24) & 0x0F); in usbat_pack_ata_sector_cmd()
1116 u32 sector, in usbat_flash_read_data() argument
1147 if (sector > 0x0FFFFFFF) in usbat_flash_read_data()
1172 usbat_pack_ata_sector_cmd(command, thistime, sector, 0x20); in usbat_flash_read_data()
1190 sector += thistime; in usbat_flash_read_data()
1207 u32 sector, in usbat_flash_write_data() argument
[all …]
/drivers/mtd/nand/
Dsh_flctl.c448 (struct sh_flctl *flctl, uint8_t *buff, int sector) in read_ecfiforeg() argument
454 res = wait_recfifo_ready(flctl , sector); in read_ecfiforeg()
584 int sector, page_sectors; in execmd_read_page_sector() local
600 for (sector = 0; sector < page_sectors; sector++) { in execmd_read_page_sector()
601 read_fiforeg(flctl, 512, 512 * sector); in execmd_read_page_sector()
604 &flctl->done_buff[mtd->writesize + 16 * sector], in execmd_read_page_sector()
605 sector); in execmd_read_page_sector()
655 int sector, page_sectors; in execmd_write_page_sector() local
668 for (sector = 0; sector < page_sectors; sector++) { in execmd_write_page_sector()
669 write_fiforeg(flctl, 512, 512 * sector); in execmd_write_page_sector()
[all …]
Datmel_nand_ecc.h120 #define pmecc_readb_ecc_relaxed(addr, sector, n) \ argument
121 readb_relaxed((addr) + ATMEL_PMECC_ECCx + ((sector) * 0x40) + (n))
123 #define pmecc_readl_rem_relaxed(addr, sector, n) \ argument
124 readl_relaxed((addr) + ATMEL_PMECC_REMx + ((sector) * 0x40) + ((n) * 4))
/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/devices/
Ddocg3.c409 static void doc_setup_addr_sector(struct docg3 *docg3, int sector) in doc_setup_addr_sector() argument
412 doc_flash_address(docg3, sector & 0xff); in doc_setup_addr_sector()
413 doc_flash_address(docg3, (sector >> 8) & 0xff); in doc_setup_addr_sector()
414 doc_flash_address(docg3, (sector >> 16) & 0xff); in doc_setup_addr_sector()
424 static void doc_setup_writeaddr_sector(struct docg3 *docg3, int sector, int ofs) in doc_setup_writeaddr_sector() argument
429 doc_flash_address(docg3, sector & 0xff); in doc_setup_writeaddr_sector()
430 doc_flash_address(docg3, (sector >> 8) & 0xff); in doc_setup_writeaddr_sector()
431 doc_flash_address(docg3, (sector >> 16) & 0xff); in doc_setup_writeaddr_sector()
450 int sector, ret = 0; in doc_read_seek() local
472 sector = (block0 << DOC_ADDR_BLOCK_SHIFT) + (page & DOC_ADDR_PAGE_MASK); in doc_read_seek()
[all …]
/drivers/target/
Dtarget_core_sbc.c1099 sector_t sector = cmd->t_task_lba; in sbc_dif_generate() local
1120 sdt->ref_tag = cpu_to_be32(sector & 0xffffffff); in sbc_dif_generate()
1125 (unsigned long long)sector, sdt->guard_tag, in sbc_dif_generate()
1128 sector++; in sbc_dif_generate()
1139 const void *p, sector_t sector, unsigned int ei_lba) in sbc_dif_v1_verify() argument
1148 " csum 0x%04x\n", (unsigned long long)sector, in sbc_dif_v1_verify()
1154 be32_to_cpu(sdt->ref_tag) != (sector & 0xffffffff)) { in sbc_dif_v1_verify()
1156 " sector MSB: 0x%08x\n", (unsigned long long)sector, in sbc_dif_v1_verify()
1157 be32_to_cpu(sdt->ref_tag), (u32)(sector & 0xffffffff)); in sbc_dif_v1_verify()
1164 " ei_lba: 0x%08x\n", (unsigned long long)sector, in sbc_dif_v1_verify()
[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 …]
Dftl.c788 u_long sector, u_long nblocks) in ftl_read() argument
796 part, sector, nblocks); in ftl_read()
804 if (((sector+i) * SECTOR_SIZE) >= le32_to_cpu(part->header.FormattedSize)) { in ftl_read()
808 log_addr = part->VirtualBlockMap[sector+i]; in ftl_read()
902 u_long sector, u_long nblocks) in ftl_write() argument
910 part, sector, nblocks); in ftl_write()
924 virt_addr = sector * SECTOR_SIZE | BLOCK_DATA; in ftl_write()
961 old_addr = part->VirtualBlockMap[sector+i]; in ftl_write()
963 part->VirtualBlockMap[sector+i] = 0xffffffff; in ftl_write()
972 part->VirtualBlockMap[sector+i] = log_addr; in ftl_write()
[all …]

1234