Skip to content

Commit 4ae8bf4

Browse files
amotinbehlendorf
authored andcommitted
Allow physical rewrite without logical
During regular block writes ZFS sets both logical and physical birth times equal to the current TXG. During dedup and block cloning logical birth time is still set to the current TXG, but physical may be copied from the original block that was used. This represents the fact that logically user data has changed, but the physically it is the same old block. But block rewrite introduces a new situation, when block is not changed logically, but stored in a different place of the pool. From ARC, scrub and some other perspectives this is a new block, but for example for user applications or incremental replication it is not. Somewhat similar thing happen during remap phase of device removal, but in that case space blocks are still acounted as allocated at their logical birth times. This patch introduces a new "rewrite" flag in the block pointer structure, allowing to differentiate physical rewrite (when the block is actually reallocated at the physical birth time) from the device reval case (when the logical birth time is used). The new functionality is not used at this point, and the only expected change is that error log is now kept in terms of physical physical birth times, rather than logical, since if a block with logged error was somehow rewritten, then the previous error does not matter any more. This change also introduces a new TRAVERSE_LOGICAL flag to the traverse code, allowing zfs send, redact and diff to work in context of logical birth times, ignoring physical-only rewrites. It also changes nothing at this point due to lack of those writes, but they will come in a following patch. Reviewed-by: Rob Norris <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Closes #17565
1 parent 894edd0 commit 4ae8bf4

29 files changed

+205
-144
lines changed

cmd/zdb/zdb.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ sublivelist_verify_blkptr(void *arg, const blkptr_t *bp, boolean_t free,
208208
sublivelist_verify_block_t svb = {
209209
.svb_dva = bp->blk_dva[i],
210210
.svb_allocated_txg =
211-
BP_GET_LOGICAL_BIRTH(bp)
211+
BP_GET_BIRTH(bp)
212212
};
213213

214214
if (zfs_btree_find(&sv->sv_leftover, &svb,
@@ -2569,7 +2569,7 @@ snprintf_blkptr_compact(char *blkbuf, size_t buflen, const blkptr_t *bp,
25692569
(u_longlong_t)BP_GET_PSIZE(bp),
25702570
(u_longlong_t)BP_GET_FILL(bp),
25712571
(u_longlong_t)BP_GET_LOGICAL_BIRTH(bp),
2572-
(u_longlong_t)BP_GET_BIRTH(bp));
2572+
(u_longlong_t)BP_GET_PHYSICAL_BIRTH(bp));
25732573
if (bp_freed)
25742574
(void) snprintf(blkbuf + strlen(blkbuf),
25752575
buflen - strlen(blkbuf), " %s", "FREE");
@@ -2619,7 +2619,7 @@ visit_indirect(spa_t *spa, const dnode_phys_t *dnp,
26192619
{
26202620
int err = 0;
26212621

2622-
if (BP_GET_LOGICAL_BIRTH(bp) == 0)
2622+
if (BP_GET_BIRTH(bp) == 0)
26232623
return (0);
26242624

26252625
print_indirect(spa, bp, zb, dnp);
@@ -2807,7 +2807,7 @@ dump_bptree_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx)
28072807
(void) arg, (void) tx;
28082808
char blkbuf[BP_SPRINTF_LEN];
28092809

2810-
if (BP_GET_LOGICAL_BIRTH(bp) != 0) {
2810+
if (BP_GET_BIRTH(bp) != 0) {
28112811
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
28122812
(void) printf("\t%s\n", blkbuf);
28132813
}
@@ -2848,7 +2848,7 @@ dump_bpobj_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
28482848
(void) arg, (void) tx;
28492849
char blkbuf[BP_SPRINTF_LEN];
28502850

2851-
ASSERT(BP_GET_LOGICAL_BIRTH(bp) != 0);
2851+
ASSERT(BP_GET_BIRTH(bp) != 0);
28522852
snprintf_blkptr_compact(blkbuf, sizeof (blkbuf), bp, bp_freed);
28532853
(void) printf("\t%s\n", blkbuf);
28542854
return (0);
@@ -5922,11 +5922,11 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t *zilog, const blkptr_t *bp,
59225922
* entry back to the block pointer before we claim it.
59235923
*/
59245924
if (v == DDT_PHYS_FLAT) {
5925-
ASSERT3U(BP_GET_BIRTH(bp), ==,
5925+
ASSERT3U(BP_GET_PHYSICAL_BIRTH(bp), ==,
59265926
ddt_phys_birth(dde->dde_phys, v));
59275927
tempbp = *bp;
59285928
ddt_bp_fill(dde->dde_phys, v, &tempbp,
5929-
BP_GET_BIRTH(bp));
5929+
BP_GET_PHYSICAL_BIRTH(bp));
59305930
bp = &tempbp;
59315931
}
59325932

@@ -6152,7 +6152,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
61526152
if (zb->zb_level == ZB_DNODE_LEVEL)
61536153
return (0);
61546154

6155-
if (dump_opt['b'] >= 5 && BP_GET_LOGICAL_BIRTH(bp) > 0) {
6155+
if (dump_opt['b'] >= 5 && BP_GET_BIRTH(bp) > 0) {
61566156
char blkbuf[BP_SPRINTF_LEN];
61576157
snprintf_blkptr(blkbuf, sizeof (blkbuf), bp);
61586158
(void) printf("objset %llu object %llu "

cmd/zdb/zdb_il.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
176176

177177
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
178178
(void) printf("%shas blkptr, %s\n", tab_prefix,
179-
!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
179+
!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
180180
spa_min_claim_txg(zilog->zl_spa) ?
181181
"will claim" : "won't claim");
182182
print_log_bp(bp, tab_prefix);
@@ -189,7 +189,7 @@ zil_prt_rec_write(zilog_t *zilog, int txtype, const void *arg)
189189
(void) printf("%s<hole>\n", tab_prefix);
190190
return;
191191
}
192-
if (BP_GET_LOGICAL_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
192+
if (BP_GET_BIRTH(bp) < zilog->zl_header->zh_claim_txg) {
193193
(void) printf("%s<block already committed>\n",
194194
tab_prefix);
195195
return;
@@ -240,7 +240,7 @@ zil_prt_rec_write_enc(zilog_t *zilog, int txtype, const void *arg)
240240

241241
if (lr->lr_common.lrc_reclen == sizeof (lr_write_t)) {
242242
(void) printf("%shas blkptr, %s\n", tab_prefix,
243-
!BP_IS_HOLE(bp) && BP_GET_LOGICAL_BIRTH(bp) >=
243+
!BP_IS_HOLE(bp) && BP_GET_BIRTH(bp) >=
244244
spa_min_claim_txg(zilog->zl_spa) ?
245245
"will claim" : "won't claim");
246246
print_log_bp(bp, tab_prefix);
@@ -476,7 +476,7 @@ print_log_block(zilog_t *zilog, const blkptr_t *bp, void *arg,
476476

477477
if (claim_txg != 0)
478478
claim = "already claimed";
479-
else if (BP_GET_LOGICAL_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
479+
else if (BP_GET_BIRTH(bp) >= spa_min_claim_txg(zilog->zl_spa))
480480
claim = "will claim";
481481
else
482482
claim = "won't claim";

include/sys/dmu_traverse.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,13 @@ typedef int (blkptr_cb_t)(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
5959
*/
6060
#define TRAVERSE_NO_DECRYPT (1<<5)
6161

62+
/*
63+
* Always use logical birth time for birth time comparisons. This is useful
64+
* for operations that care about user data changes rather than physical
65+
* block rewrites (e.g., incremental replication).
66+
*/
67+
#define TRAVERSE_LOGICAL (1<<6)
68+
6269
/* Special traverse error return value to indicate skipping of children */
6370
#define TRAVERSE_VISIT_NO_CHILDREN -1
6471

include/sys/spa.h

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ typedef struct zio_cksum_salt {
140140
* +-------+-------+-------+-------+-------+-------+-------+-------+
141141
* 6 |BDX|lvl| type | cksum |E| comp| PSIZE | LSIZE |
142142
* +-------+-------+-------+-------+-------+-------+-------+-------+
143-
* 7 | padding |
143+
* 7 |R| padding |
144144
* +-------+-------+-------+-------+-------+-------+-------+-------+
145145
* 8 | padding |
146146
* +-------+-------+-------+-------+-------+-------+-------+-------+
@@ -175,6 +175,7 @@ typedef struct zio_cksum_salt {
175175
* E blkptr_t contains embedded data (see below)
176176
* lvl level of indirection
177177
* type DMU object type
178+
* R rewrite (reallocated/rewritten at phys birth TXG)
178179
* phys birth txg when dva[0] was written; zero if same as logical birth txg
179180
* note that typically all the dva's would be written in this
180181
* txg, but they could be different if they were moved by
@@ -204,7 +205,7 @@ typedef struct zio_cksum_salt {
204205
* +-------+-------+-------+-------+-------+-------+-------+-------+
205206
* 6 |BDX|lvl| type | cksum |E| comp| PSIZE | LSIZE |
206207
* +-------+-------+-------+-------+-------+-------+-------+-------+
207-
* 7 | padding |
208+
* 7 |R| padding |
208209
* +-------+-------+-------+-------+-------+-------+-------+-------+
209210
* 8 | padding |
210211
* +-------+-------+-------+-------+-------+-------+-------+-------+
@@ -373,7 +374,8 @@ typedef enum bp_embedded_type {
373374
typedef struct blkptr {
374375
dva_t blk_dva[SPA_DVAS_PER_BP]; /* Data Virtual Addresses */
375376
uint64_t blk_prop; /* size, compression, type, etc */
376-
uint64_t blk_pad[2]; /* Extra space for the future */
377+
uint64_t blk_prop2; /* additional properties */
378+
uint64_t blk_pad; /* Extra space for the future */
377379
uint64_t blk_birth_word[2];
378380
uint64_t blk_fill; /* fill count */
379381
zio_cksum_t blk_cksum; /* 256-bit checksum */
@@ -476,32 +478,51 @@ typedef struct blkptr {
476478
#define BP_GET_FREE(bp) BF64_GET((bp)->blk_fill, 0, 1)
477479
#define BP_SET_FREE(bp, x) BF64_SET((bp)->blk_fill, 0, 1, x)
478480

481+
/*
482+
* Block birth time macros for different use cases:
483+
* - BP_GET_LOGICAL_BIRTH(): When the block was logically modified by user.
484+
* To be used with a focus on user data, like incremental replication.
485+
* - BP_GET_PHYSICAL_BIRTH(): When the block was physically written to disks.
486+
* For regular writes is equal to logical birth. For dedup and block cloning
487+
* can be smaller than logical birth. For remapped and rewritten blocks can
488+
* be bigger. To be used with focus on physical disk content: ARC, DDT, scrub.
489+
* - BP_GET_RAW_PHYSICAL_BIRTH(): Raw physical birth value. Zero if equal
490+
* to logical birth. Should only be used for BP copying and debugging.
491+
* - BP_GET_BIRTH(): When the block was allocated, which is a physical birth
492+
* for rewritten blocks (rewrite flag set) or logical birth otherwise.
493+
*/
479494
#define BP_GET_LOGICAL_BIRTH(bp) (bp)->blk_birth_word[1]
480495
#define BP_SET_LOGICAL_BIRTH(bp, x) ((bp)->blk_birth_word[1] = (x))
481496

482-
#define BP_GET_PHYSICAL_BIRTH(bp) (bp)->blk_birth_word[0]
497+
#define BP_GET_RAW_PHYSICAL_BIRTH(bp) (bp)->blk_birth_word[0]
483498
#define BP_SET_PHYSICAL_BIRTH(bp, x) ((bp)->blk_birth_word[0] = (x))
484499

485-
#define BP_GET_BIRTH(bp) \
486-
(BP_IS_EMBEDDED(bp) ? 0 : \
487-
BP_GET_PHYSICAL_BIRTH(bp) ? BP_GET_PHYSICAL_BIRTH(bp) : \
500+
#define BP_GET_PHYSICAL_BIRTH(bp) \
501+
(BP_IS_EMBEDDED(bp) ? 0 : \
502+
BP_GET_RAW_PHYSICAL_BIRTH(bp) ? BP_GET_RAW_PHYSICAL_BIRTH(bp) : \
488503
BP_GET_LOGICAL_BIRTH(bp))
489504

490-
#define BP_SET_BIRTH(bp, logical, physical) \
491-
{ \
492-
ASSERT(!BP_IS_EMBEDDED(bp)); \
493-
BP_SET_LOGICAL_BIRTH(bp, logical); \
494-
BP_SET_PHYSICAL_BIRTH(bp, \
495-
((logical) == (physical) ? 0 : (physical))); \
505+
#define BP_GET_BIRTH(bp) \
506+
((BP_IS_EMBEDDED(bp) || !BP_GET_REWRITE(bp)) ? \
507+
BP_GET_LOGICAL_BIRTH(bp) : BP_GET_PHYSICAL_BIRTH(bp))
508+
509+
#define BP_SET_BIRTH(bp, logical, physical) \
510+
{ \
511+
ASSERT(!BP_IS_EMBEDDED(bp)); \
512+
BP_SET_LOGICAL_BIRTH(bp, logical); \
513+
BP_SET_PHYSICAL_BIRTH(bp, \
514+
((logical) == (physical) ? 0 : (physical))); \
496515
}
497516

498517
#define BP_GET_FILL(bp) \
499-
((BP_IS_ENCRYPTED(bp)) ? BF64_GET((bp)->blk_fill, 0, 32) : \
500-
((BP_IS_EMBEDDED(bp)) ? 1 : (bp)->blk_fill))
518+
(BP_IS_EMBEDDED(bp) ? 1 : \
519+
BP_IS_ENCRYPTED(bp) ? BF64_GET((bp)->blk_fill, 0, 32) : \
520+
(bp)->blk_fill)
501521

502522
#define BP_SET_FILL(bp, fill) \
503523
{ \
504-
if (BP_IS_ENCRYPTED(bp)) \
524+
ASSERT(!BP_IS_EMBEDDED(bp)); \
525+
if (BP_IS_ENCRYPTED(bp)) \
505526
BF64_SET((bp)->blk_fill, 0, 32, fill); \
506527
else \
507528
(bp)->blk_fill = fill; \
@@ -516,6 +537,15 @@ typedef struct blkptr {
516537
BF64_SET((bp)->blk_fill, 32, 32, iv2); \
517538
}
518539

540+
#define BP_GET_REWRITE(bp) \
541+
(BP_IS_EMBEDDED(bp) ? 0 : BF64_GET((bp)->blk_prop2, 63, 1))
542+
543+
#define BP_SET_REWRITE(bp, x) \
544+
{ \
545+
ASSERT(!BP_IS_EMBEDDED(bp)); \
546+
BF64_SET((bp)->blk_prop2, 63, 1, x); \
547+
}
548+
519549
#define BP_IS_METADATA(bp) \
520550
(BP_GET_LEVEL(bp) > 0 || DMU_OT_IS_METADATA(BP_GET_TYPE(bp)))
521551

@@ -545,7 +575,7 @@ typedef struct blkptr {
545575
(dva1)->dva_word[0] == (dva2)->dva_word[0])
546576

547577
#define BP_EQUAL(bp1, bp2) \
548-
(BP_GET_BIRTH(bp1) == BP_GET_BIRTH(bp2) && \
578+
(BP_GET_PHYSICAL_BIRTH(bp1) == BP_GET_PHYSICAL_BIRTH(bp2) && \
549579
BP_GET_LOGICAL_BIRTH(bp1) == BP_GET_LOGICAL_BIRTH(bp2) && \
550580
DVA_EQUAL(&(bp1)->blk_dva[0], &(bp2)->blk_dva[0]) && \
551581
DVA_EQUAL(&(bp1)->blk_dva[1], &(bp2)->blk_dva[1]) && \
@@ -588,8 +618,8 @@ typedef struct blkptr {
588618
{ \
589619
BP_ZERO_DVAS(bp); \
590620
(bp)->blk_prop = 0; \
591-
(bp)->blk_pad[0] = 0; \
592-
(bp)->blk_pad[1] = 0; \
621+
(bp)->blk_prop2 = 0; \
622+
(bp)->blk_pad = 0; \
593623
(bp)->blk_birth_word[0] = 0; \
594624
(bp)->blk_birth_word[1] = 0; \
595625
(bp)->blk_fill = 0; \
@@ -696,7 +726,7 @@ typedef struct blkptr {
696726
(u_longlong_t)BP_GET_LSIZE(bp), \
697727
(u_longlong_t)BP_GET_PSIZE(bp), \
698728
(u_longlong_t)BP_GET_LOGICAL_BIRTH(bp), \
699-
(u_longlong_t)BP_GET_BIRTH(bp), \
729+
(u_longlong_t)BP_GET_PHYSICAL_BIRTH(bp), \
700730
(u_longlong_t)BP_GET_FILL(bp), \
701731
ws, \
702732
(u_longlong_t)bp->blk_cksum.zc_word[0], \

lib/libzdb/libzdb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,9 @@ livelist_compare(const void *larg, const void *rarg)
9393
* Since we're storing blkptrs without cancelling FREE/ALLOC pairs,
9494
* it's possible the offsets are equal. In that case, sort by txg
9595
*/
96-
if (BP_GET_LOGICAL_BIRTH(l) < BP_GET_LOGICAL_BIRTH(r)) {
96+
if (BP_GET_BIRTH(l) < BP_GET_BIRTH(r)) {
9797
return (-1);
98-
} else if (BP_GET_LOGICAL_BIRTH(l) > BP_GET_LOGICAL_BIRTH(r)) {
98+
} else if (BP_GET_BIRTH(l) > BP_GET_BIRTH(r)) {
9999
return (+1);
100100
}
101101
return (0);

module/zfs/arc.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ static arc_buf_hdr_t *
10521052
buf_hash_find(uint64_t spa, const blkptr_t *bp, kmutex_t **lockp)
10531053
{
10541054
const dva_t *dva = BP_IDENTITY(bp);
1055-
uint64_t birth = BP_GET_BIRTH(bp);
1055+
uint64_t birth = BP_GET_PHYSICAL_BIRTH(bp);
10561056
uint64_t idx = BUF_HASH_INDEX(spa, dva, birth);
10571057
kmutex_t *hash_lock = BUF_HASH_LOCK(idx);
10581058
arc_buf_hdr_t *hdr;
@@ -5587,7 +5587,7 @@ arc_read_done(zio_t *zio)
55875587
if (HDR_IN_HASH_TABLE(hdr)) {
55885588
arc_buf_hdr_t *found;
55895589

5590-
ASSERT3U(hdr->b_birth, ==, BP_GET_BIRTH(zio->io_bp));
5590+
ASSERT3U(hdr->b_birth, ==, BP_GET_PHYSICAL_BIRTH(zio->io_bp));
55915591
ASSERT3U(hdr->b_dva.dva_word[0], ==,
55925592
BP_IDENTITY(zio->io_bp)->dva_word[0]);
55935593
ASSERT3U(hdr->b_dva.dva_word[1], ==,
@@ -5690,7 +5690,7 @@ arc_read_done(zio_t *zio)
56905690
error = SET_ERROR(EIO);
56915691
if ((zio->io_flags & ZIO_FLAG_SPECULATIVE) == 0) {
56925692
spa_log_error(zio->io_spa, &acb->acb_zb,
5693-
BP_GET_LOGICAL_BIRTH(zio->io_bp));
5693+
BP_GET_PHYSICAL_BIRTH(zio->io_bp));
56945694
(void) zfs_ereport_post(
56955695
FM_EREPORT_ZFS_AUTHENTICATION,
56965696
zio->io_spa, NULL, &acb->acb_zb, zio, 0);
@@ -6109,7 +6109,7 @@ arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
61096109

61106110
if (!embedded_bp) {
61116111
hdr->b_dva = *BP_IDENTITY(bp);
6112-
hdr->b_birth = BP_GET_BIRTH(bp);
6112+
hdr->b_birth = BP_GET_PHYSICAL_BIRTH(bp);
61136113
exists = buf_hash_insert(hdr, &hash_lock);
61146114
}
61156115
if (exists != NULL) {
@@ -6957,7 +6957,7 @@ arc_write_done(zio_t *zio)
69576957
buf_discard_identity(hdr);
69586958
} else {
69596959
hdr->b_dva = *BP_IDENTITY(zio->io_bp);
6960-
hdr->b_birth = BP_GET_BIRTH(zio->io_bp);
6960+
hdr->b_birth = BP_GET_PHYSICAL_BIRTH(zio->io_bp);
69616961
}
69626962
} else {
69636963
ASSERT(HDR_EMPTY(hdr));

module/zfs/bpobj.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,8 @@ space_range_cb(void *arg, const blkptr_t *bp, boolean_t bp_freed, dmu_tx_t *tx)
954954
(void) bp_freed, (void) tx;
955955
struct space_range_arg *sra = arg;
956956

957-
if (BP_GET_LOGICAL_BIRTH(bp) > sra->mintxg &&
958-
BP_GET_LOGICAL_BIRTH(bp) <= sra->maxtxg) {
957+
if (BP_GET_BIRTH(bp) > sra->mintxg &&
958+
BP_GET_BIRTH(bp) <= sra->maxtxg) {
959959
if (dsl_pool_sync_context(spa_get_dsl(sra->spa)))
960960
sra->used += bp_get_dsize_sync(sra->spa, bp);
961961
else

module/zfs/dbuf.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1243,11 +1243,9 @@ dbuf_verify(dmu_buf_impl_t *db)
12431243
DVA_IS_EMPTY(&bp->blk_dva[1]) &&
12441244
DVA_IS_EMPTY(&bp->blk_dva[2]));
12451245
ASSERT0(bp->blk_fill);
1246-
ASSERT0(bp->blk_pad[0]);
1247-
ASSERT0(bp->blk_pad[1]);
12481246
ASSERT(!BP_IS_EMBEDDED(bp));
12491247
ASSERT(BP_IS_HOLE(bp));
1250-
ASSERT0(BP_GET_PHYSICAL_BIRTH(bp));
1248+
ASSERT0(BP_GET_RAW_PHYSICAL_BIRTH(bp));
12511249
}
12521250
}
12531251
}
@@ -1623,7 +1621,7 @@ dbuf_read_impl(dmu_buf_impl_t *db, dnode_t *dn, zio_t *zio, dmu_flags_t flags,
16231621
*/
16241622
if (db->db_objset->os_encrypted && !BP_USES_CRYPT(bp)) {
16251623
spa_log_error(db->db_objset->os_spa, &zb,
1626-
BP_GET_LOGICAL_BIRTH(bp));
1624+
BP_GET_PHYSICAL_BIRTH(bp));
16271625
err = SET_ERROR(EIO);
16281626
goto early_unlock;
16291627
}
@@ -4907,7 +4905,7 @@ dbuf_write_ready(zio_t *zio, arc_buf_t *buf, void *vdb)
49074905
dnode_diduse_space(dn, delta - zio->io_prev_space_delta);
49084906
zio->io_prev_space_delta = delta;
49094907

4910-
if (BP_GET_LOGICAL_BIRTH(bp) != 0) {
4908+
if (BP_GET_BIRTH(bp) != 0) {
49114909
ASSERT((db->db_blkid != DMU_SPILL_BLKID &&
49124910
BP_GET_TYPE(bp) == dn->dn_type) ||
49134911
(db->db_blkid == DMU_SPILL_BLKID &&
@@ -5194,7 +5192,7 @@ dbuf_remap_impl(dnode_t *dn, blkptr_t *bp, krwlock_t *rw, dmu_tx_t *tx)
51945192
ASSERT(dsl_pool_sync_context(spa_get_dsl(spa)));
51955193

51965194
drica.drica_os = dn->dn_objset;
5197-
drica.drica_blk_birth = BP_GET_LOGICAL_BIRTH(bp);
5195+
drica.drica_blk_birth = BP_GET_BIRTH(bp);
51985196
drica.drica_tx = tx;
51995197
if (spa_remap_blkptr(spa, &bp_copy, dbuf_remap_impl_callback,
52005198
&drica)) {
@@ -5209,8 +5207,7 @@ dbuf_remap_impl(dnode_t *dn, blkptr_t *bp, krwlock_t *rw, dmu_tx_t *tx)
52095207
if (dn->dn_objset != spa_meta_objset(spa)) {
52105208
dsl_dataset_t *ds = dmu_objset_ds(dn->dn_objset);
52115209
if (dsl_deadlist_is_open(&ds->ds_dir->dd_livelist) &&
5212-
BP_GET_LOGICAL_BIRTH(bp) >
5213-
ds->ds_dir->dd_origin_txg) {
5210+
BP_GET_BIRTH(bp) > ds->ds_dir->dd_origin_txg) {
52145211
ASSERT(!BP_IS_EMBEDDED(bp));
52155212
ASSERT(dsl_dir_is_clone(ds->ds_dir));
52165213
ASSERT(spa_feature_is_enabled(spa,
@@ -5328,7 +5325,7 @@ dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx)
53285325
}
53295326

53305327
ASSERT(db->db_level == 0 || data == db->db_buf);
5331-
ASSERT3U(BP_GET_LOGICAL_BIRTH(db->db_blkptr), <=, txg);
5328+
ASSERT3U(BP_GET_BIRTH(db->db_blkptr), <=, txg);
53325329
ASSERT(pio);
53335330

53345331
SET_BOOKMARK(&zb, os->os_dsl_dataset ?

0 commit comments

Comments
 (0)