]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/vdev.c
Replace P2ALIGN with P2ALIGN_TYPED and delete P2ALIGN.
[mirror_zfs.git] / module / zfs / vdev.c
index c5551eb6cf6e6d189083e29eed52432e56907324..414bf84f6f7ae83e4651e4f9bff81d58264d26a4 100644 (file)
@@ -348,7 +348,8 @@ vdev_get_min_asize(vdev_t *vd)
         * to the nearest metaslab.
         */
        if (vd == vd->vdev_top)
-               return (P2ALIGN(vd->vdev_asize, 1ULL << vd->vdev_ms_shift));
+               return (P2ALIGN_TYPED(vd->vdev_asize, 1ULL << vd->vdev_ms_shift,
+                   uint64_t));
 
        return (pvd->vdev_ops->vdev_op_min_asize(pvd));
 }
@@ -2115,8 +2116,8 @@ vdev_open(vdev_t *vd)
                }
        }
 
-       osize = P2ALIGN(osize, (uint64_t)sizeof (vdev_label_t));
-       max_osize = P2ALIGN(max_osize, (uint64_t)sizeof (vdev_label_t));
+       osize = P2ALIGN_TYPED(osize, sizeof (vdev_label_t), uint64_t);
+       max_osize = P2ALIGN_TYPED(max_osize, sizeof (vdev_label_t), uint64_t);
 
        if (vd->vdev_children == 0) {
                if (osize < SPA_MINDEVSIZE) {
@@ -4764,9 +4765,9 @@ vdev_get_stats_ex(vdev_t *vd, vdev_stat_t *vs, vdev_stat_ex_t *vsx)
                 * can expand.
                 */
                if (vd->vdev_aux == NULL && tvd != NULL) {
-                       vs->vs_esize = P2ALIGN(
+                       vs->vs_esize = P2ALIGN_TYPED(
                            vd->vdev_max_asize - vd->vdev_asize,
-                           1ULL << tvd->vdev_ms_shift);
+                           1ULL << tvd->vdev_ms_shift, uint64_t);
                }
 
                vs->vs_configured_ashift = vd->vdev_top != NULL