| 1401 | } |
| 1402 | |
| 1403 | static inline boolean_t |
| 1404 | arc_buf_is_shared(arc_buf_t *buf) |
| 1405 | { |
| 1406 | boolean_t shared = (buf->b_data != NULL && |
| 1407 | buf->b_hdr->b_l1hdr.b_pabd != NULL && |
| 1408 | abd_is_linear(buf->b_hdr->b_l1hdr.b_pabd) && |
| 1409 | buf->b_data == abd_to_buf(buf->b_hdr->b_l1hdr.b_pabd)); |
| 1410 | IMPLY(shared, HDR_SHARED_DATA(buf->b_hdr)); |
| 1411 | IMPLY(shared, ARC_BUF_SHARED(buf)); |
| 1412 | IMPLY(shared, ARC_BUF_COMPRESSED(buf) || ARC_BUF_LAST(buf)); |
| 1413 | |
| 1414 | /* |
| 1415 | * It would be nice to assert arc_can_share() too, but the "hdr isn't |
| 1416 | * already being shared" requirement prevents us from doing that. |
| 1417 | */ |
| 1418 | |
| 1419 | return (shared); |
| 1420 | } |
| 1421 | |
| 1422 | /* |
| 1423 | * Free the checksum associated with this header. If there is no checksum, this |
no test coverage detected