函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:splice_pipe_to_pipe

函数原型:static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags)

返回类型:int

参数:

类型参数名称
struct pipe_inode_info *ipipe
struct pipe_inode_info *opipe
size_tlen
unsigned intflags
1544  ret等于0
1545  bool input_wakeup = false
1548  retry :
1549  ret等于Make sure there's data to read. Wait for input if we can, otherwise* return an appropriate error.
1550  如果ret则返回:ret
1553  ret等于Make sure there's writeable room. Wait for room if we can, otherwise* return an appropriate error.
1554  如果ret则返回:ret
1562  pipe_double_lock(ipipe, opipe)
1564  i_tail等于tail
1565  i_mask等于ring_size减1
1566  o_head等于head
1567  o_mask等于ring_size减1
1569  循环
1572  如果非readers
1574  如果非retret等于负EPIPE
1576  退出
1579  i_head等于head
1580  o_tail等于tail
1582  如果pipe_empty - Return true if the pipe is empty*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer且非writers退出
1592  如果ret退出
1596  ret等于负EAGAIN
1597  退出
1605  pipe_unlock(ipipe)
1606  pipe_unlock(opipe)
1607  转到:retry
1610  ibuf等于bufs[i_tail & i_mask]
1611  obuf等于bufs[o_head & o_mask]
1613  如果len大于等于len
1617  obuf等于ibuf
1618  ops = NULL
1619  i_tail自加
1620  tail等于i_tail
1621  input_wakeup = true
1622  o_len等于len
1623  o_head自加
1624  head等于o_head
1625  否则
1631  如果ret恒等于0则ret等于负EFAULT
1633  退出
1635  obuf等于ibuf
1641  flags与等于page is a gift 的反
1645  len等于len
1646  offset加等于len
1647  len减等于len
1648  o_len等于len
1649  o_head自加
1650  head等于o_head
1652  ret加等于o_len
1653  len减等于o_len
1654 len循环
1656  pipe_unlock(ipipe)
1657  pipe_unlock(opipe)
1662  如果ret大于0则wakeup_pipe_readers(opipe)
1665  如果input_wakeupwakeup_pipe_writers(ipipe)
1668  返回:ret
调用者
名称描述
do_spliceDetermine where to splice to/from.