Author: mav
Date: Fri Oct 14 12:01:33 2016
New Revision: 307317
URL: https://svnweb.freebsd.org/changeset/base/307317

Log:
  MFV r307313:
  5120 zfs should allow large block/gzip/raidz boot pool (loader project)
  
  Reviewed by: George Wilson <george.wil...@delphix.com>
  Reviewed by: Yuri Pankov <yuri.pan...@nexenta.com>
  Reviewed by: Andrew Stormont <andyjstorm...@gmail.com>
  Reviewed by: Matthew Ahrens <mahr...@delphix.com>
  Approved by: Robert Mustacchi <r...@joyent.com>
  Author: Toomas Soome <tso...@me.com>
  
  openzfs/openzfs@c8811bd3e2427dddbac6c05a59cfe117d8fea370
  
  FreeBSD still does not support booting from gzip-compressed datasets,
  so keep one chunk of this commit out.

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
Directory Properties:
  head/sys/cddl/contrib/opensolaris/   (props changed)

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Fri Oct 14 
11:57:08 2016        (r307316)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c   Fri Oct 14 
12:01:33 2016        (r307317)
@@ -27,6 +27,7 @@
  * 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 <tso...@me.com>
  */
 
 /*
@@ -539,12 +540,6 @@ spa_prop_validate(spa_t *spa, nvlist_t *
                                    &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 {
                                        objnum = dmu_objset_id(os);
                                }

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h       Fri Oct 
14 11:57:08 2016        (r307316)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h       Fri Oct 
14 12:01:33 2016        (r307317)
@@ -24,6 +24,7 @@
  * Copyright 2011 Nexenta Systems, Inc.  All rights reserved.
  * Copyright (c) 2012, 2016 by Delphix. All rights reserved.
  * Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+ * Copyright 2016 Toomas Soome <tso...@me.com>
  */
 
 #ifndef _ZIO_H

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Fri Oct 14 
11:57:08 2016        (r307316)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c  Fri Oct 14 
12:01:33 2016        (r307317)
@@ -25,6 +25,7 @@
  * Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  * Copyright 2013 Martin Matuska <m...@freebsd.org>. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016 Toomas Soome <tso...@me.com>
  */
 
 #include <sys/zfs_context.h>
@@ -3474,16 +3475,10 @@ vdev_set_state(vdev_t *vd, boolean_t iso
 
 /*
  * Check the vdev configuration to ensure that it's capable of supporting
- * a root pool.
+ * a root pool. We do not support partial configuration.
+ * In addition, only a single top-level vdev is allowed.
  *
- * On Solaris, 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.
- *
- * For FreeBSD, we can boot from any configuration. There is a
- * limitation that the boot filesystem must be either uncompressed or
- * compresses with lzjb compression but I'm not sure how to enforce
- * that here.
+ * FreeBSD does not have above limitations.
  */
 boolean_t
 vdev_is_bootable(vdev_t *vd)
@@ -3495,8 +3490,7 @@ vdev_is_bootable(vdev_t *vd)
                if (strcmp(vdev_type, VDEV_TYPE_ROOT) == 0 &&
                    vd->vdev_children > 1) {
                        return (B_FALSE);
-               } else if (strcmp(vdev_type, VDEV_TYPE_RAIDZ) == 0 ||
-                   strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) {
+               } else if (strcmp(vdev_type, VDEV_TYPE_MISSING) == 0) {
                        return (B_FALSE);
                }
        }

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c     Fri Oct 
14 11:57:08 2016        (r307316)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c     Fri Oct 
14 12:01:33 2016        (r307317)
@@ -31,6 +31,7 @@
  * 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 <tso...@me.com>
  */
 
 /*
@@ -3945,16 +3946,6 @@ zfs_check_settable(const char *dsname, n
                        spa_t *spa;
 
                        /*
-                        * If this is a bootable dataset then
-                        * the 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.
                         */
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to