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