summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFengnan Chang <changfengnan@bytedance.com>2025-06-23 14:02:18 +0300
committerJens Axboe <axboe@kernel.dk>2025-06-23 17:58:44 +0300
commit88a80066af1617fab444776135d840467414beb6 (patch)
treebd6ccb1c6b4119e2e28f6d798319cdaeaaa81a25
parent51a4598ad5d9eb6be4ec9ba65bbfdf0ac302eb2e (diff)
downloadlinux-88a80066af1617fab444776135d840467414beb6.tar.xz
io_uring: make fallocate be hashed work
Like ftruncate and write, fallocate operations on the same file cannot be executed in parallel, so it is better to make fallocate be hashed work. Signed-off-by: Fengnan Chang <changfengnan@bytedance.com> Link: https://lore.kernel.org/r/20250623110218.61490-1-changfengnan@bytedance.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--io_uring/opdef.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/io_uring/opdef.c b/io_uring/opdef.c
index 6e0882b051f9..6de6229207a8 100644
--- a/io_uring/opdef.c
+++ b/io_uring/opdef.c
@@ -216,6 +216,7 @@ const struct io_issue_def io_issue_defs[] = {
},
[IORING_OP_FALLOCATE] = {
.needs_file = 1,
+ .hash_reg_file = 1,
.prep = io_fallocate_prep,
.issue = io_fallocate,
},