Lines Matching refs:buf_sz
180 static int read_adi(int fd, unsigned char *buf, int buf_sz)
187 ret = read(fd, buf + bytes_read, buf_sz - bytes_read);
193 update_stats(&read_stats, elapsed_time, buf_sz);
196 } while (bytes_read < buf_sz);
205 int buf_sz, unsigned long offset)
214 ret = pread(fd, buf + bytes_read, buf_sz - bytes_read,
221 update_stats(&pread_stats, elapsed_time, buf_sz);
225 } while (bytes_read < buf_sz);
236 static int write_adi(int fd, const unsigned char * const buf, int buf_sz)
243 ret = write(fd, buf + bytes_written, buf_sz - bytes_written);
249 update_stats(&write_stats, elapsed_time, buf_sz);
251 } while (bytes_written < buf_sz);
254 DEBUG_PRINT_L3("\tWrote %d of %d bytes\n", bytes_written, buf_sz);
260 int buf_sz, unsigned long offset)
271 buf_sz - bytes_written, cur_offset);
280 update_stats(&pwrite_stats, elapsed_time, buf_sz);
284 } while (bytes_written < buf_sz);
288 bytes_written, buf_sz, offset);