Recent changes (master)
The following changes since commit 7ad2ddffe2bdc5e47fb86cab276db1db9e350f1b:
sg: fix sign extension (2018-03-21 20:09:36 -0600)
are available in the git repository at:
git://git.kernel.dk/fio.git master
for you to fetch changes up to 87c6f22bf24da4679849ccf778451b8432c2b368:
server: use scalloc() for sk_out allocation (2018-03-22 11:29:25 -0600)
----------------------------------------------------------------
Jens Axboe (3):
smalloc: oom cleanups
Merge branch 'gcc' of https://github.com/sitsofe/fio
server: use scalloc() for sk_out allocation
Sitsofe Wheeler (1):
compiler: set minimum compiler version to GCC 4.1.0
backend.c | 9 ++++++--- cgroup.c | 3 +++ compiler/compiler-gcc3.h | 10 ---------- compiler/compiler.h | 6 ++---- filesetup.c | 9 +++++---- gettime-thread.c | 2 -- server.c | 2 +- 7 files changed, 17 insertions(+), 24 deletions(-) delete mode 100644 compiler/compiler-gcc3.h
---
Diff of recent changes:
backend.c +6 -3
@@ -2477,7 +2477,8 @@ int fio_backend(struct sk_out *sk_out)helper_thread_create (startup_sem, sk_out); cgroup_list =smalloc (sizeof (*cgroup_list)); -INIT_FLIST_HEAD (cgroup_list); +if (cgroup_list) +INIT_FLIST_HEAD (cgroup_list);run_threads (sk_out);
@@ -2507,8 +2508,10 @@ int fio_backend(struct sk_out *sk_out) }free_disk_util (); -cgroup_kill (cgroup_list); -sfree (cgroup_list); +if (cgroup_list) { +cgroup_kill (cgroup_list); +sfree (cgroup_list); + }sfree (cgroup_mnt);fio_sem_remove (startup_sem);
cgroup.c +3 -0
@@ -147,6 +147,9 @@ int cgroup_setup(struct thread_data *td, struct flist_head *clist, char **mnt) {char *root; +if (!clist) +return 1 ; +if (!*mnt) { *mnt =find_cgroup_mnt (td);if (!*mnt)
compiler/compiler-gcc3.h deleted +0 -10
@@ -1,10 +0,0 @@ -#ifndef FIO_COMPILER_GCC3_H -#define FIO_COMPILER_GCC3_H - -#if __GNUC_MINOR__ >=4 -#ifndef __must_check -#define __must_check __attribute__((warn_unused_result)) -#endif -#endif - -#endif
compiler/compiler.h +2 -4
@@ -2,12 +2,10 @@#define FIO_COMPILER_H /* IWYU pragma: begin_exports */ -#if __GNUC__ >=4 +#if __GNUC__ >4 || (__GNUC__ ==4 && __GNUC_MINOR__ >=1 )#include "compiler-gcc4.h" -#elif __GNUC__ ==3 -#include "compiler-gcc3.h" #else -#error Compiler too old, need gcc at least gcc 3.x +#error Compiler too old, need at least gcc 4.1.0#endif /* IWYU pragma: end_exports */
filesetup.c +5 -4
@@ -1608,8 +1608,9 @@ int add_file(struct thread_data *td, const char *fname, int numjob, int inc) f->file_name =strdup (file_name); else f->file_name = smalloc_strdup(file_name); -if (!f->file_name) -assert (0 ); + +/* can't handle smalloc failure from here */ +assert (f->file_name);get_file_type (f);
@@ -1814,9 +1815,9 @@ void dup_files(struct thread_data *td, struct thread_data *org) __f->file_name =strdup (f->file_name); else __f->file_name = smalloc_strdup(f->file_name); -if (!__f->file_name) -assert (0 ); +/* can't handle smalloc failure from here */ +assert (__f->file_name); __f->filetype = f->filetype; }
gettime-thread.c +0 -2
@@ -15,8 +15,6 @@ void fio_gtod_init(void)return ; fio_ts =smalloc (sizeof (*fio_ts)); -if (!fio_ts) -log_err ("fio: smalloc pool exhausted\n" ); }static void fio_gtod_update (void )
server.c +1 -1
@@ -1359,7 +1359,7 @@ static int accept_loop(int listen_sk)dprint (FD_NET ,"server: connect from %s\n" , from); - sk_out =smalloc (sizeof (*sk_out)); + sk_out =scalloc (1 ,sizeof (*sk_out));if (!sk_out) {close (sk);return -1 ;