Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Fetch an sqe, if one is available. Note that sqe_ptr will point to memory* that is mapped by userspace. This means that care needs to be taken to* ensure that reads are stable, as we cannot rely on userspace always* being a good citizen

Proto:static bool io_get_sqring(struct io_ring_ctx *ctx, struct io_kiocb *req, const struct io_uring_sqe **sqe_ptr)

Type:bool

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
struct io_kiocb *req
const struct io_uring_sqe **sqe_ptr
3739  rings = rings
3740  sq_array = * Ring buffer of indices into array of io_uring_sqe, which is * mmapped by the application using the IORING_OFF_SQES offset. * This indirection could e.g. be used to assign fixed * io_uring_sqe entries to operations and only submit them to * the queue when
3751  head = cached_sq_head
3753  If Value for the false possibility is greater at compile time(head == smp_load_acquire( & tail)) Then Return false
3756  head = READ_ONCE(sq_array[head & sq_mask])
3757  If Value is more likely to compile time(head < sq_entries) Then
3763  sequence = cached_sq_head
3764  sqe_ptr = sq_sqes[head]
3765  opcode = READ_ONCE(ype of operation for this sqe )
3766  user_data = READ_ONCE(data to be passed back at completion time )
3767  cached_sq_head++
3768  Return true
3772  cached_sq_head++
3773  cached_sq_dropped++
3774  WRITE_ONCE(Number of invalid entries dropped by the kernel due to* invalid index stored in array* Written by the kernel, shouldn't be modified by the* application (i, cached_sq_dropped)
3775  Return false
Caller
NameDescribe
io_submit_sqes