Skip to content

Commit 23c12d5

Browse files
isilenceaxboe
authored andcommitted
Revert "io_uring: add zc notification flush requests"
This reverts commit 492dddb. Soon we won't have the very notion of notification flushing, so remove notification flushing requests. Signed-off-by: Pavel Begunkov <[email protected]> Link: https://lore.kernel.org/r/8850334ca56e65b413cb34fd158db81d7b2865a3.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <[email protected]>
1 parent 7584710 commit 23c12d5

File tree

2 files changed

+0
-39
lines changed

2 files changed

+0
-39
lines changed

include/uapi/linux/io_uring.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ enum io_uring_op {
301301
*/
302302
enum {
303303
IORING_RSRC_UPDATE_FILES,
304-
IORING_RSRC_UPDATE_NOTIF,
305304
};
306305

307306
/*

io_uring/rsrc.c

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include "io_uring.h"
1616
#include "openclose.h"
1717
#include "rsrc.h"
18-
#include "notif.h"
1918

2019
struct io_rsrc_update {
2120
struct file *file;
@@ -741,50 +740,13 @@ static int io_files_update(struct io_kiocb *req, unsigned int issue_flags)
741740
return IOU_OK;
742741
}
743742

744-
static int io_notif_update(struct io_kiocb *req, unsigned int issue_flags)
745-
{
746-
struct io_rsrc_update *up = io_kiocb_to_cmd(req, struct io_rsrc_update);
747-
struct io_ring_ctx *ctx = req->ctx;
748-
unsigned len = up->nr_args;
749-
unsigned idx_end, idx = up->offset;
750-
int ret = 0;
751-
752-
io_ring_submit_lock(ctx, issue_flags);
753-
if (unlikely(check_add_overflow(idx, len, &idx_end))) {
754-
ret = -EOVERFLOW;
755-
goto out;
756-
}
757-
if (unlikely(idx_end > ctx->nr_notif_slots)) {
758-
ret = -EINVAL;
759-
goto out;
760-
}
761-
762-
for (; idx < idx_end; idx++) {
763-
struct io_notif_slot *slot = &ctx->notif_slots[idx];
764-
765-
if (!slot->notif)
766-
continue;
767-
if (up->arg)
768-
slot->tag = up->arg;
769-
io_notif_slot_flush_submit(slot, issue_flags);
770-
}
771-
out:
772-
io_ring_submit_unlock(ctx, issue_flags);
773-
if (ret < 0)
774-
req_set_fail(req);
775-
io_req_set_res(req, ret, 0);
776-
return IOU_OK;
777-
}
778-
779743
int io_rsrc_update(struct io_kiocb *req, unsigned int issue_flags)
780744
{
781745
struct io_rsrc_update *up = io_kiocb_to_cmd(req, struct io_rsrc_update);
782746

783747
switch (up->type) {
784748
case IORING_RSRC_UPDATE_FILES:
785749
return io_files_update(req, issue_flags);
786-
case IORING_RSRC_UPDATE_NOTIF:
787-
return io_notif_update(req, issue_flags);
788750
}
789751
return -EINVAL;
790752
}

0 commit comments

Comments
 (0)