358 #define BP_GET_COMPRESS(bp) BF64_GET((bp)->blk_prop, 32, 7)
359 #define BP_SET_COMPRESS(bp, x) BF64_SET((bp)->blk_prop, 32, 7, x)
360
361 #define BP_IS_EMBEDDED(bp) BF64_GET((bp)->blk_prop, 39, 1)
362 #define BP_SET_EMBEDDED(bp, x) BF64_SET((bp)->blk_prop, 39, 1, x)
363
364 #define BP_GET_CHECKSUM(bp) \
365 (BP_IS_EMBEDDED(bp) ? ZIO_CHECKSUM_OFF : \
366 BF64_GET((bp)->blk_prop, 40, 8))
367 #define BP_SET_CHECKSUM(bp, x) do { \
368 ASSERT(!BP_IS_EMBEDDED(bp)); \
369 BF64_SET((bp)->blk_prop, 40, 8, x); \
370 _NOTE(CONSTCOND) } while (0)
371
372 #define BP_GET_TYPE(bp) BF64_GET((bp)->blk_prop, 48, 8)
373 #define BP_SET_TYPE(bp, x) BF64_SET((bp)->blk_prop, 48, 8, x)
374
375 #define BP_GET_LEVEL(bp) BF64_GET((bp)->blk_prop, 56, 5)
376 #define BP_SET_LEVEL(bp, x) BF64_SET((bp)->blk_prop, 56, 5, x)
377
378 #define BP_GET_DEDUP(bp) BF64_GET((bp)->blk_prop, 62, 1)
379 #define BP_SET_DEDUP(bp, x) BF64_SET((bp)->blk_prop, 62, 1, x)
380
381 #define BP_GET_BYTEORDER(bp) BF64_GET((bp)->blk_prop, 63, 1)
382 #define BP_SET_BYTEORDER(bp, x) BF64_SET((bp)->blk_prop, 63, 1, x)
383
384 #define BP_PHYSICAL_BIRTH(bp) \
385 (BP_IS_EMBEDDED(bp) ? 0 : \
386 (bp)->blk_phys_birth ? (bp)->blk_phys_birth : (bp)->blk_birth)
387
388 #define BP_SET_BIRTH(bp, logical, physical) \
389 { \
390 ASSERT(!BP_IS_EMBEDDED(bp)); \
391 (bp)->blk_birth = (logical); \
392 (bp)->blk_phys_birth = ((logical) == (physical) ? 0 : (physical)); \
393 }
394
395 #define BP_GET_FILL(bp) (BP_IS_EMBEDDED(bp) ? 1 : (bp)->blk_fill)
396
397 #define BP_GET_ASIZE(bp) \
|
358 #define BP_GET_COMPRESS(bp) BF64_GET((bp)->blk_prop, 32, 7)
359 #define BP_SET_COMPRESS(bp, x) BF64_SET((bp)->blk_prop, 32, 7, x)
360
361 #define BP_IS_EMBEDDED(bp) BF64_GET((bp)->blk_prop, 39, 1)
362 #define BP_SET_EMBEDDED(bp, x) BF64_SET((bp)->blk_prop, 39, 1, x)
363
364 #define BP_GET_CHECKSUM(bp) \
365 (BP_IS_EMBEDDED(bp) ? ZIO_CHECKSUM_OFF : \
366 BF64_GET((bp)->blk_prop, 40, 8))
367 #define BP_SET_CHECKSUM(bp, x) do { \
368 ASSERT(!BP_IS_EMBEDDED(bp)); \
369 BF64_SET((bp)->blk_prop, 40, 8, x); \
370 _NOTE(CONSTCOND) } while (0)
371
372 #define BP_GET_TYPE(bp) BF64_GET((bp)->blk_prop, 48, 8)
373 #define BP_SET_TYPE(bp, x) BF64_SET((bp)->blk_prop, 48, 8, x)
374
375 #define BP_GET_LEVEL(bp) BF64_GET((bp)->blk_prop, 56, 5)
376 #define BP_SET_LEVEL(bp, x) BF64_SET((bp)->blk_prop, 56, 5, x)
377
378 #define BP_GET_PROP_RESERVATION(bp) BF64_GET((bp)->blk_prop, 61, 1)
379 #define BP_SET_PROP_RESERVATION(bp, x) BF64_SET((bp)->blk_prop, 61, 1, x)
380
381 #define BP_GET_DEDUP(bp) BF64_GET((bp)->blk_prop, 62, 1)
382 #define BP_SET_DEDUP(bp, x) BF64_SET((bp)->blk_prop, 62, 1, x)
383
384 #define BP_GET_BYTEORDER(bp) BF64_GET((bp)->blk_prop, 63, 1)
385 #define BP_SET_BYTEORDER(bp, x) BF64_SET((bp)->blk_prop, 63, 1, x)
386
387 #define BP_PHYSICAL_BIRTH(bp) \
388 (BP_IS_EMBEDDED(bp) ? 0 : \
389 (bp)->blk_phys_birth ? (bp)->blk_phys_birth : (bp)->blk_birth)
390
391 #define BP_SET_BIRTH(bp, logical, physical) \
392 { \
393 ASSERT(!BP_IS_EMBEDDED(bp)); \
394 (bp)->blk_birth = (logical); \
395 (bp)->blk_phys_birth = ((logical) == (physical) ? 0 : (physical)); \
396 }
397
398 #define BP_GET_FILL(bp) (BP_IS_EMBEDDED(bp) ? 1 : (bp)->blk_fill)
399
400 #define BP_GET_ASIZE(bp) \
|