Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:aio_complete* Called when the io request on the given iocb is complete.

Proto:static void aio_complete(struct aio_kiocb *iocb)

Type:void

Parameter:

TypeParameterName
struct aio_kiocb *iocb
1090  ctx = ki_ctx
1101  spin_lock_irqsave( & completion_lock, flags)
1103  tail = tail
1104  pos = tail + AIO_EVENTS_OFFSET
1106  If ++tail >= Size of ringbuffer, in units of struct io_event Then tail = 0
1109  ev_page = kmap_atomic(ring_pages[pos / AIO_EVENTS_PER_PAGE])
1110  event = ev_page + pos % AIO_EVENTS_PER_PAGE
1112  event = ki_res
1114  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(ev_page)
1115  flush_dcache_page(ring_pages[pos / AIO_EVENTS_PER_PAGE])
1117  pr_debug("%p[%u]: %p: %p %Lx %Lx %Lx\n", ctx, tail, iocb, (void__user * )(unsignedlong)what iocb this event came from , he data field from the iocb , sult code for this event , secondary result )
1124  smp_wmb()
1126  tail = tail
1128  ring = kmap_atomic(ring_pages[0])
1129  head = Written to by userland or under ring_lock * mutex by aio_read_events_ring().
1130  tail = tail
1131  Prevent people trying to call kunmap_atomic() as if it were kunmap()* kunmap_atomic() should get the return value of kmap_atomic, not the page.(ring)
1132  flush_dcache_page(ring_pages[0])
1134  completed_events++
1135  If completed_events > 1 Then ll_reqs_available* Updates the reqs_available reference counts used for tracking the* number of free slots in the completion ring. This can be called* from aio_complete() (to optimistically update reqs_available) or
1137  spin_unlock_irqrestore( & completion_lock, flags)
1139  pr_debug("added to ring %p at [%u]\n", iocb, tail)
1146  If If the aio_resfd field of the userspace iocb is not zero,* this is the underlying eventfd context to deliver events to. Then ventfd_signal - Adds @n to the eventfd counter
1155  smp_mb()
1157  If waitqueue_active -- locklessly test for waiters on the queue*@wq_head: the waitqueue to test for waiters* returns true if the wait list is not empty* NOTE: this function is lockless and requires care, incorrect usage _will_ Then wake_up( & wait)
Caller
NameDescribe
iocb_put