1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Toomas Soome <tsoome@me.com>
3 Date: Wed, 1 Jun 2016 19:18:10 +0300
4 Subject: [PATCH] OpenZFS 8906 - uts: illumos rootfs should support salted
8 * As of grub-2.02 these checksums are not supported. However, as
9 pointed out in #6501 there are alternatives such as EFISTUB which
10 work and have no such restriction. A warning was added to the
11 checksum property section of the zfs.8 man page.
13 Authored by: Toomas Soome <tsoome@me.com>
14 Reviewed by: C Fraire <cfraire@me.com>
15 Reviewed by: Robert Mustacchi <rm@joyent.com>
16 Reviewed by: Yuri Pankov <yuripv@yuripv.net>
17 Approved by: Dan McDonald <danmcd@joyent.com>
18 Ported-by: Brian Behlendorf <behlendorf1@llnl.gov>
20 OpenZFS-issue: https://illumos.org/issues/8906
21 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/7dec52f
25 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
27 man/man5/zpool-features.5 | 18 +++++++-----------
28 man/man8/zfs.8 | 5 ++++-
29 module/zfs/zfs_ioctl.c | 11 +----------
30 3 files changed, 12 insertions(+), 22 deletions(-)
32 diff --git a/man/man5/zpool-features.5 b/man/man5/zpool-features.5
33 index 78ea559f..140ce269 100644
34 --- a/man/man5/zpool-features.5
35 +++ b/man/man5/zpool-features.5
37 .\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
38 .\" own identifying information:
39 .\" Portions Copyright [yyyy] [name of copyright owner]
40 -.TH ZPOOL-FEATURES 5 "Aug 27, 2013"
41 +.TH ZPOOL-FEATURES 5 "Jun 8, 2018"
43 zpool\-features \- ZFS pool feature descriptions
45 @@ -248,8 +248,9 @@ immediately activate the \fBlz4_compress\fR feature on the underlying
46 pool using the \fBzfs\fR(1M) command. Also, all newly written metadata
47 will be compressed with \fBlz4\fR algorithm. Since this feature is not
48 read-only compatible, this operation will render the pool unimportable
49 -on systems without support for the \fBlz4_compress\fR feature. Booting
50 -off of \fBlz4\fR-compressed root pools is supported.
51 +on systems without support for the \fBlz4_compress\fR feature.
53 +Booting off of \fBlz4\fR-compressed root pools is supported.
55 This feature becomes \fBactive\fR as soon as it is enabled and will
56 never return to being \fBenabled\fB.
57 @@ -510,8 +511,7 @@ can turn on the \fBsha512\fR checksum on any dataset using the
58 and will return to being \fBenabled\fR once all filesystems that have
59 ever had their checksum set to \fBsha512\fR are destroyed.
61 -Booting off of pools utilizing SHA-512/256 is supported (provided that
62 -the updated GRUB stage2 module is installed).
63 +Booting off of pools utilizing SHA-512/256 is supported.
67 @@ -545,9 +545,7 @@ can turn on the \fBskein\fR checksum on any dataset using the
68 and will return to being \fBenabled\fR once all filesystems that have
69 ever had their checksum set to \fBskein\fR are destroyed.
71 -Booting off of pools using \fBskein\fR is \fBNOT\fR supported
72 --- any attempt to enable \fBskein\fR on a root pool will fail with an
74 +Booting off of pools using \fBskein\fR is supported.
78 @@ -587,9 +585,7 @@ can turn on the \fBedonr\fR checksum on any dataset using the
79 and will return to being \fBenabled\fR once all filesystems that have
80 ever had their checksum set to \fBedonr\fR are destroyed.
82 -Booting off of pools using \fBedonr\fR is \fBNOT\fR supported
83 --- any attempt to enable \fBedonr\fR on a root pool will fail with an
85 +Booting off of pools using \fBedonr\fR is supported.
89 diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
90 index 48a5e6ea..bb3b46e3 100644
94 .\" Copyright 2016 Nexenta Systems, Inc.
95 .\" Copyright 2016 Richard Laager. All rights reserved.
102 @@ -1049,6 +1049,9 @@ The
105 checksum algorithms require enabling the appropriate features on the pool.
106 +These algorithms are not supported by GRUB and should not be set on the
108 +filesystem when using GRUB to boot the system.
111 for more information on these algorithms.
112 diff --git a/module/zfs/zfs_ioctl.c b/module/zfs/zfs_ioctl.c
113 index f4f509a7..6516f646 100644
114 --- a/module/zfs/zfs_ioctl.c
115 +++ b/module/zfs/zfs_ioctl.c
116 @@ -3985,16 +3985,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
118 if ((err = spa_open(dsname, &spa, FTAG)) != 0)
121 - * Salted checksums are not supported on root pools.
123 - if (spa_bootfs(spa) != 0 &&
124 - intval < ZIO_CHECKSUM_FUNCTIONS &&
125 - (zio_checksum_table[intval].ci_flags &
126 - ZCHECKSUM_FLAG_SALTED)) {
127 - spa_close(spa, FTAG);
128 - return (SET_ERROR(ERANGE));
131 if (!spa_feature_is_enabled(spa, feature)) {
132 spa_close(spa, FTAG);
133 return (SET_ERROR(ENOTSUP));