mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Implement dynamic gang header sizes
ZFS gang block headers are currently fixed at 512 bytes. This is increasingly wasteful in the era of larger disk sector sizes. This PR allows any size allocation to work as a gang header. It also contains supporting changes to ZDB to make gang headers easier to work with. Sponsored-by: Klara, Inc. Sponsored-by: Wasabi Technology, Inc. Reviewed-by: Alexander Motin <mav@FreeBSD.org> Reviewed-by: Tony Hutter <hutter2@llnl.gov> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Rob Norris <rob.norris@klarasystems.com> Reviewed-by: Allan Jude <allan@klarasystems.com> Signed-off-by: Paul Dagnelie <paul.dagnelie@klarasystems.com> Closes #17004
This commit is contained in:
committed by
Brian Behlendorf
parent
e845be28e7
commit
a981cb69e4
+3
-3
@@ -8588,9 +8588,9 @@ zdb_dump_indirect(blkptr_t *bp, int nbps, int flags)
|
||||
}
|
||||
|
||||
static void
|
||||
zdb_dump_gbh(void *buf, int flags)
|
||||
zdb_dump_gbh(void *buf, uint64_t size, int flags)
|
||||
{
|
||||
zdb_dump_indirect((blkptr_t *)buf, SPA_GBH_NBLKPTRS, flags);
|
||||
zdb_dump_indirect((blkptr_t *)buf, gbh_nblkptrs(size), flags);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -9073,7 +9073,7 @@ zdb_read_block(char *thing, spa_t *spa)
|
||||
zdb_dump_indirect((blkptr_t *)buf,
|
||||
orig_lsize / sizeof (blkptr_t), flags);
|
||||
else if (flags & ZDB_FLAG_GBH)
|
||||
zdb_dump_gbh(buf, flags);
|
||||
zdb_dump_gbh(buf, lsize, flags);
|
||||
else
|
||||
zdb_dump_block(thing, buf, lsize, flags);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user