Home | History | Annotate | Download | only in ltpscsi

Lines Matching defs:bs

234 	int bs;
257 int bs;
2029 int bs, int cdbsz, int fua, int *diop)
2047 io_hdr.dxfer_len = bs * blocks;
2075 memset(buff, 0, bs * blocks);
2078 bs * blocks);
2096 int bs, int cdbsz, int fua, int *diop)
2113 io_hdr.dxfer_len = bs * blocks;
2142 "%d bytes\n", to_block, bs * blocks);
2194 int bs = 0;
2227 if (bs <= 0) {
2228 bs = DEF_BLOCK_SIZE;
2230 "Assume default 'bs' (block size) of %d bytes\n", bs);
2232 if ((ibs && (ibs != bs)) || (obs && (obs != bs))) {
2234 "If 'ibs' or 'obs' given must be same as 'bs'\n");
2275 t = bs * bpt;
2306 offset *= bs; /* could exceed 32 bits here! */
2337 t = bs * bpt;
2378 offset *= bs; /* could exceed 32 bits here! */
2456 wrkBuff = malloc(bs * bpt + psz);
2464 wrkBuff = malloc(bs * bpt);
2491 sg_read(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
2499 blocks_per = (buf_sz + bs - 1) / bs;
2505 sg_read(infd, wrkPos, blocks, skip, bs,
2511 sg_read(infd, wrkPos, blocks, skip, bs,
2524 while (((res = read(infd, wrkPos, blocks * bs)) < 0) &&
2531 } else if (res < blocks * bs) {
2533 blocks = res / bs;
2534 if ((res % bs) > 0) {
2547 sg_write(outfd, wrkPos, blocks, seek, bs,
2555 blocks_per = (buf_sz + bs - 1) / bs;
2561 sg_write(outfd, wrkPos, blocks, seek, bs,
2567 sg_write(outfd, wrkPos, blocks, seek, bs,
2581 while (((res = write(outfd, wrkPos, blocks * bs)) < 0)
2588 } else if (res < blocks * bs) {
2592 blocks = res / bs;
2594 if ((res % bs) > 0)
2618 b = (double)bs *(req_count - dd_count);
6142 int bs, int cdbsz, int fua, int do_mmap)
6160 io_hdr.dxfer_len = bs * blocks;
6209 int bs, int cdbsz, int fua, int do_mmap, int *diop)
6227 io_hdr.dxfer_len = bs * blocks;
6278 int bs = 0;
6336 in_res_sz = bs * bpt;
6366 offset *= bs; /* could exceed 32 bits here! */
6401 out_res_sz = bs * bpt;
6450 offset *= bs; /* could exceed 32 bits here! */
6490 in_sect_sz = bs;
6491 else if (in_sect_sz > bs)
6492 in_num_sect *= (in_sect_sz / bs);
6493 else if (in_sect_sz < bs)
6494 in_num_sect /= (bs / in_sect_sz);
6564 wrkBuff = malloc(bs * bpt + psz);
6574 wrkBuff = malloc(bs * bpt);
6601 sg_read2(infd, wrkPos, blocks, skip, bs, scsi_cdbsz,
6607 sg_read2(infd, wrkPos, blocks, skip, bs,
6617 while (((res = read(infd, wrkPos, blocks * bs)) < 0) &&
6624 } else if (res < blocks * bs) {
6626 blocks = res / bs;
6627 if ((res % bs) > 0) {
6641 sg_write2(outfd, wrkPos, blocks, seek, bs,
6647 sg_write2(outfd, wrkPos, blocks, seek, bs,
6662 while (((res = write(outfd, wrkPos, blocks * bs)) < 0)
6669 } else if (res < blocks * bs) {
6673 blocks = res / bs;
6675 if ((res % bs) > 0)
6699 b = (double)bs *(req_count - dd_count);
6807 int sz = clp->bpt * clp->bs;
6820 rep->bs = clp->bs;
6935 blocks * clp->bs)) < 0) && (EINTR == errno)) ;
6938 memset(rep->buffp, 0, rep->num_blks * rep->bs);
6942 rep->num_blks * rep->bs, strerror(errno));
6943 res = rep->num_blks * clp->bs;
6952 if (res < blocks * clp->bs) {
6955 blocks = res / clp->bs;
6956 if ((res % clp->bs) > 0) {
6977 rep->num_blks * clp->bs)) < 0)
6983 rep->num_blks * rep->bs, strerror(errno));
6984 res = rep->num_blks * clp->bs;
6993 if (res < blocks * clp->bs) {
6994 blocks = res / clp->bs;
6995 if ((res % clp->bs) > 0) {
7031 memset(rep->buffp, 0, rep->num_blks * rep->bs);
7035 rep->num_blks * rep->bs);
7103 rep->num_blks * rep->bs);
7157 hp->dxfer_len = rep->bs * rep->num_blks;
7256 int sg_prepare(int fd, int bs, int bpt, int *scsi_typep)
7266 t = bs * bpt;
7316 if (rcoll.bs <= 0) {
7317 rcoll.bs = DEF_BLOCK_SIZE;
7319 "Assume default 'bs' (block size) of %d bytes\n",
7320 rcoll.bs);
7344 if (sg_prepare(rcoll.infd, rcoll.bs, rcoll.bpt,
7357 offset *= rcoll.bs; /* could exceed 32 here! */
7386 if (sg_prepare(rcoll.outfd, rcoll.bs, rcoll.bpt,
7416 offset *= rcoll.bs; /* could exceed 32 bits here! */
7591 b = (double)rcoll.bs * (count - rcoll.out_done_count);