From: Pavel Begunkov <[email protected]>
To: Jens Axboe <[email protected]>, [email protected]
Subject: [PATCH liburing 2/3] test/rw: remove not used mixed_fixed flag
Date: Sun, 6 Dec 2020 12:51:22 +0000 [thread overview]
Message-ID: <6b50a177a1c89d1917a0dd857210cf28a441c1a2.1607258973.git.asml.silence@gmail.com> (raw)
In-Reply-To: <[email protected]>
mixed_fixed is not used, kill it
Signed-off-by: Pavel Begunkov <[email protected]>
---
test/read-write.c | 37 +++++++++++++++----------------------
1 file changed, 15 insertions(+), 22 deletions(-)
diff --git a/test/read-write.c b/test/read-write.c
index d47bebb..2399c32 100644
--- a/test/read-write.c
+++ b/test/read-write.c
@@ -56,8 +56,8 @@ static int create_file(const char *file)
return ret != FILE_SIZE;
}
-static int __test_io(const char *file, struct io_uring *ring, int write, int buffered,
- int sqthread, int fixed, int mixed_fixed, int nonvec,
+static int __test_io(const char *file, struct io_uring *ring, int write,
+ int buffered, int sqthread, int fixed, int nonvec,
int buf_select, int seq, int exp_len)
{
struct io_uring_sqe *sqe;
@@ -67,10 +67,9 @@ static int __test_io(const char *file, struct io_uring *ring, int write, int buf
off_t offset;
#ifdef VERBOSE
- fprintf(stdout, "%s: start %d/%d/%d/%d/%d/%d: ", __FUNCTION__, write,
+ fprintf(stdout, "%s: start %d/%d/%d/%d/%d: ", __FUNCTION__, write,
buffered, sqthread,
- fixed, mixed_fixed,
- nonvec);
+ fixed, nonvec);
#endif
if (sqthread && geteuid()) {
#ifdef VERBOSE
@@ -239,7 +238,7 @@ err:
return 1;
}
static int test_io(const char *file, int write, int buffered, int sqthread,
- int fixed, int mixed_fixed, int nonvec)
+ int fixed, int nonvec)
{
struct io_uring ring;
int ret, ring_flags;
@@ -263,8 +262,8 @@ static int test_io(const char *file, int write, int buffered, int sqthread,
return 1;
}
- ret = __test_io(file, &ring, write, buffered, sqthread, fixed,
- mixed_fixed, nonvec, 0, 0, BS);
+ ret = __test_io(file, &ring, write, buffered, sqthread, fixed, nonvec,
+ 0, 0, BS);
io_uring_queue_exit(&ring);
return ret;
@@ -442,7 +441,7 @@ static int test_buf_select_short(const char *filename, int nonvec)
io_uring_cqe_seen(&ring, cqe);
}
- ret = __test_io(filename, &ring, 0, 0, 0, 0, 0, nonvec, 1, 1, exp_len);
+ ret = __test_io(filename, &ring, 0, 0, 0, 0, nonvec, 1, 1, exp_len);
io_uring_queue_exit(&ring);
return ret;
@@ -476,7 +475,7 @@ static int test_buf_select(const char *filename, int nonvec)
for (i = 0; i < BUFFERS; i++)
memset(vecs[i].iov_base, i, vecs[i].iov_len);
- ret = __test_io(filename, &ring, 1, 0, 0, 0, 0, 0, 0, 1, BS);
+ ret = __test_io(filename, &ring, 1, 0, 0, 0, 0, 0, 1, BS);
if (ret) {
fprintf(stderr, "failed writing data\n");
return 1;
@@ -506,7 +505,7 @@ static int test_buf_select(const char *filename, int nonvec)
io_uring_cqe_seen(&ring, cqe);
}
- ret = __test_io(filename, &ring, 0, 0, 0, 0, 0, nonvec, 1, 1, BS);
+ ret = __test_io(filename, &ring, 0, 0, 0, 0, nonvec, 1, 1, BS);
io_uring_queue_exit(&ring);
return ret;
@@ -690,25 +689,19 @@ int main(int argc, char *argv[])
}
/* if we don't have nonvec read, skip testing that */
- if (has_nonvec_read())
- nr = 64;
- else
- nr = 32;
+ nr = has_nonvec_read() ? 32 : 16;
for (i = 0; i < nr; i++) {
int write = (i & 1) != 0;
int buffered = (i & 2) != 0;
int sqthread = (i & 4) != 0;
int fixed = (i & 8) != 0;
- int mixed_fixed = (i & 16) != 0;
- int nonvec = (i & 32) != 0;
+ int nonvec = (i & 16) != 0;
- ret = test_io(fname, write, buffered, sqthread, fixed,
- mixed_fixed, nonvec);
+ ret = test_io(fname, write, buffered, sqthread, fixed, nonvec);
if (ret) {
- fprintf(stderr, "test_io failed %d/%d/%d/%d/%d/%d\n",
- write, buffered, sqthread, fixed,
- mixed_fixed, nonvec);
+ fprintf(stderr, "test_io failed %d/%d/%d/%d/%d\n",
+ write, buffered, sqthread, fixed, nonvec);
goto err;
}
}
--
2.24.0
next prev parent reply other threads:[~2020-12-06 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-06 12:51 [PATCH liburing 0/3] test reg buffers more Pavel Begunkov
2020-12-06 12:51 ` [PATCH liburing 1/3] test/rw: name flags for clearness Pavel Begunkov
2020-12-06 12:51 ` Pavel Begunkov [this message]
2020-12-06 12:51 ` [PATCH liburing 3/3] test/rw: test reg bufs with non-align sizes/offset Pavel Begunkov
2020-12-07 15:49 ` [PATCH liburing 0/3] test reg buffers more Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6b50a177a1c89d1917a0dd857210cf28a441c1a2.1607258973.git.asml.silence@gmail.com \
[email protected] \
[email protected] \
[email protected] \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox