Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:io_allocate_scq_urings

Proto:static int io_allocate_scq_urings(struct io_ring_ctx *ctx, struct io_uring_params *p)

Type:int

Parameter:

TypeParameterName
struct io_ring_ctx *ctx
struct io_uring_params *p
5236  size = rings_size(sq_entries, cq_entries, & sq_array_offset)
5237  If size == SIZE_MAX Then Return -EOVERFLOW
5240  rings = io_mem_alloc(size)
5241  If Not rings Then Return -ENOMEM
5244  rings = rings
5245  * 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 = rings + sq_array_offset
5246  Bitmasks to apply to head and tail offsets (constant, equals* ring_entries - 1) = sq_entries - 1
5247  Bitmasks to apply to head and tail offsets (constant, equals* ring_entries - 1) = cq_entries - 1
5248  Ring sizes (constant, power of 2) = sq_entries
5249  Ring sizes (constant, power of 2) = cq_entries
5250  sq_mask = Bitmasks to apply to head and tail offsets (constant, equals* ring_entries - 1)
5251  cq_mask = Bitmasks to apply to head and tail offsets (constant, equals* ring_entries - 1)
5252  sq_entries = Ring sizes (constant, power of 2)
5253  cq_entries = Ring sizes (constant, power of 2)
5255  size = array_size() - Calculate size of 2-dimensional array.*@a: dimension one*@b: dimension two* Calculates size of 2-dimensional array: @a *@b.* Returns: number of bytes needed to represent the array or SIZE_MAX on* overflow.
5256  If size == SIZE_MAX Then
5257  io_mem_free(rings)
5258  rings = NULL
5259  Return -EOVERFLOW
5262  sq_sqes = io_mem_alloc(size)
5263  If Not sq_sqes Then
5264  io_mem_free(rings)
5265  rings = NULL
5266  Return -ENOMEM
5269  Return 0
Caller
NameDescribe
io_uring_create