The following changes since commit 068420271828b3b2426ffc3ccf64404cb9d340fb: Expand continue_on_error to select which type of error to allow (2011-11-17 09:45:17 +0100) are available in the git repository at: git://git.kernel.dk/fio.git master Josh Carter (1): Fix initialization of lastrate when using ratemin Zhu Yanhai (1): Use the reentrant getmntent_r instead of getmntent cgroup.c | 5 +++-- fio.c | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) --- Diff of recent changes: diff --git a/cgroup.c b/cgroup.c index f36683a..de00d98 100644 --- a/cgroup.c +++ b/cgroup.c @@ -22,7 +22,8 @@ struct cgroup_member { static char *find_cgroup_mnt(struct thread_data *td) { char *mntpoint = NULL; - struct mntent *mnt; + struct mntent *mnt, dummy; + char buf[256] = {0}; FILE *f; f = setmntent("/proc/mounts", "r"); @@ -31,7 +32,7 @@ static char *find_cgroup_mnt(struct thread_data *td) return NULL; } - while ((mnt = getmntent(f)) != NULL) { + while ((mnt = getmntent_r(f, &dummy, buf, sizeof(buf))) != NULL) { if (!strcmp(mnt->mnt_type, "cgroup") && strstr(mnt->mnt_opts, "blkio")) break; diff --git a/fio.c b/fio.c index 8702086..ce29c26 100644 --- a/fio.c +++ b/fio.c @@ -1248,9 +1248,12 @@ static void *thread_main(void *data) memcpy(&td->iops_sample_time, &td->start, sizeof(td->start)); memcpy(&td->tv_cache, &td->start, sizeof(td->start)); - if (td->o.ratemin[0] || td->o.ratemin[1]) - memcpy(&td->lastrate, &td->bw_sample_time, - sizeof(td->lastrate)); + if (td->o.ratemin[0] || td->o.ratemin[1]) { + memcpy(&td->lastrate[0], &td->bw_sample_time, + sizeof(td->bw_sample_time)); + memcpy(&td->lastrate[1], &td->bw_sample_time, + sizeof(td->bw_sample_time)); + } if (clear_state) clear_io_state(td); -- To unsubscribe from this list: send the line "unsubscribe fio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html