X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=engines%2Fnet.c;h=df8b62597ef681392c76f25110d4dd9007b98870;hb=1601cc905c8b42d8b1735e0767ac753df8805ad9;hp=0cda953c852a11dba34602b21098c77b222863ec;hpb=b67740d3620aee7c753987cdcf750fa28d871fcf;p=fio.git diff --git a/engines/net.c b/engines/net.c index 0cda953c..df8b6259 100644 --- a/engines/net.c +++ b/engines/net.c @@ -28,7 +28,6 @@ struct netio_data { static int fio_netio_prep(struct thread_data *td, struct io_u *io_u) { struct netio_data *nd = td->io_ops->data; - struct fio_file *f = io_u->file; /* * Make sure we don't see spurious reads to a receiver, and vice versa @@ -39,17 +38,7 @@ static int fio_netio_prep(struct thread_data *td, struct io_u *io_u) return 1; } - if (io_u->ddir == DDIR_SYNC) - return 0; - if (io_u->offset == f->last_completed_pos) - return 0; - - /* - * If offset is different from last end position, it's a seek. - * As network io is purely sequential, we don't allow seeks. - */ - td_verror(td, EINVAL, "cannot seek"); - return 1; + return 0; } static int splice_io_u(int fdin, int fdout, unsigned int len) @@ -198,6 +187,8 @@ static int fio_netio_queue(struct thread_data *td, struct io_u *io_u) struct netio_data *nd = td->io_ops->data; int ret; + fio_ro_check(td, io_u); + if (io_u->ddir == DDIR_WRITE) { if (nd->use_splice) ret = fio_netio_splice_out(td, io_u); @@ -461,7 +452,8 @@ static struct ioengine_ops ioengine_rw = { .cleanup = fio_netio_cleanup, .open_file = fio_netio_open_file, .close_file = generic_close_file, - .flags = FIO_SYNCIO | FIO_DISKLESSIO, + .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR | + FIO_SIGQUIT, }; static struct ioengine_ops ioengine_splice = { @@ -474,7 +466,8 @@ static struct ioengine_ops ioengine_splice = { .cleanup = fio_netio_cleanup, .open_file = fio_netio_open_file, .close_file = generic_close_file, - .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR, + .flags = FIO_SYNCIO | FIO_DISKLESSIO | FIO_UNIDIR | + FIO_SIGQUIT, }; static void fio_init fio_netio_register(void)