Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-core.c Create Date:2022-07-28 16:59:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Remap block n of partition p to block n+start(p) of the disk.

Proto:static inline int blk_partition_remap(struct bio *bio)

Type:int

Parameter:

TypeParameterName
struct bio *bio
843  ret = -EIO
845  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
846  p = __disk_get_part(bi_disk, bi_partno)
847  If Value for the false possibility is greater at compile time(!p) Then Go to out
849  If Value for the false possibility is greater at compile time(should_fail_request(p, residual I/O count )) Then Go to out
851  If Value for the false possibility is greater at compile time(bio_check_ro(bio, p)) Then Go to out
854  If bio_sectors(bio) Then
855  If Check whether this bio extends beyond the end of the device or partition.* This may well happen - the kernel calls bread() without checking the size of* the device, e.g., when mounting a file system. Then Go to out
857  device address in 512 byte sectors += start_sect
858  lock_bio_remap - map request for a logical device to the raw device*@q: queue holding the operation*@bio: revised operation*@dev: device for the operation*@from: original sector for the operation* An operation for a logical device has been mapped to the
861  bi_partno = 0
862  ret = 0
863  out :
864  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
865  Return ret
Caller
NameDescribe
generic_make_request_checks