Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bio.c Create Date:2022-07-28 16:55:27
Last Modify:2020-03-17 23:13:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__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

Proto:static int __bio_iov_iter_get_pages(struct bio *bio, struct iov_iter *iter)

Type:int

Parameter:

TypeParameterName
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_left * (PAGE_PTRS_PER_BVEC - 1)
939  size = iov_iter_get_pages(iter, pages, LONG_MAX, nr_pages, & offset)
940  If Value for the false possibility is greater at compile time(size <= 0) Then Return If size Then size Else -EFAULT
943  When left > 0 cycle
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  Else
956  offset = 0
959  iov_iter_advance(iter, size)
960  Return 0
Caller
NameDescribe
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)