]> granicus.if.org Git - zfs/commitdiff
OpenZFS 5120 - zfs should allow large block/gzip/raidz boot pool (loader project)
authorBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 13 Apr 2017 16:40:00 +0000 (09:40 -0700)
committerGitHub <noreply@github.com>
Thu, 13 Apr 2017 16:40:00 +0000 (09:40 -0700)
Authored by: Toomas Soome <tsoome@me.com>
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Don Brady <don.brady@intel.com>
Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
Porting Notes:
grub-2.02-beta2-422-gcad5cc0 includes support for large blocks.
- Commit 8aab121 allowed GZIP[1-9].
- Grub allows pools with multiple top-level vdevs.

OpenZFS-issue: https://www.illumos.org/issues/5120
OpenZFS-commit: https://github.com/openzfs/openzfs/commit/c8811bd
Closes #6007

include/sys/zio.h
module/zfs/spa.c
module/zfs/vdev.c
module/zfs/zfs_ioctl.c

index b69146b6e481e241e018901f5a9ecf1c73588986..23c918af18ce78a2d1539bf9d3bf5fcb9cf555e2 100644 (file)
@@ -24,6 +24,8 @@
  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2012, 2017 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright 2016 Toomas Soome <tsoome@me.com>
  */
 
 #ifndef _ZIO_H
index f573fe0d79682929165a5ff6448d92bc1db4d4c2..638ec59efd646cdc2545bea5734e554dc2ce60ca 100644 (file)
@@ -26,6 +26,8 @@
  * Copyright (c) 2013, 2014, Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
  * Copyright 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright (c) 2016 Actifio, Inc. All rights reserved.
  */
 
@@ -534,12 +536,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *props)
                                    &propval)) == 0 &&
                                    !BOOTFS_COMPRESS_VALID(propval)) {
                                        error = SET_ERROR(ENOTSUP);
-                               } else if ((error =
-                                   dsl_prop_get_int_ds(dmu_objset_ds(os),
-                                   zfs_prop_to_name(ZFS_PROP_RECORDSIZE),
-                                   &propval)) == 0 &&
-                                   propval > SPA_OLD_MAXBLOCKSIZE) {
-                                       error = SET_ERROR(ENOTSUP);
                                } else if ((error =
                                    dsl_prop_get_int_ds(dmu_objset_ds(os),
                                    zfs_prop_to_name(ZFS_PROP_DNODESIZE),
index 40293ec1fc10c7a2d72f258eac4c26575aceb894..caf92899d0c8e964652493a68d5316dd518188c8 100644 (file)
@@ -23,6 +23,8 @@
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016 Toomas Soome <tsoome@me.com>
  */
 
 #include <sys/zfs_context.h>
@@ -3542,36 +3544,22 @@ vdev_set_state(vdev_t *vd, boolean_t isopen, vdev_state_t state, vdev_aux_t aux)
 
 /*
  * Check the vdev configuration to ensure that it's capable of supporting
- * a root pool.
+ * a root pool. We do not support partial configuration.
  */
 boolean_t
 vdev_is_bootable(vdev_t *vd)
 {
-#if defined(__sun__) || defined(__sun)
-       /*
-        * Currently, we do not support RAID-Z or partial configuration.
-        * In addition, only a single top-level vdev is allowed and none of the
-        * leaves can be wholedisks.
-        */
-       int c;
-
        if (!vd->vdev_ops->vdev_op_leaf) {
-               char *vdev_type = vd->vdev_ops->vdev_op_type;
+               const char *vdev_type = vd->vdev_ops->vdev_op_type;
 
-               if (strcmp(vdev_type, VDEV_TYPE_ROOT) == 0 &&
-                   vd->vdev_children > 1) {
+               if (strcmp(vdev_type, VDEV_TYPE_MISSING) == 0)
                        return (B_FALSE);
-               } else if (strcmp(vdev_type, VDEV_TYPE_RAIDZ) == 0 ||
-                   strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) {
-                       return (B_FALSE);
-               }
        }
 
-       for (c = 0; c < vd->vdev_children; c++) {
+       for (int c = 0; c < vd->vdev_children; c++) {
                if (!vdev_is_bootable(vd->vdev_child[c]))
                        return (B_FALSE);
        }
-#endif /* __sun__ || __sun */
        return (B_TRUE);
 }
 
index 6df61fecb8315632fd4d38d8f4f38f993e92634c..534df5a06274973b337c5b7cc4a5955aa5105f6f 100644 (file)
@@ -30,6 +30,8 @@
  * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
  * Copyright (c) 2013 Steven Hartland. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright (c) 2016 Actifio, Inc. All rights reserved.
  */
 
@@ -3856,16 +3858,6 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
                    intval > SPA_OLD_MAXBLOCKSIZE) {
                        spa_t *spa;
 
-                       /*
-                        * If this is a bootable dataset then
-                        * we don't allow large (>128K) blocks,
-                        * because GRUB doesn't support them.
-                        */
-                       if (zfs_is_bootfs(dsname) &&
-                           intval > SPA_OLD_MAXBLOCKSIZE) {
-                               return (SET_ERROR(ERANGE));
-                       }
-
                        /*
                         * We don't allow setting the property above 1MB,
                         * unless the tunable has been changed.