| 8012 | */ |
| 8013 | |
| 8014 | static boolean_t |
| 8015 | l2arc_write_eligible(uint64_t spa_guid, arc_buf_hdr_t *hdr) |
| 8016 | { |
| 8017 | /* |
| 8018 | * A buffer is *not* eligible for the L2ARC if it: |
| 8019 | * 1. belongs to a different spa. |
| 8020 | * 2. is already cached on the L2ARC. |
| 8021 | * 3. has an I/O in progress (it may be an incomplete read). |
| 8022 | * 4. is flagged not eligible (zfs property). |
| 8023 | */ |
| 8024 | if (hdr->b_spa != spa_guid || HDR_HAS_L2HDR(hdr) || |
| 8025 | HDR_IO_IN_PROGRESS(hdr) || !HDR_L2CACHE(hdr)) |
| 8026 | return (B_FALSE); |
| 8027 | |
| 8028 | return (B_TRUE); |
| 8029 | } |
| 8030 | |
| 8031 | static uint64_t |
| 8032 | l2arc_write_size(l2arc_dev_t *dev) |
no outgoing calls
no test coverage detected