Merge tag 'usb-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
[linux-2.6-block.git] / io_uring / opdef.c
index b1ee3a9c38072933dd020848b7f3586af257d912..9c080aadc5a662f5fb9e8a15fd9a0f956405fb76 100644 (file)
@@ -35,6 +35,7 @@
 #include "rw.h"
 #include "waitid.h"
 #include "futex.h"
+#include "truncate.h"
 
 static int io_no_issue(struct io_kiocb *req, unsigned int issue_flags)
 {
@@ -474,6 +475,12 @@ const struct io_issue_def io_issue_defs[] = {
                .prep                   = io_install_fixed_fd_prep,
                .issue                  = io_install_fixed_fd,
        },
+       [IORING_OP_FTRUNCATE] = {
+               .needs_file             = 1,
+               .hash_reg_file          = 1,
+               .prep                   = io_ftruncate_prep,
+               .issue                  = io_ftruncate,
+       },
 };
 
 const struct io_cold_def io_cold_defs[] = {
@@ -712,6 +719,9 @@ const struct io_cold_def io_cold_defs[] = {
        [IORING_OP_FIXED_FD_INSTALL] = {
                .name                   = "FIXED_FD_INSTALL",
        },
+       [IORING_OP_FTRUNCATE] = {
+               .name                   = "FTRUNCATE",
+       },
 };
 
 const char *io_uring_get_opcode(u8 opcode)