]> git.proxmox.com Git - zfsonlinux.git/blob - zfs-patches/0020-OpenZFS-8906-uts-illumos-rootfs-should-support-salte.patch
bump version to 0.7.11-pve1~bpo1
[zfsonlinux.git] / zfs-patches / 0020-OpenZFS-8906-uts-illumos-rootfs-should-support-salte.patch
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
5 cksum
6
7 Porting notes:
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.
12
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>
19
20 OpenZFS-issue: https://illumos.org/issues/8906
21 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/7dec52f
22 Closes #6501
23 Closes #7714
24
25 Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
26 ---
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(-)
31
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
36 @@ -14,7 +14,7 @@
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"
42 .SH NAME
43 zpool\-features \- ZFS pool feature descriptions
44 .SH DESCRIPTION
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.
52 +
53 +Booting off of \fBlz4\fR-compressed root pools is supported.
54
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.
60
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.
64
65 .RE
66
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.
70
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
73 -error.
74 +Booting off of pools using \fBskein\fR is supported.
75
76 .RE
77
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.
81
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
84 -error.
85 +Booting off of pools using \fBedonr\fR is supported.
86
87 .RE
88
89 diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
90 index 48a5e6ea..bb3b46e3 100644
91 --- a/man/man8/zfs.8
92 +++ b/man/man8/zfs.8
93 @@ -29,7 +29,7 @@
94 .\" Copyright 2016 Nexenta Systems, Inc.
95 .\" Copyright 2016 Richard Laager. All rights reserved.
96 .\"
97 -.Dd June 28, 2017
98 +.Dd July 13, 2018
99 .Dt ZFS 8 SMM
100 .Os Linux
101 .Sh NAME
102 @@ -1049,6 +1049,9 @@ The
103 and
104 .Sy edonr
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
107 +.Sy bootfs
108 +filesystem when using GRUB to boot the system.
109 Please see
110 .Xr zpool-features 5
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)
117
118 if ((err = spa_open(dsname, &spa, FTAG)) != 0)
119 return (err);
120 - /*
121 - * Salted checksums are not supported on root pools.
122 - */
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));
129 - }
130 +
131 if (!spa_feature_is_enabled(spa, feature)) {
132 spa_close(spa, FTAG);
133 return (SET_ERROR(ENOTSUP));