Lines Matching defs:sectorsize
70 static void speeddisk(int fd, off_t mediasize, u_int sectorsize);
71 static void commandtime(int fd, off_t mediasize, u_int sectorsize);
72 static void iopsbench(int fd, off_t mediasize, u_int sectorsize);
74 static void slogbench(int fd, int isreg, off_t mediasize, u_int sectorsize);
90 u_int sectorsize, fwsectors, fwheads, zoned = 0, isreg;
164 sectorsize = S_BLKSIZE;
196 error = ioctl(fd, DIOCGSECTORSIZE, §orsize);
220 printf("\t%u", sectorsize);
222 printf("\t%jd", (intmax_t)mediasize/sectorsize);
227 (fwsectors * fwheads * sectorsize));
235 printf("\t%-12u\t# sectorsize\n", sectorsize);
239 (intmax_t)mediasize/sectorsize);
244 (fwsectors * fwheads * sectorsize));
269 commandtime(fd, mediasize, sectorsize);
271 speeddisk(fd, mediasize, sectorsize);
273 iopsbench(fd, mediasize, sectorsize);
275 slogbench(fd, isreg, mediasize, sectorsize);
317 rdsect(int fd, off_t blockno, u_int sectorsize)
321 if (lseek(fd, (off_t)blockno * sectorsize, SEEK_SET) == -1)
323 error = read(fd, buf, sectorsize);
326 if (error != (int)sectorsize)
409 speeddisk(int fd, off_t mediasize, u_int sectorsize)
418 sectorcount = mediasize / sectorsize;
436 rdsect(fd, b0, sectorsize);
438 rdsect(fd, b1, sectorsize);
448 rdsect(fd, b0, sectorsize);
450 rdsect(fd, b1, sectorsize);
459 rdsect(fd, b0, sectorsize);
461 rdsect(fd, b1, sectorsize);
470 rdsect(fd, b0, sectorsize);
479 rdsect(fd, b0, sectorsize);
488 rdsect(fd, b0, sectorsize);
497 rdsect(fd, b0, sectorsize);
504 rdsect(fd, 0, sectorsize);
512 b0 = sectorcount / 2 - bulk * (1024*1024 / sectorsize) / 2 - 1;
513 rdsect(fd, b0, sectorsize);
521 b0 = sectorcount - bulk * (1024*1024 / sectorsize) - 1;
522 rdsect(fd, b0, sectorsize);
534 commandtime(int fd, off_t mediasize, u_int sectorsize)
541 rdsect(fd, 0, sectorsize);
550 rdsect(fd, 0, sectorsize);
553 rdsect(fd, 0, sectorsize);
566 iops(int fd, off_t mediasize, u_int sectorsize)
573 sectorcount = mediasize / sectorsize;
578 aiop->aio_buf = malloc(sectorsize);
588 aiop->aio_offset = (random() % (sectorcount)) * sectorsize;
589 aiop->aio_nbytes = sectorsize;
603 if (ret != (ssize_t)sectorsize)
610 aiop->aio_offset = (random() % (sectorcount)) * sectorsize;
611 aiop->aio_nbytes = sectorsize;
629 iopsbench(int fd, off_t mediasize, u_int sectorsize)
634 iops(fd, mediasize, sectorsize);
636 if (sectorsize != 4096) {
688 slogbench(int fd, int isreg, off_t mediasize, u_int sectorsize)
695 for (size = sectorsize; size <= MAXTX; size *= 2) {