Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\iov_iter.c Create Date:2022-07-28 06:22:42
Last Modify:2022-05-21 11:43:54 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:iov_iter_revert

Proto:void iov_iter_revert(struct iov_iter *i, size_t unroll)

Type:void

Parameter:

TypeParameterName
struct iov_iter *i
size_tunroll
1080  If Not unroll Then Return
1082  If WARN_ON(unroll > MAX_RW_COUNT) Then Return
1084  count += unroll
1085  If Value for the false possibility is greater at compile time(iov_iter_is_pipe(i)) Then
1086  pipe = pipe
1087  p_mask = ring_size - 1
1088  i_head = head
1089  off = iov_offset
1090  When 1 cycle
1091  b = bufs[i_head & p_mask]
1092  n = off - offset
1093  If unroll < n Then
1094  off -= unroll
1095  Break
1097  unroll -= n
1098  If Not unroll && i_head == start_head Then
1099  off = 0
1100  Break
1102  i_head--
1103  b = bufs[i_head & p_mask]
1104  off = offset + len
1106  iov_offset = off
1107  head = i_head
1108  pipe_truncate(i)
1109  Return
1111  If Value for the false possibility is greater at compile time(iov_iter_is_discard(i)) Then Return
1113  If unroll <= iov_offset Then
1114  iov_offset -= unroll
1115  Return
1117  unroll -= iov_offset
1118  If iov_iter_is_bvec(i) Then
1119  bvec = bvec
1120  When 1 cycle
1121  n = bv_len
1122  nr_segs++
1123  If unroll <= n Then
1124  bvec = bvec
1125  iov_offset = n - unroll
1126  Return
1128  unroll -= n
1130  Else
1131  iov = iov
1132  When 1 cycle
1134  nr_segs++
1135  If unroll <= n Then
1136  iov = iov
1137  iov_offset = n - unroll
1138  Return
1140  unroll -= n
Caller
NameDescribe
generic_file_direct_write
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