Project

General

Profile

Bug #6585

sha512, skein, and edonr have an unenforced dependency on extensible dataset

Added by ilove zfs over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
zfs - Zettabyte File System
Start date:
2016-01-29
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

In any pool without the extensible dataset feature flag already enabled, creating a dataset with dedup set to use one of the new checksums would result in the following panic as soon as any data was added:

panic[cpu0]/thread=ffffff0006761c40: feature_get_refcount(spa, feature, &refcount) != 48 (0x30 != 0x30), file: ../../common/fs/zfs/zfeature.c line 390

ffffff0006761830 fffffffffba8fbdd ()
ffffff0006761890 zfs:feature_do_action+11a ()
ffffff00067618c0 zfs:spa_feature_incr+1e ()
ffffff0006761920 zfs:dmu_object_zapify+b7 ()
ffffff00067619b0 zfs:dsl_dataset_activate_feature+97 ()
ffffff0006761a20 zfs:dsl_dataset_sync+ba ()
ffffff0006761ab0 zfs:dsl_pool_sync+153 ()
ffffff0006761b70 zfs:spa_sync+26e ()
ffffff0006761c20 zfs:txg_sync_thread+227 ()
ffffff0006761c30 unix:thread_start+8 ()

Inspection showed that feature->fi_feature was 7, which is the value of SPA_FEATURE_EXTENSIBLE_DATASET in the spa_feature enum.

Testing shows that the panic can be prevented by explicitly setting extensible dataset as a dependency for the sha512, edonr, and skein feature flags. Alternatively, the new checksums code could possibly be changed to obviate the need for the dependency.

Reproducer:

root@omnios-vm:/root# zpool create -d -o feature@sha512=enabled ineedextensibledataset c2t1d0
root@omnios-vm:/root# echo hello >> /ineedextensibledataset/hello.txt           
root@omnios-vm:/root# zfs create -o dedup=sha512 ineedextensibledataset/ruhroh
root@omnios-vm:/root# echo goodbye >> /ineedextensibledataset/ruhroh/goodbye.txt
root@omnios-vm:/root# ... panic

History

#1

Updated by Electric Monk over 3 years ago

  • % Done changed from 0 to 100
  • Status changed from In Progress to Closed

git commit 892586e8a147c02d7f4053cc405229a13e796928

commit  892586e8a147c02d7f4053cc405229a13e796928
Author: ilovezfs <ilovezfs@icloud.com>
Date:   2016-02-11T18:22:23.000Z

    6585 sha512, skein, and edonr have an unenforced dependency on extensible dataset
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Richard Laager <rlaager@wiktel.com>
    Approved by: Robert Mustacchi <rm@joyent.com>

Also available in: Atom PDF