projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aa31f1f
)
Don't truncate files if we don't need to extend them
author
Shawn Lewis
<shawnlewis@google.com>
Fri, 11 Jan 2008 08:45:11 +0000
(09:45 +0100)
committer
Jens Axboe
<jens.axboe@oracle.com>
Fri, 11 Jan 2008 08:45:11 +0000
(09:45 +0100)
Don't truncate files if we don't need to extend them.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 210cd2ff7ed437a1f19414a82e20600486cdfbc5..34130b89312eb56e1336f68109d238e8583cd056 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-50,14
+50,14
@@
static int extend_file(struct thread_data *td, struct fio_file *f)
return 1;
}
+ if (!new_layout)
+ goto done;
+
if (ftruncate(f->fd, f->real_file_size) == -1) {
td_verror(td, errno, "ftruncate");
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;