projects
/
fio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
71bfa16
)
[PATCH] Use posix_fallocate() to force file layout
author
Jens Axboe
<jens.axboe@oracle.com>
Wed, 25 Oct 2006 09:21:05 +0000
(11:21 +0200)
committer
Jens Axboe
<jens.axboe@oracle.com>
Wed, 25 Oct 2006 09:21:05 +0000
(11:21 +0200)
Dunno how well this works on all filesystems, but at least it's
a good hint to send wrt fragmentation and layout.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
filesetup.c
patch
|
blob
|
blame
|
history
diff --git
a/filesetup.c
b/filesetup.c
index 52d822ac4b6c8fb1bff042fd56aae96e0846c9da..0b9564044d14135d662363219471c674c2670714 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-44,6
+44,11
@@
static int create_file(struct thread_data *td, struct fio_file *f)
goto err;
}
+ if (posix_fallocate(f->fd, 0, f->file_size) < 0) {
+ td_verror(td, errno);
+ goto err;
+ }
+
b = malloc(td->max_bs);
memset(b, 0, td->max_bs);