Project

General

Profile

Actions

Bug #3543

closed

Feature flags causes assertion in spa.c to miss certain cases

Added by Richard Yao over 9 years ago. Updated over 9 years ago.

Status:
Closed
Priority:
Low
Category:
zfs - Zettabyte File System
Start date:
2013-02-10
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
needs-triage
Gerrit CR:
External Bug:

Description

I caught an outdated assertion in spa.c while hacking on ZFSOnLinux. Here is the patch to fix it:

diff --git a/module/zfs/spa.c b/module/zfs/spa.c
index 5b6465f..4d44d6f 100644
--- a/module/zfs/spa.c
+++ b/module/zfs/spa.c
@ -6294,7 +6294,7 @ spa_upgrade(spa_t *spa, uint64_t version) * future version would result in an unopenable pool, this shouldn't be * possible.
*/
- ASSERT;
+ ASSERT);
ASSERT;

spa->spa_uberblock.ub_version = version;

It should apply perfectly to Illumos. I have opened a corresponding pull request with ZFSOnLinux:

https://github.com/zfsonlinux/zfs/pull/1282


Files

49c3edafab8335d3e66b471165eb78375d150c83.patch (1.25 KB) 49c3edafab8335d3e66b471165eb78375d150c83.patch Patch to fix outdated assertion. Richard Yao, 2013-02-10 12:44 AM
fix-spa-assertions.patch (1.42 KB) fix-spa-assertions.patch Updated patch Richard Yao, 2013-02-11 09:08 PM
Actions #1

Updated by Richard Yao over 9 years ago

Unfortunately, pasting the patch inline did not work quote as I expected. I am attaching the patch from github.

Actions #2

Updated by Matthew Ahrens over 9 years ago

  • Status changed from New to In Progress

Looks good, thanks for finding this. I'll get to pushing this eventually but if anyone else wants to pick it up, feel free.

Actions #3

Updated by Richard Yao over 9 years ago

I did a quick grep of the source code, which revealed another assertion that needed to be fixed. I have attached an updated patch. This should be the first and last revision necessary.

Actions #4

Updated by Christopher Siden over 9 years ago

  • Assignee changed from Matthew Ahrens to Christopher Siden
  • % Done changed from 0 to 100
Actions #5

Updated by Christopher Siden over 9 years ago

  • Status changed from In Progress to Closed
commit 62eae88
Author: Richard Yao <ryao@gentoo.org>
Date:   Mon Feb 25 17:37:11 2013

    3543 Feature flags causes assertion in spa.c to miss certain cases
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Approved by: Christopher Siden <christopher.siden@delphix.com>
Actions

Also available in: Atom PDF