Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

svn commit: r307317 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

7 views
Skip to first unread message

Alexander Motin

unread,
Oct 14, 2016, 8:02:12 AM10/14/16
to src-com...@freebsd.org, svn-s...@freebsd.org, svn-sr...@freebsd.org
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...@delphix.com>
Reviewed by: Yuri Pankov <yuri....@nexenta.com>
Reviewed by: Andrew Stormont <andyjs...@gmail.com>
Reviewed by: Matthew Ahrens <mah...@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-s...@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all...@freebsd.org"

Andriy Gapon

unread,
Oct 14, 2016, 8:13:06 AM10/14/16
to Alexander Motin, src-com...@freebsd.org, svn-s...@freebsd.org, svn-sr...@freebsd.org
On 14/10/2016 15:01, Alexander Motin wrote:
> 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...@delphix.com>
> Reviewed by: Yuri Pankov <yuri....@nexenta.com>
> Reviewed by: Andrew Stormont <andyjs...@gmail.com>
> Reviewed by: Matthew Ahrens <mah...@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.

Does FreeBSD boot code support large blocks?
Just to be sure.
And maybe this is worth some additional notice because users sometimes forget to
upgrade gptzfsboot / zfsboot.

--
Andriy Gapon

Alexander Motin

unread,
Oct 14, 2016, 8:23:17 AM10/14/16
to Andriy Gapon, src-com...@freebsd.org, svn-s...@freebsd.org, svn-sr...@freebsd.org
On 14.10.2016 15:11, Andriy Gapon wrote:
> On 14/10/2016 15:01, Alexander Motin wrote:
>> 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...@delphix.com>
>> Reviewed by: Yuri Pankov <yuri....@nexenta.com>
>> Reviewed by: Andrew Stormont <andyjs...@gmail.com>
>> Reviewed by: Matthew Ahrens <mah...@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.
>
> Does FreeBSD boot code support large blocks? Just to be sure.

According to r304321 commit message -- it does now.

> And maybe this is worth some additional notice because users sometimes forget to
> upgrade gptzfsboot / zfsboot.

Where would you like to see it to be noticeable?

--
Alexander Motin

Julian Elischer

unread,
Oct 14, 2016, 9:00:07 AM10/14/16
to Alexander Motin, src-com...@freebsd.org, svn-s...@freebsd.org, svn-sr...@freebsd.org
On 14/10/2016 5:01 AM, Alexander Motin wrote:
> 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...@delphix.com>
> Reviewed by: Yuri Pankov <yuri....@nexenta.com>
> Reviewed by: Andrew Stormont <andyjs...@gmail.com>
> Reviewed by: Matthew Ahrens <mah...@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.
might it not have been a bit better to have just put #if 0 around the
bits so that we could still see them?

also may help with future merges

Andriy Gapon

unread,
Oct 14, 2016, 9:20:13 AM10/14/16
to Alexander Motin, src-com...@freebsd.org, svn-s...@freebsd.org, svn-sr...@freebsd.org
On 14/10/2016 15:22, Alexander Motin wrote:
> On 14.10.2016 15:11, Andriy Gapon wrote:
>> On 14/10/2016 15:01, Alexander Motin wrote:
>>> 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...@delphix.com>
>>> Reviewed by: Yuri Pankov <yuri....@nexenta.com>
>>> Reviewed by: Andrew Stormont <andyjs...@gmail.com>
>>> Reviewed by: Matthew Ahrens <mah...@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.
>>
>> Does FreeBSD boot code support large blocks? Just to be sure.
>
> According to r304321 commit message -- it does now.

Okay.

>> And maybe this is worth some additional notice because users sometimes forget to
>> upgrade gptzfsboot / zfsboot.
>
> Where would you like to see it to be noticeable?

That's a good question for which I do not have a good answer.
Ideally 'zfs set recordsize=' would warn when setting a large block size on a
boot filesystem and 'zpool set bootfs=' would warn when switching the boot
filesystem to a filesystem that already has a large block size.
But not sure if that's doable without kludges.

--
Andriy Gapon
0 new messages