mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
Illumos 4370, 4371
4370 avoid transmitting holes during zfs send 4371 DMU code clean up Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Christopher Siden <christopher.siden@delphix.com> Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Approved by: Garrett D'Amore <garrett@damore.org>a References: https://www.illumos.org/issues/4370 https://www.illumos.org/issues/4371 https://github.com/illumos/illumos-gate/commit/43466aa Ported by: Tim Chase <tim@chase2k.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2529
This commit is contained in:
committed by
Brian Behlendorf
parent
fa86b5dbb6
commit
b0bc7a84d9
+8
-4
@@ -795,7 +795,7 @@ buf_hash(uint64_t spa, const dva_t *dva, uint64_t birth)
|
||||
#define BUF_EMPTY(buf) \
|
||||
((buf)->b_dva.dva_word[0] == 0 && \
|
||||
(buf)->b_dva.dva_word[1] == 0 && \
|
||||
(buf)->b_birth == 0)
|
||||
(buf)->b_cksum0 == 0)
|
||||
|
||||
#define BUF_EQUAL(spa, dva, birth, buf) \
|
||||
((buf)->b_dva.dva_word[0] == (dva)->dva_word[0]) && \
|
||||
@@ -3854,9 +3854,13 @@ arc_write_done(zio_t *zio)
|
||||
ASSERT(hdr->b_acb == NULL);
|
||||
|
||||
if (zio->io_error == 0) {
|
||||
hdr->b_dva = *BP_IDENTITY(zio->io_bp);
|
||||
hdr->b_birth = BP_PHYSICAL_BIRTH(zio->io_bp);
|
||||
hdr->b_cksum0 = zio->io_bp->blk_cksum.zc_word[0];
|
||||
if (BP_IS_HOLE(zio->io_bp)) {
|
||||
buf_discard_identity(hdr);
|
||||
} else {
|
||||
hdr->b_dva = *BP_IDENTITY(zio->io_bp);
|
||||
hdr->b_birth = BP_PHYSICAL_BIRTH(zio->io_bp);
|
||||
hdr->b_cksum0 = zio->io_bp->blk_cksum.zc_word[0];
|
||||
}
|
||||
} else {
|
||||
ASSERT(BUF_EMPTY(hdr));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user