Recent changes (master)

Jens Axboe
2014-10-31T12:00:05Z

The following changes since commit a1f871c72971efe84cd42670d5df4c4dc56dbd3f:

engines: rename option specific pad from 'td' to 'pad' (2014-10-29 08:30:07 -0600)

are available in the git repository at:

git://git.kernel.dk/fio.git master

for you to fetch changes up to d904145c8b93f35e8a71d12d29a96a11f96f75e1:

Merge branch 'master' of ssh://git.kernel.dk/data/git/fio (2014-10-30 17:16:32 -0600)

----------------------------------------------------------------

Jens Axboe (4):
mmap: set 'fd' to -1
configure: disable lex/yacc on Solaris
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio
Merge branch 'master' of ssh://git.kernel.dk/data/git/fio

configure | 3 ++-
memory.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)

---

Diff of recent changes:

diff --git a/configure b/configure
index de0fc89..eefe28e 100755
--- a/configure
+++ b/configure
@@ -1356,6 +1356,7 @@ yacc="no"
yacc_is_bison="no"
lex="no"
arith="no"
+if test "$targetos" != "SunOS" ; then
LEX=$(which lex 2> /dev/null)
if test -x "$LEX" ; then
lex="yes"
@@ -1384,13 +1385,13 @@ int main(int argc, char **argv)
return 0;
}
EOF
-
if compile_prog "" "-ll" "lex"; then
LIBS="-ll $LIBS"
else
arith="no"
fi
fi
+fi

echo "lex/yacc for arithmetic $arith"

diff --git a/memory.c b/memory.c
index 8c06d94..76da8a8 100644
--- a/memory.c
+++ b/memory.c
@@ -119,7 +119,7 @@ static int alloc_mem_mmap(struct thread_data *td, size_t total_mem)
{
int flags = 0;

- td->mmapfd = 1;
+ td->mmapfd = -1;

if (td->o.mem_type == MEM_MMAPHUGE) {
unsigned long mask = td->o.hugepage_size - 1;
@@ -176,7 +176,8 @@ static void free_mem_mmap(struct thread_data *td, size_t total_mem)
td->orig_buffer);
munmap(td->orig_buffer, td->orig_buffer_size);
if (td->o.mmapfile) {
- close(td->mmapfd);
+ if (td->mmapfd != -1)
+ close(td->mmapfd);
unlink(td->o.mmapfile);
free(td->o.mmapfile);
}