projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make it clear to Coverity that the tmp buffer in switch_ioscheduler() is \0-terminated
[fio.git]
/
io_u.c
diff --git
a/io_u.c
b/io_u.c
index 01b36938d1b5b8730c5e427fc278131c2a860487..98a7dc560600ce7c7fc8cfa191e734e5cee29276 100644
(file)
--- a/
io_u.c
+++ b/
io_u.c
@@
-1,12
+1,8
@@
#include <unistd.h>
#include <unistd.h>
-#include <fcntl.h>
#include <string.h>
#include <string.h>
-#include <signal.h>
-#include <time.h>
#include <assert.h>
#include "fio.h"
#include <assert.h>
#include "fio.h"
-#include "hash.h"
#include "verify.h"
#include "trim.h"
#include "lib/rand.h"
#include "verify.h"
#include "trim.h"
#include "lib/rand.h"
@@
-856,8
+852,8
@@
void put_io_u(struct thread_data *td, struct io_u *io_u)
assert(!(td->flags & TD_F_CHILD));
}
io_u_qpush(&td->io_u_freelist, io_u);
assert(!(td->flags & TD_F_CHILD));
}
io_u_qpush(&td->io_u_freelist, io_u);
- td_io_u_unlock(td);
td_io_u_free_notify(td);
td_io_u_free_notify(td);
+ td_io_u_unlock(td);
}
void clear_io_u(struct thread_data *td, struct io_u *io_u)
}
void clear_io_u(struct thread_data *td, struct io_u *io_u)
@@
-889,8
+885,8
@@
void requeue_io_u(struct thread_data *td, struct io_u **io_u)
}
io_u_rpush(&td->io_u_requeues, __io_u);
}
io_u_rpush(&td->io_u_requeues, __io_u);
- td_io_u_unlock(td);
td_io_u_free_notify(td);
td_io_u_free_notify(td);
+ td_io_u_unlock(td);
*io_u = NULL;
}
*io_u = NULL;
}
@@
-1558,6
+1554,7
@@
bool queue_full(const struct thread_data *td)
struct io_u *__get_io_u(struct thread_data *td)
{
struct io_u *io_u = NULL;
struct io_u *__get_io_u(struct thread_data *td)
{
struct io_u *io_u = NULL;
+ int ret;
if (td->stop_io)
return NULL;
if (td->stop_io)
return NULL;
@@
-1594,7
+1591,8
@@
again:
* return one
*/
assert(!(td->flags & TD_F_CHILD));
* return one
*/
assert(!(td->flags & TD_F_CHILD));
- assert(!pthread_cond_wait(&td->free_cond, &td->io_u_lock));
+ ret = pthread_cond_wait(&td->free_cond, &td->io_u_lock);
+ assert(ret == 0);
goto again;
}
goto again;
}