mirror of
https://github.com/torvalds/linux.git
synced 2024-11-12 23:23:03 +00:00
io_uring: move nop into its own file
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
5e2a18d93f
commit
e28683bdfc
@ -2,5 +2,5 @@
|
|||||||
#
|
#
|
||||||
# Makefile for io_uring
|
# Makefile for io_uring
|
||||||
|
|
||||||
obj-$(CONFIG_IO_URING) += io_uring.o xattr.o
|
obj-$(CONFIG_IO_URING) += io_uring.o xattr.o nop.o
|
||||||
obj-$(CONFIG_IO_WQ) += io-wq.o
|
obj-$(CONFIG_IO_WQ) += io-wq.o
|
||||||
|
@ -93,6 +93,7 @@
|
|||||||
#include "io_uring.h"
|
#include "io_uring.h"
|
||||||
|
|
||||||
#include "xattr.h"
|
#include "xattr.h"
|
||||||
|
#include "nop.h"
|
||||||
|
|
||||||
#define IORING_MAX_ENTRIES 32768
|
#define IORING_MAX_ENTRIES 32768
|
||||||
#define IORING_MAX_CQ_ENTRIES (2 * IORING_MAX_ENTRIES)
|
#define IORING_MAX_CQ_ENTRIES (2 * IORING_MAX_ENTRIES)
|
||||||
@ -4298,20 +4299,6 @@ done:
|
|||||||
return IOU_OK;
|
return IOU_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* IORING_OP_NOP just posts a completion event, nothing else.
|
|
||||||
*/
|
|
||||||
static int io_nop(struct io_kiocb *req, unsigned int issue_flags)
|
|
||||||
{
|
|
||||||
io_req_set_res(req, 0, 0);
|
|
||||||
return IOU_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
static int io_msg_ring_prep(struct io_kiocb *req,
|
static int io_msg_ring_prep(struct io_kiocb *req,
|
||||||
const struct io_uring_sqe *sqe)
|
const struct io_uring_sqe *sqe)
|
||||||
{
|
{
|
||||||
|
26
io_uring/nop.c
Normal file
26
io_uring/nop.c
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
#include <linux/kernel.h>
|
||||||
|
#include <linux/errno.h>
|
||||||
|
#include <linux/fs.h>
|
||||||
|
#include <linux/file.h>
|
||||||
|
#include <linux/io_uring.h>
|
||||||
|
|
||||||
|
#include <uapi/linux/io_uring.h>
|
||||||
|
|
||||||
|
#include "io_uring_types.h"
|
||||||
|
#include "io_uring.h"
|
||||||
|
#include "nop.h"
|
||||||
|
|
||||||
|
int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* IORING_OP_NOP just posts a completion event, nothing else.
|
||||||
|
*/
|
||||||
|
int io_nop(struct io_kiocb *req, unsigned int issue_flags)
|
||||||
|
{
|
||||||
|
io_req_set_res(req, 0, 0);
|
||||||
|
return IOU_OK;
|
||||||
|
}
|
4
io_uring/nop.h
Normal file
4
io_uring/nop.h
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
// SPDX-License-Identifier: GPL-2.0
|
||||||
|
|
||||||
|
int io_nop_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe);
|
||||||
|
int io_nop(struct io_kiocb *req, unsigned int issue_flags);
|
Loading…
Reference in New Issue
Block a user