mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 19:04:45 +03:00
ZTS: Fix create-o_ashift test case
The function that fills the uberblock ring buffer on every device label has been reworked to avoid occasional failures caused by a race condition that prevents 'zpool sync' from writing some uberblock sequentially: this happens when the pool sync ioctl dispatch code calls txg_wait_synced() while we're already waiting for a TXG to sync. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: loli10K <ezomori.nozomu@gmail.com> Closes #6924 Closes #6977
This commit is contained in:
+4
-4
@@ -2716,10 +2716,6 @@ dump_label(const char *dev)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (ioctl(fd, BLKFLSBUF) != 0)
|
||||
(void) printf("failed to invalidate cache '%s' : %s\n", path,
|
||||
strerror(errno));
|
||||
|
||||
if (fstat64_blk(fd, &statbuf) != 0) {
|
||||
(void) printf("failed to stat '%s': %s\n", path,
|
||||
strerror(errno));
|
||||
@@ -2727,6 +2723,10 @@ dump_label(const char *dev)
|
||||
exit(1);
|
||||
}
|
||||
|
||||
if (S_ISBLK(statbuf.st_mode) && ioctl(fd, BLKFLSBUF) != 0)
|
||||
(void) printf("failed to invalidate cache '%s' : %s\n", path,
|
||||
strerror(errno));
|
||||
|
||||
avl_create(&config_tree, cksum_record_compare,
|
||||
sizeof (cksum_record_t), offsetof(cksum_record_t, link));
|
||||
avl_create(&uberblock_tree, cksum_record_compare,
|
||||
|
||||
Reference in New Issue
Block a user