函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\aio.c Create Date:2022-07-29 10:53:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:aio_complete* Called when the io request on the given iocb is complete.

函数原型:static void aio_complete(struct aio_kiocb *iocb)

返回类型:void

参数:

类型参数名称
struct aio_kiocb *iocb
1090  ctx等于ki_ctx
1101  spin_lock_irqsave( & completion_lock, flags)
1103  tail等于tail
1104  pos等于tailAIO_EVENTS_OFFSET
1106  如果tail先自加大于等于 Size of ringbuffer, in units of struct io_event tail等于0
1109  ev_page等于kmap_atomic(ring_pages[pos / AIO_EVENTS_PER_PAGE])
1110  event等于ev_pagepos取模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)异步请求指针, 可携带的私有数据, IO请求的结果, 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  如果completed_events大于1则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 the aio_resfd field of the userspace iocb is not zero,* this is the underlying eventfd context to deliver events to.ventfd_signal - Adds @n to the eventfd counter
1155  smp_mb()
1157  如果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_wake_up( & wait)
调用者
名称描述
iocb_put