Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:iomap_dio_complete

Proto:static ssize_t iomap_dio_complete(struct iomap_dio *dio)

Type:ssize_t

Parameter:

TypeParameterName
struct iomap_dio *dio
75  dops = dops
76  iocb = iocb
77  inode = file_inode(ki_filp)
78  offset = The 'ki_filp' pointer is shared in a union for aio
79  ret = error
81  If dops && end_io Then ret = end_io(iocb, size, ret, flags)
84  If Value is more likely to compile time(!ret) Then
85  ret = size
87  If offset + ret > i_size && Not (flags & IOMAP_DIO_WRITE) Then ret = i_size - offset
90  The 'ki_filp' pointer is shared in a union for aio += ret
105  If Not error && flags & IOMAP_DIO_WRITE && nrpages Then
108  err = validate_inode_pages2_range - remove range of pages from an address_space*@mapping: the address_space*@start: the page offset 'from' which to invalidate*@end: the page offset 'to' which to invalidate (inclusive)* Any pages which are found to be mapped
111  If err Then Warn about a page cache invalidation failure during a direct I/O write.
119  If ret > 0 && flags & IOMAP_DIO_NEED_SYNC Then ret = Sync the bytes written if this was a synchronous write. Expect ki_pos* to already be updated for the write, and will return either the amount* of bytes passed in, or an error if syncing the file failed.
122  de_dio_end - signal finish of a direct I/O requests*@inode: inode the direct I/O happens on* This is called once we've finished processing a direct I/O request,* and is used to wake up callers waiting for direct I/O to be quiesced.
123  kfree(dio)
125  Return ret
Caller
NameDescribe
iomap_dio_complete_work
iomap_dio_rwmap_dio_rw() always completes O_[D]SYNC writes regardless of whether the IO* is being issued as AIO or not. This allows us to optimise pure data writes* to use REQ_FUA rather than requiring generic_write_sync() to issue a* REQ_FLUSH post write