Why ZIL replay hole blkptr will zero data? #17899
Unanswered
gnlwlb-cmyk
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
I guess hole block pointer might be a result of a zero-compressed block. In which case I'd also replay it by writing zeroes. Though I don't understand your part of "resulting in the blkptrwithin the ZIL record becoming a hole". |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I encountered a scenario involving a ZIL log address pointer being a hole:
The filesystem mode was set to sync=always, logbias=throughput, using a separate log (SLOG) device on a dedicated disk. During mixed read/write testing with vdbench, when the machine lost power, the following sequence occurred:
Read request #1 failed, triggering vdev_probe, which set: vd->vdev_cant_write |= !vps->vps_writeable;
Write request #2 failed during metaslab_alloc because vd->vdev_cant_write was set, resulting in the blkptrwithin the ZIL record becoming a hole.
The parent ZIO for the ZIL write (associated with request #2) completed successfully.
After machine recovery, during zpool import, ZIL replay started and encountered the ZIL record with the hole. The code then wrote zeros for the data, as shown below, leading to data loss:
static int
zil_read_log_data(zilog_t *zilog, const lr_write_t *lr, void *wbuf)
{
zio_flag_t zio_flags = ZIO_FLAG_CANFAIL;
const blkptr_t *bp = &lr->lr_blkptr;
arc_flags_t aflags = ARC_FLAG_WAIT;
arc_buf_t *abuf = NULL;
zbookmark_phys_t zb;
int error;
}
Is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions