summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Axboe <jaxboe@fusionio.com>2011-01-10 20:21:02 +0100
committerJens Axboe <jaxboe@fusionio.com>2011-01-10 20:21:02 +0100
commit63a582671fe6db03f0a0be81843f2b72bbc8ab33 (patch)
tree2b37add375c1133bd01d08504c7ee2f86966763c
parentc581b165dbaffc349c495c7b8ed452a41acb9319 (diff)
parentdfc6e7513c82d83491e90b8583fb52e301053d1b (diff)
downloadfio-63a582671fe6db03f0a0be81843f2b72bbc8ab33.tar.gz
fio-63a582671fe6db03f0a0be81843f2b72bbc8ab33.tar.bz2
Merge branch 'master' of ssh://router/data/git/fio
-rw-r--r--HOWTO3
-rw-r--r--README4
-rw-r--r--fio.14
-rw-r--r--fio.c12
4 files changed, 16 insertions, 7 deletions
diff --git a/HOWTO b/HOWTO
index 35dccfb1..9ae34b97 100644
--- a/HOWTO
+++ b/HOWTO
@@ -992,7 +992,8 @@ zoneskip=int Skip the specified number of bytes when zonesize data has
io on zones of a file.
write_iolog=str Write the issued io patterns to the specified file. See
- read_iolog.
+ read_iolog. Specify a separate file for each job, otherwise
+ the iologs will be interspersed and the file may be corrupt.
read_iolog=str Open an iolog with the specified file name and replay the
io patterns it contains. This can be used to store a
diff --git a/README b/README
index f136bb5e..3a85a8bd 100644
--- a/README
+++ b/README
@@ -279,7 +279,9 @@ The job file parameters are:
and length entries being in bytes.
write_iolog=x Write an iolog to file 'x' in the same format as iolog.
The iolog options are exclusive, if both given the
- read iolog will be performed.
+ read iolog will be performed. Specify a separate file
+ for each job, otherwise the iologs will be interspersed
+ and the file may be corrupt.
write_bw_log Write a bandwidth log.
write_lat_log Write a latency log.
lockmem=x Lock down x amount of memory on the machine, to
diff --git a/fio.1 b/fio.1
index 8d5baa83..4445c71f 100644
--- a/fio.1
+++ b/fio.1
@@ -749,7 +749,9 @@ Skip the specified number of bytes when \fBzonesize\fR bytes of data have been
read.
.TP
.BI write_iolog \fR=\fPstr
-Write the issued I/O patterns to the specified file.
+Write the issued I/O patterns to the specified file. Specify a separate file
+for each job, otherwise the iologs will be interspersed and the file may be
+corrupt.
.TP
.BI read_iolog \fR=\fPstr
Replay the I/O patterns contained in the specified file generated by
diff --git a/fio.c b/fio.c
index 93482f52..280dbe66 100644
--- a/fio.c
+++ b/fio.c
@@ -1069,14 +1069,18 @@ static void *thread_main(void *data)
*/
fio_mutex_remove(td->mutex);
- if (td->o.uid != -1U && setuid(td->o.uid)) {
- td_verror(td, errno, "setuid");
- goto err;
- }
+ /*
+ * A new gid requires privilege, so we need to do this before setting
+ * the uid.
+ */
if (td->o.gid != -1U && setgid(td->o.gid)) {
td_verror(td, errno, "setgid");
goto err;
}
+ if (td->o.uid != -1U && setuid(td->o.uid)) {
+ td_verror(td, errno, "setuid");
+ goto err;
+ }
/*
* May alter parameters that init_io_u() will use, so we need to