diff options
Diffstat (limited to 'usr/src')
-rw-r--r-- | usr/src/lib/libzfs/common/libzfs_pool.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr/src/lib/libzfs/common/libzfs_pool.c b/usr/src/lib/libzfs/common/libzfs_pool.c index 2632eab321..bdb7f93cab 100644 --- a/usr/src/lib/libzfs/common/libzfs_pool.c +++ b/usr/src/lib/libzfs/common/libzfs_pool.c @@ -4528,7 +4528,7 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name, char path[MAXPATHLEN]; struct dk_gpt *vtoc; int fd; - size_t resv = EFI_MIN_RESV_SIZE; + size_t resv; uint64_t slice_size; diskaddr_t start_block; char errbuf[1024]; @@ -4580,6 +4580,7 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name, return (zfs_error(hdl, EZFS_NOCAP, errbuf)); } + resv = efi_reserved_sectors(vtoc); /* * Why we use V_USR: V_BACKUP confuses users, and is considered @@ -4651,7 +4652,7 @@ zpool_label_disk(libzfs_handle_t *hdl, zpool_handle_t *zhp, const char *name, * ZFS is on slice 0 and slice 8 is reserved. */ slice_size = vtoc->efi_last_u_lba + 1; - slice_size -= EFI_MIN_RESV_SIZE; + slice_size -= resv; slice_size -= start_block; if (slice != NULL) *slice = 0; |