Since td_io_commit() always returns 0, change its return type from
int into void. This patch does not change any functionality.
Signed-off-by: Bart Van Assche <bart.vanassche@wdc.com>
put_io_u(td, io_u);
return true;
} else if (ret == FIO_Q_QUEUED) {
put_io_u(td, io_u);
return true;
} else if (ret == FIO_Q_QUEUED) {
- if (td_io_commit(td))
- return true;
if (io_u_queued_complete(td, 1) < 0)
return true;
} else if (ret == FIO_Q_COMPLETED) {
if (io_u_queued_complete(td, 1) < 0)
return true;
} else if (ret == FIO_Q_COMPLETED) {
if (io_u_sync_complete(td, io_u) < 0)
return true;
} else if (ret == FIO_Q_BUSY) {
if (io_u_sync_complete(td, io_u) < 0)
return true;
} else if (ret == FIO_Q_BUSY) {
- if (td_io_commit(td))
- return true;
enum fio_ddir ddir, uint64_t *bytes_issued, int from_verify,
struct timespec *comp_time)
{
enum fio_ddir ddir, uint64_t *bytes_issued, int from_verify,
struct timespec *comp_time)
{
switch (*ret) {
case FIO_Q_COMPLETED:
if (io_u->error) {
switch (*ret) {
case FIO_Q_COMPLETED:
if (io_u->error) {
if (!from_verify)
unlog_io_piece(td, io_u);
requeue_io_u(td, &io_u);
if (!from_verify)
unlog_io_piece(td, io_u);
requeue_io_u(td, &io_u);
- ret2 = td_io_commit(td);
- if (ret2 < 0)
- *ret = ret2;
break;
default:
assert(*ret < 0);
break;
default:
assert(*ret < 0);
* io's that have been actually submitted to an async engine,
* and cur_depth is meaningless for sync engines.
*/
* io's that have been actually submitted to an async engine,
* and cur_depth is meaningless for sync engines.
*/
- if (td->io_u_queued || td->cur_depth) {
- int fio_unused ret;
-
- ret = td_io_commit(td);
- }
+ if (td->io_u_queued || td->cur_depth)
+ td_io_commit(td);
while (td->io_u_in_flight) {
int ret;
while (td->io_u_in_flight) {
int ret;
td->ts.total_io_u[io_u->ddir]++;
}
} else if (ret == FIO_Q_QUEUED) {
td->ts.total_io_u[io_u->ddir]++;
}
} else if (ret == FIO_Q_QUEUED) {
td->io_u_queued++;
if (ddir_rw(io_u->ddir) || ddir_sync(io_u->ddir))
td->ts.total_io_u[io_u->ddir]++;
td->io_u_queued++;
if (ddir_rw(io_u->ddir) || ddir_sync(io_u->ddir))
td->ts.total_io_u[io_u->ddir]++;
- if (td->io_u_queued >= td->o.iodepth_batch) {
- r = td_io_commit(td);
- if (r < 0)
- return r;
- }
+ if (td->io_u_queued >= td->o.iodepth_batch)
+ td_io_commit(td);
}
if (!td_ioengine_flagged(td, FIO_SYNCIO)) {
}
if (!td_ioengine_flagged(td, FIO_SYNCIO)) {
-int td_io_commit(struct thread_data *td)
+void td_io_commit(struct thread_data *td)
{
int ret;
dprint(FD_IO, "calling ->commit(), depth %d\n", td->cur_depth);
if (!td->cur_depth || !td->io_u_queued)
{
int ret;
dprint(FD_IO, "calling ->commit(), depth %d\n", td->cur_depth);
if (!td->cur_depth || !td->io_u_queued)
io_u_mark_depth(td, td->io_u_queued);
io_u_mark_depth(td, td->io_u_queued);
*/
td->io_u_in_flight += td->io_u_queued;
td->io_u_queued = 0;
*/
td->io_u_in_flight += td->io_u_queued;
td->io_u_queued = 0;
}
int td_io_open_file(struct thread_data *td, struct fio_file *f)
}
int td_io_open_file(struct thread_data *td, struct fio_file *f)
extern int __must_check td_io_prep(struct thread_data *, struct io_u *);
extern int __must_check td_io_queue(struct thread_data *, struct io_u *);
extern int __must_check td_io_getevents(struct thread_data *, unsigned int, unsigned int, const struct timespec *);
extern int __must_check td_io_prep(struct thread_data *, struct io_u *);
extern int __must_check td_io_queue(struct thread_data *, struct io_u *);
extern int __must_check td_io_getevents(struct thread_data *, unsigned int, unsigned int, const struct timespec *);
-extern int __must_check td_io_commit(struct thread_data *);
+extern void td_io_commit(struct thread_data *);
extern int __must_check td_io_open_file(struct thread_data *, struct fio_file *);
extern int td_io_close_file(struct thread_data *, struct fio_file *);
extern int td_io_unlink_file(struct thread_data *, struct fio_file *);
extern int __must_check td_io_open_file(struct thread_data *, struct fio_file *);
extern int td_io_close_file(struct thread_data *, struct fio_file *);
extern int td_io_unlink_file(struct thread_data *, struct fio_file *);