projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cdc7f19
)
Only use posix_fallocate(), if we are overwriting
author
Jens Axboe
<jens.axboe@oracle.com>
Thu, 29 Mar 2007 08:31:51 +0000
(10:31 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Thu, 29 Mar 2007 08:31:51 +0000
(10:31 +0200)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 161f63e7d1a5aee2597e146513396406784fd4c2..e9dc72db740669952d4c8d4fb24dea38855fdfeb 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-47,14
+47,14
@@
static int extend_file(struct thread_data *td, struct fio_file *f)
goto err;
}
+ if (!new_layout)
+ goto done;
+
if (posix_fallocate(f->fd, 0, f->real_file_size) < 0) {
td_verror(td, errno, "posix_fallocate");
goto err;
}
- if (!new_layout)
- goto done;
-
b = malloc(td->o.max_bs[DDIR_WRITE]);
memset(b, 0, td->o.max_bs[DDIR_WRITE]);