mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 10:54:35 +03:00
OpenZFS 6513 - partially filled holes lose birth time
Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: George Wilson <george.wilson@delphix.com> Reviewed by: Boris Protopopov <bprotopopov@hotmail.com> Approved by: Richard Lowe <richlowe@richlowe.net>a Ported by: Boris Protopopov <bprotopopov@actifio.com> Signed-off-by: Boris Protopopov <bprotopopov@actifio.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> OpenZFS-issue: https://www.illumos.org/issues/6513 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/8df0bcf0 If a ZFS object contains a hole at level one, and then a data block is created at level 0 underneath that l1 block, l0 holes will be created. However, these l0 holes do not have the birth time property set; as a result, incremental sends will not send those holes. Fix is to modify the dbuf_read code to fill in birth time data.
This commit is contained in:
committed by
Brian Behlendorf
parent
100a91aa3e
commit
bc77ba73fe
+22
-9
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2011, 2016 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
|
||||
*/
|
||||
|
||||
@@ -737,9 +737,10 @@ zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp,
|
||||
zio_t *
|
||||
zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
|
||||
void *data, uint64_t size, const zio_prop_t *zp,
|
||||
zio_done_func_t *ready, zio_done_func_t *physdone, zio_done_func_t *done,
|
||||
void *private,
|
||||
zio_priority_t priority, enum zio_flag flags, const zbookmark_phys_t *zb)
|
||||
zio_done_func_t *ready, zio_done_func_t *children_ready,
|
||||
zio_done_func_t *physdone, zio_done_func_t *done,
|
||||
void *private, zio_priority_t priority, enum zio_flag flags,
|
||||
const zbookmark_phys_t *zb)
|
||||
{
|
||||
zio_t *zio;
|
||||
|
||||
@@ -758,6 +759,7 @@ zio_write(zio_t *pio, spa_t *spa, uint64_t txg, blkptr_t *bp,
|
||||
ZIO_DDT_CHILD_WRITE_PIPELINE : ZIO_WRITE_PIPELINE);
|
||||
|
||||
zio->io_ready = ready;
|
||||
zio->io_children_ready = children_ready;
|
||||
zio->io_physdone = physdone;
|
||||
zio->io_prop = *zp;
|
||||
|
||||
@@ -1132,6 +1134,16 @@ zio_write_bp_init(zio_t *zio)
|
||||
if (!IO_IS_ALLOCATING(zio))
|
||||
return (ZIO_PIPELINE_CONTINUE);
|
||||
|
||||
if (zio->io_children_ready != NULL) {
|
||||
/*
|
||||
* Now that all our children are ready, run the callback
|
||||
* associated with this zio in case it wants to modify the
|
||||
* data to be written.
|
||||
*/
|
||||
ASSERT3U(zp->zp_level, >, 0);
|
||||
zio->io_children_ready(zio);
|
||||
}
|
||||
|
||||
ASSERT(zio->io_child_type != ZIO_CHILD_DDT);
|
||||
|
||||
if (zio->io_bp_override) {
|
||||
@@ -2143,9 +2155,9 @@ zio_write_gang_block(zio_t *pio)
|
||||
|
||||
zio_nowait(zio_write(zio, spa, txg, &gbh->zg_blkptr[g],
|
||||
(char *)pio->io_data + (pio->io_size - resid), lsize, &zp,
|
||||
zio_write_gang_member_ready, NULL, NULL, &gn->gn_child[g],
|
||||
pio->io_priority, ZIO_GANG_CHILD_FLAGS(pio),
|
||||
&pio->io_bookmark));
|
||||
zio_write_gang_member_ready, NULL, NULL, NULL,
|
||||
&gn->gn_child[g], pio->io_priority,
|
||||
ZIO_GANG_CHILD_FLAGS(pio), &pio->io_bookmark));
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -2528,7 +2540,7 @@ zio_ddt_write(zio_t *zio)
|
||||
|
||||
dio = zio_write(zio, spa, txg, bp, zio->io_orig_data,
|
||||
zio->io_orig_size, &czp, NULL, NULL,
|
||||
zio_ddt_ditto_write_done, dde, zio->io_priority,
|
||||
NULL, zio_ddt_ditto_write_done, dde, zio->io_priority,
|
||||
ZIO_DDT_CHILD_FLAGS(zio), &zio->io_bookmark);
|
||||
|
||||
zio_push_transform(dio, zio->io_data, zio->io_size, 0, NULL);
|
||||
@@ -2549,7 +2561,8 @@ zio_ddt_write(zio_t *zio)
|
||||
ddt_phys_addref(ddp);
|
||||
} else {
|
||||
cio = zio_write(zio, spa, txg, bp, zio->io_orig_data,
|
||||
zio->io_orig_size, zp, zio_ddt_child_write_ready, NULL,
|
||||
zio->io_orig_size, zp,
|
||||
zio_ddt_child_write_ready, NULL, NULL,
|
||||
zio_ddt_child_write_done, dde, zio->io_priority,
|
||||
ZIO_DDT_CHILD_FLAGS(zio), &zio->io_bookmark);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user