equal
deleted
inserted
replaced
617 |
617 |
618 ASSERT(zp->zp_checksum >= ZIO_CHECKSUM_OFF && |
618 ASSERT(zp->zp_checksum >= ZIO_CHECKSUM_OFF && |
619 zp->zp_checksum < ZIO_CHECKSUM_FUNCTIONS && |
619 zp->zp_checksum < ZIO_CHECKSUM_FUNCTIONS && |
620 zp->zp_compress >= ZIO_COMPRESS_OFF && |
620 zp->zp_compress >= ZIO_COMPRESS_OFF && |
621 zp->zp_compress < ZIO_COMPRESS_FUNCTIONS && |
621 zp->zp_compress < ZIO_COMPRESS_FUNCTIONS && |
622 zp->zp_type < DMU_OT_NUMTYPES && |
622 DMU_OT_IS_VALID(zp->zp_type) && |
623 zp->zp_level < 32 && |
623 zp->zp_level < 32 && |
624 zp->zp_copies > 0 && |
624 zp->zp_copies > 0 && |
625 zp->zp_copies <= spa_max_replication(spa) && |
625 zp->zp_copies <= spa_max_replication(spa) && |
626 zp->zp_dedup <= 1 && |
626 zp->zp_dedup <= 1 && |
627 zp->zp_dedup_verify <= 1); |
627 zp->zp_dedup_verify <= 1); |
901 void *cbuf = zio_buf_alloc(psize); |
901 void *cbuf = zio_buf_alloc(psize); |
902 |
902 |
903 zio_push_transform(zio, cbuf, psize, psize, zio_decompress); |
903 zio_push_transform(zio, cbuf, psize, psize, zio_decompress); |
904 } |
904 } |
905 |
905 |
906 if (!dmu_ot[BP_GET_TYPE(bp)].ot_metadata && BP_GET_LEVEL(bp) == 0) |
906 if (!DMU_OT_IS_METADATA(BP_GET_TYPE(bp)) && BP_GET_LEVEL(bp) == 0) |
907 zio->io_flags |= ZIO_FLAG_DONT_CACHE; |
907 zio->io_flags |= ZIO_FLAG_DONT_CACHE; |
908 |
908 |
909 if (BP_GET_TYPE(bp) == DMU_OT_DDT_ZAP) |
909 if (BP_GET_TYPE(bp) == DMU_OT_DDT_ZAP) |
910 zio->io_flags |= ZIO_FLAG_DONT_CACHE; |
910 zio->io_flags |= ZIO_FLAG_DONT_CACHE; |
911 |
911 |
2987 zio_vdev_io_done, |
2987 zio_vdev_io_done, |
2988 zio_vdev_io_assess, |
2988 zio_vdev_io_assess, |
2989 zio_checksum_verify, |
2989 zio_checksum_verify, |
2990 zio_done |
2990 zio_done |
2991 }; |
2991 }; |
|
2992 |
|
2993 /* dnp is the dnode for zb1->zb_object */ |
|
2994 boolean_t |
|
2995 zbookmark_is_before(const dnode_phys_t *dnp, const zbookmark_t *zb1, |
|
2996 const zbookmark_t *zb2) |
|
2997 { |
|
2998 uint64_t zb1nextL0, zb2thisobj; |
|
2999 |
|
3000 ASSERT(zb1->zb_objset == zb2->zb_objset); |
|
3001 ASSERT(zb2->zb_level == 0); |
|
3002 |
|
3003 /* |
|
3004 * A bookmark in the deadlist is considered to be after |
|
3005 * everything else. |
|
3006 */ |
|
3007 if (zb2->zb_object == DMU_DEADLIST_OBJECT) |
|
3008 return (B_TRUE); |
|
3009 |
|
3010 /* The objset_phys_t isn't before anything. */ |
|
3011 if (dnp == NULL) |
|
3012 return (B_FALSE); |
|
3013 |
|
3014 zb1nextL0 = (zb1->zb_blkid + 1) << |
|
3015 ((zb1->zb_level) * (dnp->dn_indblkshift - SPA_BLKPTRSHIFT)); |
|
3016 |
|
3017 zb2thisobj = zb2->zb_object ? zb2->zb_object : |
|
3018 zb2->zb_blkid << (DNODE_BLOCK_SHIFT - DNODE_SHIFT); |
|
3019 |
|
3020 if (zb1->zb_object == DMU_META_DNODE_OBJECT) { |
|
3021 uint64_t nextobj = zb1nextL0 * |
|
3022 (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT) >> DNODE_SHIFT; |
|
3023 return (nextobj <= zb2thisobj); |
|
3024 } |
|
3025 |
|
3026 if (zb1->zb_object < zb2thisobj) |
|
3027 return (B_TRUE); |
|
3028 if (zb1->zb_object > zb2thisobj) |
|
3029 return (B_FALSE); |
|
3030 if (zb2->zb_object == DMU_META_DNODE_OBJECT) |
|
3031 return (B_FALSE); |
|
3032 return (zb1nextL0 <= zb2->zb_blkid); |
|
3033 } |