函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bio.c Create Date:2022-07-27 18:30:40
Last Modify:2020-03-17 23:13:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__bio_iov_iter_get_pages - pin user or kernel pages and add them to a bio*@bio: bio to add pages to*@iter: iov iterator describing the region to be mapped* Pins pages from *iter and appends them to @bio's bvec array. The

函数原型:static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)

返回类型:int

参数:

类型参数名称
struct bio *bio
struct iov_iter *iter
922  nr_pages等于 max bvl_vecs we can hold how many bio_vec's
923  entries_left等于 max bvl_vecs we can hold how many bio_vec's
924  bv等于 the actual vec list how many bio_vec's
925  pages等于bv
926  bool same_page = false
936  BUILD_BUG_ON - break compile if a condition is true(PAGE_PTRS_PER_BVEC < 2)
937  pages加等于entries_leftPAGE_PTRS_PER_BVEC减1的差
939  size等于iov_iter_get_pages(iter, pages, LONG_MAX, nr_pages, & offset)
940  如果此条件成立可能性小(为编译器优化)(size <= 0)则返回:如果sizesize否则负EFAULT
943 left大于0循环
944  page等于pages[i]
946  len等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(size_t, PAGE_SIZE - offset, left)
951  否则
956  offset等于0
959  iov_iter_advance(iter, size)
960  返回:0
调用者
名称描述
bio_iov_iter_get_pages_iov_iter_get_pages - add user or kernel pages to a bio*@bio: bio to add pages to*@iter: iov iterator describing the region to be added* This takes either an iterator pointing to user memory, or one pointing to* kernel pages (BVEC iterator)