diff options
| author | Toomas Soome <tsoome@FreeBSD.org> | 2025-08-15 04:55:49 +0000 |
|---|---|---|
| committer | Toomas Soome <tsoome@FreeBSD.org> | 2025-08-15 04:55:49 +0000 |
| commit | 6e25c4321cd5fcf54fa63f20cb787713245a87a8 (patch) | |
| tree | ec68d0c3e25d781ba5e11fed367dda1369aa7bcd /usr.sbin/makefs | |
| parent | 5205b32de3fb7702e96b3991f5b1a61eee406d8b (diff) | |
Diffstat (limited to 'usr.sbin/makefs')
| -rw-r--r-- | usr.sbin/makefs/zfs.c | 2 | ||||
| -rw-r--r-- | usr.sbin/makefs/zfs/vdev.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index 8d50c450541b..e33a182e5c8f 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -596,7 +596,7 @@ pool_labels_write(zfs_opt_t *zfs) * checksum is calculated in vdev_label_write(). */ for (size_t uoff = 0; uoff < sizeof(label->vl_uberblock); - uoff += (1 << zfs->ashift)) { + uoff += ASHIFT_UBERBLOCK_SIZE(zfs->ashift)) { ub = (uberblock_t *)(&label->vl_uberblock[0] + uoff); ub->ub_magic = UBERBLOCK_MAGIC; ub->ub_version = SPA_VERSION; diff --git a/usr.sbin/makefs/zfs/vdev.c b/usr.sbin/makefs/zfs/vdev.c index afcce402cb13..a2423e180ca3 100644 --- a/usr.sbin/makefs/zfs/vdev.c +++ b/usr.sbin/makefs/zfs/vdev.c @@ -200,7 +200,7 @@ vdev_label_write(zfs_opt_t *zfs, int ind, const vdev_label_t *labelp) * per sector; for example, with an ashift of 12 we end up with * 128KB/4KB=32 copies of the uberblock in the ring. */ - blksz = 1 << zfs->ashift; + blksz = ASHIFT_UBERBLOCK_SIZE(zfs->ashift); assert(sizeof(label->vl_uberblock) % blksz == 0); for (size_t roff = 0; roff < sizeof(label->vl_uberblock); roff += blksz) { |
