Home
last modified time | relevance | path

Searched refs:sectors (Results 1 – 25 of 139) sorted by relevance

123456

/drivers/target/
Dtarget_core_sbc.c244 static inline u32 sbc_get_size(struct se_cmd *cmd, u32 sectors) in sbc_get_size() argument
246 return cmd->se_dev->dev_attrib.block_size * sectors; in sbc_get_size()
326 unsigned int sectors = sbc_get_write_same_sectors(cmd); in sbc_setup_write_same() local
335 if (sectors > cmd->se_dev->dev_attrib.max_write_same_len) { in sbc_setup_write_same()
337 sectors, cmd->se_dev->dev_attrib.max_write_same_len); in sbc_setup_write_same()
343 if (((cmd->t_task_lba + sectors) < cmd->t_task_lba) || in sbc_setup_write_same()
344 ((cmd->t_task_lba + sectors) > end_lba)) { in sbc_setup_write_same()
346 (unsigned long long)end_lba, cmd->t_task_lba, sectors); in sbc_setup_write_same()
374 ret = sbc_check_prot(dev, cmd, &cmd->t_task_cdb[0], sectors, true); in sbc_setup_write_same()
733 u32 sectors, bool is_write) in sbc_check_prot() argument
[all …]
/drivers/md/
Draid0.c78 sector_t curr_zone_end, sectors; in create_strip_zones() local
97 sectors = rdev1->sectors; in create_strip_zones()
98 sector_div(sectors, mddev->chunk_sectors); in create_strip_zones()
99 rdev1->sectors = sectors * mddev->chunk_sectors; in create_strip_zones()
109 (unsigned long long)rdev1->sectors, in create_strip_zones()
111 (unsigned long long)rdev2->sectors); in create_strip_zones()
117 if (rdev2->sectors == rdev1->sectors) { in create_strip_zones()
206 if (!smallest || (rdev1->sectors < smallest->sectors)) in create_strip_zones()
216 zone->zone_end = smallest->sectors * cnt; in create_strip_zones()
229 zone->dev_start = smallest->sectors; in create_strip_zones()
[all …]
Dlinear.c78 static sector_t linear_size(struct mddev *mddev, sector_t sectors, int raid_disks) in linear_size() argument
84 WARN_ONCE(sectors || raid_disks, in linear_size()
109 sector_t sectors; in linear_conf() local
119 sectors = rdev->sectors; in linear_conf()
120 sector_div(sectors, mddev->chunk_sectors); in linear_conf()
121 rdev->sectors = sectors * mddev->chunk_sectors; in linear_conf()
127 conf->array_sectors += rdev->sectors; in linear_conf()
147 conf->disks[0].end_sector = conf->disks[0].rdev->sectors; in linear_conf()
152 conf->disks[i].rdev->sectors; in linear_conf()
261 start_sector = tmp_dev->end_sector - tmp_dev->rdev->sectors; in linear_make_request()
[all …]
Draid1.c292 r1_bio->sector + (r1_bio->sectors); in update_head_pos()
376 r1_bio->sectors, in close_write()
449 if (is_badblock(rdev, r1_bio->sector, r1_bio->sectors, in raid1_end_write_request()
510 int sectors; in read_balance() local
528 sectors = r1_bio->sectors; in read_balance()
538 if ((conf->mddev->recovery_cp < this_sector + sectors) || in read_balance()
541 this_sector + sectors))) in read_balance()
559 rdev->recovery_offset < this_sector + sectors) in read_balance()
565 if (is_badblock(rdev, this_sector, sectors, in read_balance()
572 best_good_sectors = sectors; in read_balance()
[all …]
Draid10.c331 r10_bio->devs[slot].addr + (r10_bio->sectors); in update_head_pos()
421 r10_bio->sectors, in close_write()
508 r10_bio->sectors, in raid10_end_write_request()
703 int sectors = r10_bio->sectors; in read_balance() local
713 sectors = r10_bio->sectors; in read_balance()
726 && (this_sector + sectors >= conf->next_resync)) in read_balance()
739 r10_bio->devs[slot].addr + sectors > rdev->recovery_offset) in read_balance()
745 r10_bio->devs[slot].addr + sectors > rdev->recovery_offset) in read_balance()
749 if (is_badblock(rdev, dev_sector, sectors, in read_balance()
760 if (!do_balance && sectors > bad_sectors) in read_balance()
[all …]
Dmd.h38 sector_t sectors; /* Device size (in 512bytes sectors) */ member
173 static inline int is_badblock(struct md_rdev *rdev, sector_t s, int sectors, in is_badblock() argument
178 sectors, in is_badblock()
186 extern int rdev_set_badblocks(struct md_rdev *rdev, sector_t s, int sectors,
188 extern int rdev_clear_badblocks(struct md_rdev *rdev, sector_t s, int sectors,
492 int (*resize) (struct mddev *mddev, sector_t sectors);
493 sector_t (*size) (struct mddev *mddev, sector_t sectors, int raid_disks);
Ddm-stats.c25 unsigned long long sectors[2]; member
555 p->sectors[idx] += len; in dm_stat_for_entry()
683 shared->tmp.sectors[READ] = 0; in __dm_stat_init_temporary_percpu_totals()
684 shared->tmp.sectors[WRITE] = 0; in __dm_stat_init_temporary_percpu_totals()
701 shared->tmp.sectors[READ] += ACCESS_ONCE(p->sectors[READ]); in __dm_stat_init_temporary_percpu_totals()
702 shared->tmp.sectors[WRITE] += ACCESS_ONCE(p->sectors[WRITE]); in __dm_stat_init_temporary_percpu_totals()
734 p->sectors[READ] -= shared->tmp.sectors[READ]; in __dm_stat_clear()
735 p->sectors[WRITE] -= shared->tmp.sectors[WRITE]; in __dm_stat_clear()
850 shared->tmp.sectors[READ], in dm_stats_print()
854 shared->tmp.sectors[WRITE], in dm_stats_print()
Dmd.c249 unsigned int sectors; in md_make_request() local
286 sectors = bio_sectors(bio); in md_make_request()
293 part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], sectors); in md_make_request()
702 rdev->sectors = 0; in md_rdev_clear()
1024 rdev->sectors = rdev->sb_start; in super_90_load()
1029 if (IS_ENABLED(CONFIG_LBDAF) && (u64)rdev->sectors >= (2ULL << 32) && in super_90_load()
1031 rdev->sectors = (sector_t)(2ULL << 32) - 2; in super_90_load()
1033 if (rdev->sectors < ((sector_t)sb->size) * 2 && sb->level >= 1) in super_90_load()
1371 sector_t sectors; in super_1_load() local
1470 int sectors = le16_to_cpu(sb->bblog_size); in super_1_load() local
[all …]
/drivers/scsi/
Dscsicam.c234 unsigned long heads, sectors, cylinders, temp; in setsize() local
237 sectors = 62L; /* Maximize sectors per track */ in setsize()
239 temp = cylinders * sectors; /* Compute divisor for heads */ in setsize()
244 sectors = capacity / temp; /* Compute value for sectors per in setsize()
247 sectors++; /* Else, increment number of sectors */ in setsize()
248 temp = heads * sectors; /* Compute divisor for cylinders */ in setsize()
256 *secs = (unsigned int) sectors; in setsize()
Dps3rom.c173 u32 sectors) in ps3rom_read_request() argument
178 __func__, __LINE__, sectors, start_sector); in ps3rom_read_request()
182 sectors, 0, dev->bounce_lpar, &dev->tag); in ps3rom_read_request()
194 u32 sectors) in ps3rom_write_request() argument
199 __func__, __LINE__, sectors, start_sector); in ps3rom_write_request()
205 sectors, 0, dev->bounce_lpar, &dev->tag); in ps3rom_write_request()
/drivers/mtd/
Dssfdc.c26 unsigned char sectors; member
321 ssfdc->sectors = 32; in ssfdcr_add_mtd()
322 get_chs(mtd->size, NULL, &ssfdc->heads, &ssfdc->sectors); in ssfdcr_add_mtd()
324 ((long)ssfdc->sectors * (long)ssfdc->heads)); in ssfdcr_add_mtd()
327 ssfdc->cylinders, ssfdc->heads , ssfdc->sectors, in ssfdcr_add_mtd()
329 (long)ssfdc->sectors); in ssfdcr_add_mtd()
332 (long)ssfdc->sectors; in ssfdcr_add_mtd()
413 ssfdc->cylinders, ssfdc->heads, ssfdc->sectors); in ssfdcr_getgeo()
416 geo->sectors = ssfdc->sectors; in ssfdcr_getgeo()
Dnftlcore.c84 nftl->sectors = nftl->mbd.size / temp; in nftl_add_mtd()
86 nftl->sectors++; in nftl_add_mtd()
87 temp = nftl->cylinders * nftl->sectors; in nftl_add_mtd()
92 temp = nftl->heads * nftl->sectors; in nftl_add_mtd()
97 if (nftl->mbd.size != nftl->heads * nftl->cylinders * nftl->sectors) { in nftl_add_mtd()
106 nftl->cylinders, nftl->heads , nftl->sectors, in nftl_add_mtd()
108 (long)nftl->sectors ); in nftl_add_mtd()
785 geo->sectors = nftl->sectors; in nftl_getgeo()
Dinftlcore.c91 inftl->sectors = inftl->mbd.size / temp; in inftl_add_mtd()
93 inftl->sectors++; in inftl_add_mtd()
94 temp = inftl->cylinders * inftl->sectors; in inftl_add_mtd()
99 temp = inftl->heads * inftl->sectors; in inftl_add_mtd()
104 if (inftl->mbd.size != inftl->heads * inftl->cylinders * inftl->sectors) { in inftl_add_mtd()
113 inftl->cylinders, inftl->heads , inftl->sectors, in inftl_add_mtd()
115 (long)inftl->sectors ); in inftl_add_mtd()
934 geo->sectors = inftl->sectors; in inftl_getgeo()
/drivers/usb/storage/
Ddatafab.c72 unsigned long sectors; /* total sector count */ member
150 u32 sectors) in datafab_read_data() argument
165 if (sectors > 0x0FFFFFFF) in datafab_read_data()
174 totallen = sectors * info->ssize; in datafab_read_data()
233 u32 sectors) in datafab_write_data() argument
249 if (sectors > 0x0FFFFFFF) in datafab_write_data()
258 totallen = sectors * info->ssize; in datafab_write_data()
433 info->sectors = ((u32)(reply[117]) << 24) | in datafab_id_device()
595 info->sectors, info->ssize); in datafab_transport()
599 ((__be32 *) ptr)[0] = cpu_to_be32(info->sectors - 1); in datafab_transport()
Djumpshot.c108 unsigned long sectors; /* total sector count */ member
168 u32 sectors) in jumpshot_read_data() argument
186 totallen = sectors * info->ssize; in jumpshot_read_data()
245 u32 sectors) in jumpshot_write_data() argument
263 totallen = sectors * info->ssize; in jumpshot_write_data()
366 info->sectors = ((u32)(reply[117]) << 24) | in jumpshot_id_device()
525 info->sectors, info->ssize); in jumpshot_transport()
529 ((__be32 *) ptr)[0] = cpu_to_be32(info->sectors - 1); in jumpshot_transport()
Dsddr55.c202 unsigned short sectors) { in sddr55_read_data() argument
221 len = min((unsigned int) sectors, (unsigned int) info->blocksize >> in sddr55_read_data()
229 while (sectors>0) { in sddr55_read_data()
239 pages = min((unsigned int) sectors << info->smallpageshift, in sddr55_read_data()
307 sectors -= pages >> info->smallpageshift; in sddr55_read_data()
321 unsigned short sectors) { in sddr55_write_data() argument
348 len = min((unsigned int) sectors, (unsigned int) info->blocksize >> in sddr55_write_data()
356 while (sectors > 0) { in sddr55_write_data()
366 pages = min((unsigned int) sectors << info->smallpageshift, in sddr55_write_data()
515 sectors -= pages >> info->smallpageshift; in sddr55_write_data()
Dalauda.c919 unsigned int sectors) in alauda_read_data() argument
940 len = min(sectors, blocksize) * (pagesize + 64); in alauda_read_data()
954 while (sectors > 0) { in alauda_read_data()
970 pages = min(sectors, blocksize - page); in alauda_read_data()
1003 sectors -= pages; in alauda_read_data()
1014 unsigned int sectors) in alauda_write_data() argument
1032 len = min(sectors, blocksize) * pagesize; in alauda_write_data()
1056 while (sectors > 0) { in alauda_write_data()
1058 unsigned int pages = min(sectors, blocksize - page); in alauda_write_data()
1080 sectors -= pages; in alauda_write_data()
/drivers/mtd/nand/
Dmtk_ecc.c88 u32 sectors; member
118 if (dec & ecc->sectors) { in mtk_ecc_irq()
124 ecc->sectors = 0; in mtk_ecc_irq()
235 if (config->sectors) in mtk_ecc_config()
236 ecc->sectors = 1 << (config->sectors - 1); in mtk_ecc_config()
241 int sectors) in mtk_ecc_get_stats() argument
249 for (i = 0; i < sectors; i++) { in mtk_ecc_get_stats()
Dmtk_nand.c622 u32 sectors) in mtk_nfc_read_fdm() argument
631 for (i = 0; i < sectors; i++) { in mtk_nfc_read_fdm()
813 static int mtk_nfc_update_ecc_stats(struct mtd_info *mtd, u8 *buf, u32 sectors) in mtk_nfc_update_ecc_stats() argument
823 memset(buf, 0xff, sectors * chip->ecc.size); in mtk_nfc_update_ecc_stats()
824 for (i = 0; i < sectors; i++) in mtk_nfc_update_ecc_stats()
829 mtk_ecc_get_stats(nfc->ecc, &stats, sectors); in mtk_nfc_update_ecc_stats()
843 u32 column, sectors, start, end, reg; in mtk_nfc_read_subpage() local
853 sectors = end - start; in mtk_nfc_read_subpage()
856 len = sectors * chip->ecc.size + (raw ? sectors * spare : 0); in mtk_nfc_read_subpage()
877 nfc->ecc_cfg.sectors = sectors; in mtk_nfc_read_subpage()
[all …]
/drivers/md/bcache/
Dalloc.c83 void bch_rescale_priorities(struct cache_set *c, int sectors) in bch_rescale_priorities() argument
91 atomic_sub(sectors, &c->rescale); in bch_rescale_priorities()
579 bool bch_alloc_sectors(struct cache_set *c, struct bkey *k, unsigned sectors, in bch_alloc_sectors() argument
625 sectors = min(sectors, b->sectors_free); in bch_alloc_sectors()
627 SET_KEY_OFFSET(k, KEY_OFFSET(k) + sectors); in bch_alloc_sectors()
628 SET_KEY_SIZE(k, sectors); in bch_alloc_sectors()
639 b->sectors_free -= sectors; in bch_alloc_sectors()
642 SET_PTR_OFFSET(&b->key, i, PTR_OFFSET(&b->key, i) + sectors); in bch_alloc_sectors()
644 atomic_long_add(sectors, in bch_alloc_sectors()
Drequest.c127 unsigned sectors = min(bio_sectors(bio), in bch_data_invalidate() local
133 bio->bi_iter.bi_sector += sectors; in bch_data_invalidate()
134 bio->bi_iter.bi_size -= sectors << 9; in bch_data_invalidate()
137 &KEY(op->inode, bio->bi_iter.bi_sector, sectors)); in bch_data_invalidate()
373 unsigned sectors, congested = bch_get_congested(c); in check_should_bypass() local
434 sectors = max(task->sequential_io, in check_should_bypass()
438 sectors >= dc->sequential_cutoff >> 9) { in check_should_bypass()
443 if (congested && sectors >= congested) { in check_should_bypass()
520 unsigned sectors = KEY_INODE(k) == s->iop.inode in cache_lookup_fn() local
525 int ret = s->d->cache_miss(b, s, bio, sectors); in cache_lookup_fn()
[all …]
/drivers/block/paride/
Dpd.c229 int sectors; member
343 s = (block % disk->sectors) + 1; in pd_ide_command()
344 h = (block /= disk->sectors) % disk->heads; in pd_ide_command()
592 pd_send_command(disk, disk->sectors, 0, disk->heads - 1, 0, 0, in pd_init_dev_parms()
674 disk->sectors = le16_to_cpu(*(__le16 *) (pd_scratch + 12)); in pd_identify()
680 disk->capacity = disk->sectors * disk->heads * disk->cylinders; in pd_identify()
696 disk->cylinders, disk->heads, disk->sectors, in pd_identify()
762 geo->sectors = PD_LOG_SECTS; in pd_getgeo()
763 geo->cylinders = disk->capacity / (geo->heads * geo->sectors); in pd_getgeo()
766 geo->sectors = disk->sectors; in pd_getgeo()
/drivers/mtd/spi-nor/
DKconfig19 bool "Use small 4096 B erase sectors"
22 Many flash memories support erasing small (4096 B) sectors. Depending
26 small sectors. On the other hand erasing should be faster when using
27 64 KiB block instead of 16 × 4 KiB sectors.
/drivers/mmc/card/
Dmmc_test.c99 unsigned int sectors; member
542 unsigned int count, unsigned int sectors, struct timespec ts, in mmc_test_save_transfer_result() argument
555 tr->sectors = sectors; in mmc_test_save_transfer_result()
569 unsigned int rate, iops, sectors = bytes >> 9; in mmc_test_print_rate() local
579 mmc_hostname(test->card->host), sectors, sectors >> 1, in mmc_test_print_rate()
580 (sectors & 1 ? ".5" : ""), (unsigned long)ts.tv_sec, in mmc_test_print_rate()
584 mmc_test_save_transfer_result(test, 1, sectors, ts, rate, iops); in mmc_test_print_rate()
594 unsigned int rate, iops, sectors = bytes >> 9; in mmc_test_print_avg_rate() local
606 mmc_hostname(test->card->host), count, sectors, count, in mmc_test_print_avg_rate()
607 sectors >> 1, (sectors & 1 ? ".5" : ""), in mmc_test_print_avg_rate()
[all …]
/drivers/ps3/
Dps3stor_lib.c277 u64 start_sector, u64 sectors, int write) in ps3stor_read_write_sectors() argument
284 __func__, __LINE__, op, sectors, start_sector); in ps3stor_read_write_sectors()
288 start_sector, sectors, 0, lpar, in ps3stor_read_write_sectors()
291 start_sector, sectors, 0, lpar, in ps3stor_read_write_sectors()

123456