summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2021-08-30 19:37:41 -0600
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-09-15 09:50:47 +0200
commit24fbd77d5a0fd2f22d5a0e8570499302b2dea2be (patch)
tree16d833997f876822fdd1043ef42add84665ba8f4
parent656f343d724b45295f73000eb6e7bd3d212af116 (diff)
downloadlinux-stable-24fbd77d5a0fd2f22d5a0e8570499302b2dea2be.tar.gz
linux-stable-24fbd77d5a0fd2f22d5a0e8570499302b2dea2be.tar.bz2
linux-stable-24fbd77d5a0fd2f22d5a0e8570499302b2dea2be.zip
io_uring: IORING_OP_WRITE needs hash_reg_file set
commit 7b3188e7ed54102a5dcc73d07727f41fb528f7c8 upstream. During some testing, it became evident that using IORING_OP_WRITE doesn't hash buffered writes like the other writes commands do. That's simply an oversight, and can cause performance regressions when doing buffered writes with this command. Correct that and add the flag, so that buffered writes are correctly hashed when using the non-iovec based write command. Cc: stable@vger.kernel.org Fixes: 3a6820f2bb8a ("io_uring: add non-vectored read/write commands") Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--fs/io_uring.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/io_uring.c b/fs/io_uring.c
index 108b0ed31c11..2009d1cda606 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -889,6 +889,7 @@ static const struct io_op_def io_op_defs[] = {
},
[IORING_OP_WRITE] = {
.needs_file = 1,
+ .hash_reg_file = 1,
.unbound_nonreg_file = 1,
.pollout = 1,
.async_size = sizeof(struct io_async_rw),