Function report |
Source Code:block\bio-integrity.c |
Create Date:2022-07-28 18:02:29 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:_integrity_prep - Prepare bio for integrity I/O*@bio: bio to prepare* Description: Checks if the bio already has an integrity payload attached.* If it does, the payload has been generated by another kernel subsystem,* and we just pass it through
Proto:bool bio_integrity_prep(struct bio *bio)
Type:bool
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct bio * | bio |
| 202 | bi = blk_get_integrity(bi_disk) |
| 211 | If Not bi Then Return true |
| 214 | If bio_op(bio) != REQ_OP_READ && bio_op(bio) != REQ_OP_WRITE Then Return true |
| 217 | If Not bio_sectors(bio) Then Return true |
| 221 | If bio_integrity(bio) Then Return true |
| 225 | If Not verify_fn || Not (flags & BLK_INTEGRITY_VERIFY) Then Return true |
| 228 | Else |
| 229 | If Not generate_fn || Not (flags & BLK_INTEGRITY_GENERATE) Then Return true |
| 236 | len = intervals * tuple_size |
| 237 | buf = Allocation memory |
| 238 | status = BLK_STS_RESOURCE |
| 239 | If Value for the false possibility is greater at compile time(buf == NULL) Then |
| 241 | Go to err_end_io |
| 244 | end = buf + len + PAGE_SIZE - 1 >> PAGE_SHIFT determines the page size |
| 245 | start = buf >> PAGE_SHIFT determines the page size |
| 253 | status = BLK_STS_RESOURCE |
| 254 | Go to err_end_io |
| 257 | control flags |= BIP_BLOCK_INTEGRITY |
| 258 | residual I/O count = len |
| 261 | If flags & BLK_INTEGRITY_IP_CHECKSUM Then control flags |= BIP_IP_CHECKSUM |
| 265 | offset = offset_in_page(buf) |
| 270 | If len <= 0 Then Break |
| 279 | If ret == 0 Then |
| 282 | status = BLK_STS_RESOURCE |
| 283 | Go to err_end_io |
| 291 | offset = 0 |
| 295 | If Return the data direction, READ or WRITE.(bio) == WRITE Then |
| 298 | Else |
| 301 | Return true |
| 303 | err_end_io : |
| 306 | Return false |
| Name | Describe |
|---|---|
| blk_mq_make_request |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |