]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Restore identification of VDEVs using non-native block size
authorCy Schubert <cy@FreeBSD.org>
Thu, 22 Oct 2020 19:15:17 +0000 (12:15 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Fri, 30 Oct 2020 23:02:58 +0000 (16:02 -0700)
NAME         STATE     READ WRITE CKSUM
dsk02        ONLINE       0     0     0
  mirror-0   ONLINE       0     0     0
    ada1s4a  ONLINE       0     0     0
    ada2s4a  ONLINE       0     0     0  block size: 512B configured, 4096B native

Reviewed-by: Matt Macy <mmacy@FreeBSD.org>
Reviewed-by: Toomas Soome <tsoome@me.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed off by: Cy Schubert <cy@FreeBSD.org>
Closes #11088

cmd/zpool/zpool_main.c

index f612db48d4f904ab3061599f7fe23b3853cb26ec..83a9b5a5ac07720fd1e8bd4940c953cf936c8796 100644 (file)
@@ -2254,6 +2254,13 @@ print_status_config(zpool_handle_t *zhp, status_cbdata_t *cb, const char *name,
                        break;
                }
                color_end();
+       } else if (children == 0 && !isspare &&
+           getenv("ZPOOL_STATUS_NON_NATIVE_ASHIFT_IGNORE") == NULL &&
+           VDEV_STAT_VALID(vs_physical_ashift, vsc) &&
+           vs->vs_configured_ashift < vs->vs_physical_ashift) {
+               (void) printf(
+                   gettext("  block size: %dB configured, %dB native"),
+                   1 << vs->vs_configured_ashift, 1 << vs->vs_physical_ashift);
        }
 
        /* The root vdev has the scrub/resilver stats */