goto err;
}
+#ifdef FIO_HAVE_FALLOCATE
dprint(FD_FILE, "fallocate file %s, size %llu\n", f->file_name,
f->real_file_size);
- if (posix_fallocate(f->fd, 0, f->real_file_size) < 0) {
- td_verror(td, errno, "posix_fallocate");
- goto err;
- }
+ r = posix_fallocate(f->fd, 0, f->real_file_size);
+ if (r < 0)
+ log_err("fio: posix_fallocate fails: %s\n", strerror(-r));
+#endif
b = malloc(td->o.max_bs[DDIR_WRITE]);
memset(b, 0, td->o.max_bs[DDIR_WRITE]);
if (td->o.sync_io)
flags |= O_SYNC;
if (f->filetype != FIO_TYPE_FILE)
- flags |= O_NOATIME;
+ flags |= FIO_O_NOATIME;
open_again:
if (td_write(td)) {
char buf[FIO_VERROR_SIZE];
int __e = errno;
- if (errno == EPERM && (flags & O_NOATIME)) {
- flags &= ~O_NOATIME;
+ if (errno == EPERM && (flags & FIO_O_NOATIME)) {
+ flags &= ~FIO_O_NOATIME;
goto open_again;
}
(unsigned long long) td->o.rw_min_bs;
num_maps = (blocks + BLOCKS_PER_MAP - 1) /
(unsigned long long) BLOCKS_PER_MAP;
- f->file_map = smalloc(num_maps * sizeof(long));
+ f->file_map = smalloc(num_maps * sizeof(int));
if (f->file_map) {
f->num_maps = num_maps;
continue;