Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compatibility file for GRUB versions up to v2.06 #15909

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cmd/zpool/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ dist_zpoolcompat_DATA = \
%D%/compatibility.d/freebsd-11.2 \
%D%/compatibility.d/freebsd-11.3 \
%D%/compatibility.d/freenas-9.10.2 \
%D%/compatibility.d/grub2 \
%D%/compatibility.d/grub2-2.06 \
%D%/compatibility.d/grub2-2.12 \
%D%/compatibility.d/openzfs-2.0-freebsd \
%D%/compatibility.d/openzfs-2.0-linux \
%D%/compatibility.d/openzfs-2.1-freebsd \
Expand Down Expand Up @@ -171,6 +172,7 @@ zpoolcompatlinks = \
"freebsd-11.3 freebsd-12.2" \
"freebsd-11.3 freebsd-12.3" \
"freebsd-11.3 freebsd-12.4" \
"grub2-2.12 grub2" \
"openzfs-2.1-freebsd freebsd-13.0" \
"openzfs-2.1-freebsd freebsd-13.1" \
"openzfs-2.1-freebsd freebsd-13.2" \
Expand Down
23 changes: 23 additions & 0 deletions cmd/zpool/compatibility.d/grub2-2.06
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Features which are supported by GRUB2 versions prior to v2.12.
behlendorf marked this conversation as resolved.
Show resolved Hide resolved
#
# GRUB is not able to detect ZFS pool if snaphsot of top level boot pool
# is created. This issue is observed with GRUB versions before v2.12 if
# extensible_dataset feature is enabled on ZFS boot pool.
#
# This file lists all read-only comaptible features except
# extensible_dataset and any other feature that depends on it.
#
allocation_classes
async_destroy
block_cloning
device_rebuild
embedded_data
empty_bpobj
enabled_txg
hole_birth
log_spacemap
lz4_compress
resilver_defer
spacemap_histogram
spacemap_v2
zpool_checkpoint
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Features which are supported by GRUB2
# Features which are supported by GRUB2 versions from v2.12 onwards.
allocation_classes
async_destroy
block_cloning
Expand Down
29 changes: 27 additions & 2 deletions man/man7/zpool-features.7
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ to the end of the line is ignored.
.Sy Example :
.Bd -literal -compact -offset 4n
.No example# Nm cat Pa /usr/share/zfs/compatibility.d/grub2
# Features which are supported by GRUB2
# Features which are supported by GRUB2 versions from v2.12 onwards.
allocation_classes
async_destroy
block_cloning
Expand All @@ -243,6 +243,31 @@ userobj_accounting
zilsaxattr
zpool_checkpoint

.No example# Nm cat Pa /usr/share/zfs/compatibility.d/grub2-2.06
# Features which are supported by GRUB2 versions prior to v2.12.
#
# GRUB is not able to detect ZFS pool if snaphsot of top level boot pool
# is created. This issue is observed with GRUB versions before v2.12 if
# extensible_dataset feature is enabled on ZFS boot pool.
#
# This file lists all read-only comaptible features except
# extensible_dataset and any other feature that depends on it.
#
allocation_classes
async_destroy
block_cloning
device_rebuild
embedded_data
empty_bpobj
enabled_txg
hole_birth
log_spacemap
lz4_compress
resilver_defer
spacemap_histogram
spacemap_v2
zpool_checkpoint

.No example# Nm zpool Cm create Fl o Sy compatibility Ns = Ns Ar grub2 Ar bootpool Ar vdev
.Ed
.Pp
Expand Down Expand Up @@ -681,7 +706,7 @@ are destroyed.
Large dnodes allow more data to be stored in the bonus buffer,
thus potentially improving performance by avoiding the use of spill blocks.
.
.feature com.delphix livelist yes
.feature com.delphix livelist yes extensible_dataset
This feature allows clones to be deleted faster than the traditional method
when a large number of random/sparse writes have been made to the clone.
All blocks allocated and freed after a clone is created are tracked by the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,8 @@ function check_feature_set
while read line; do
typeset flag=1

if [[ "$line" == "#*" ]]; then
continue
fi
# Skip comments
[[ $line = \#* ]] && continue
behlendorf marked this conversation as resolved.
Show resolved Hide resolved

for set in "$@"; do
if ! grep -q "$line" $ZPOOL_COMPAT_DIR/$set; then
Expand Down
Loading