Lines Matching refs:offset
57 dump_buffer(char *buffer, int64_t offset, int len)
65 printf("%08llx: ", (unsigned long long)offset + i);
80 print_report(const char *op, struct timeval *t, int64_t offset,
89 printf("%s %d/%d bytes at offset %lld\n",
90 op, total, count, (long long)offset);
101 static int do_read(char *buf, int64_t offset, int count, int *total)
105 ret = bdrv_read(bs, offset >> 9, (uint8_t *)buf, count >> 9);
112 static int do_write(char *buf, int64_t offset, int count, int *total)
116 ret = bdrv_write(bs, offset >> 9, (uint8_t *)buf, count >> 9);
123 static int do_pread(char *buf, int64_t offset, int count, int *total)
125 *total = bdrv_pread(bs, offset, (uint8_t *)buf, count);
131 static int do_pwrite(char *buf, int64_t offset, int count, int *total)
133 *total = bdrv_pwrite(bs, offset, (uint8_t *)buf, count);
145 static int do_aio_readv(QEMUIOVector *qiov, int64_t offset, int *total)
150 acb = bdrv_aio_readv(bs, offset >> 9, qiov, qiov->size >> 9,
162 static int do_aio_writev(QEMUIOVector *qiov, int64_t offset, int *total)
167 acb = bdrv_aio_writev(bs, offset >> 9, qiov, qiov->size >> 9,
187 " reads a range of bytes from the given offset\n"
199 " -s, -- start offset for pattern verification (only with -P)\n"
212 int64_t offset;
260 offset = cvtnum(argv[optind]);
261 if (offset < 0) {
287 if (offset & 0x1ff) {
288 printf("offset %lld is not sector aligned\n",
289 (long long)offset);
303 cnt = do_pread(buf, offset, count, &total);
305 cnt = do_read(buf, offset, count, &total);
317 printf("Pattern verification failed at offset %lld, "
319 (long long) offset + pattern_offset, pattern_count);
328 dump_buffer(buf, offset, count);
332 print_report("read", &t2, offset, count, total, cnt, Cflag);
346 .oneline = "reads a number of bytes at a specified offset",
357 " reads a range of bytes from the given offset into multiple buffers\n"
379 int64_t offset;
410 offset = cvtnum(argv[optind]);
411 if (offset < 0) {
417 if (offset & 0x1ff) {
418 printf("offset %lld is not sector aligned\n",
419 (long long)offset);
459 cnt = do_aio_readv(&qiov, offset, &total);
471 printf("Pattern verification failed at offset %lld, "
473 (long long) offset, count);
482 dump_buffer(buf, offset, qiov.size);
486 print_report("read", &t2, offset, qiov.size, total, cnt, Cflag);
499 .oneline = "reads a number of bytes at a specified offset",
510 " writes a range of bytes from the given offset\n"
531 int64_t offset;
559 offset = cvtnum(argv[optind]);
560 if (offset < 0) {
573 if (offset & 0x1ff) {
574 printf("offset %lld is not sector aligned\n",
575 (long long)offset);
590 cnt = do_pwrite(buf, offset, count, &total);
592 cnt = do_write(buf, offset, count, &total);
605 print_report("wrote", &t2, offset, count, total, cnt, Cflag);
619 .oneline = "writes a number of bytes at a specified offset",
630 " writes a range of bytes from the given offset source from multiple buffers\n"
650 int64_t offset;
675 offset = cvtnum(argv[optind]);
676 if (offset < 0) {
682 if (offset & 0x1ff) {
683 printf("offset %lld is not sector aligned\n",
684 (long long)offset);
725 cnt = do_aio_writev(&qiov, offset, &total);
738 print_report("wrote", &t2, offset, qiov.size, total, cnt, Cflag);
751 .oneline = "writes a number of bytes at a specified offset",
772 int64_t offset;
775 offset = cvtnum(argv[1]);
776 if (offset < 0) {
781 ret = bdrv_truncate(bs, offset);
797 .oneline = "truncates the current file at the given offset",
846 printf("vm state offset: %s\n", s2);
863 int64_t offset;
870 offset = cvtnum(argv[1]);
871 if (offset & 0x1ff) {
872 printf("offset %lld is not sector aligned\n",
873 (long long)offset);
882 ret = bdrv_is_allocated(bs, offset >> 9, nb_sectors, &num);
884 cvtstr(offset, s1, sizeof(s1));
888 printf("sector %s at offset %s\n", retstr, s1);
890 printf("%d/%d sectors %s at offset %s\n",
1058 { "offset", 1, 0, 'o' },