Project

General

Profile

Actions

Bug #3116

closed

zpool reguid may log negative guids to internal SPA history

Added by Martin Matuška almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
zfs - Zettabyte File System
Start date:
2012-08-23
Due date:
% Done:

100%

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

Description

Reguid logging introduced in changeset 13777:b1e53580146d logs old and new guid as signed

static void
spa_change_guid_sync(void *arg1, void *arg2, dmu_tx_t *tx)
{
    spa_t *spa = arg1;
    uint64_t *newguid = arg2;
    uint64_t oldguid;
    vdev_t *rvd = spa->spa_root_vdev;

    oldguid = spa_guid(spa);

    spa_config_enter(spa, SCL_STATE, FTAG, RW_READER);
    rvd->vdev_guid = *newguid;
    rvd->vdev_guid_sum += (*newguid - oldguid);
    vdev_config_dirty(rvd);
    spa_config_exit(spa, SCL_STATE, FTAG);

    spa_history_log_internal(spa, "guid change", tx, "old=%lld new=%lld",
        oldguid, *newguid);
}

Patch:

diff -r bf40125f4b37 usr/src/uts/common/fs/zfs/spa.c
--- a/usr/src/uts/common/fs/zfs/spa.c    Sun Jul 08 03:19:56 2012 +0100
+++ b/usr/src/uts/common/fs/zfs/spa.c    Thu Aug 23 22:01:01 2012 +0200
@@ -714,7 +714,7 @@
     vdev_config_dirty(rvd);
     spa_config_exit(spa, SCL_STATE, FTAG);

-    spa_history_log_internal(spa, "guid change", tx, "old=%lld new=%lld",
+    spa_history_log_internal(spa, "guid change", tx, "old=%llu new=%llu",
         oldguid, *newguid);
 }
 

Actions #1

Updated by George Wilson over 10 years ago

  • Status changed from New to In Progress
  • Assignee set to George Wilson
Actions #2

Updated by Christopher Siden over 10 years ago

  • Category set to zfs - Zettabyte File System
  • Assignee changed from George Wilson to Christopher Siden
  • % Done changed from 0 to 100
Actions #3

Updated by Christopher Siden over 10 years ago

  • Status changed from In Progress to Closed
commit 20128a0
Author: George Wilson <george.wilson@delphix.com>
Date:   Sun Feb 17 12:00:54 2013

    3561 arc_meta_limit should be exposed via kstats
    3116 zpool reguid may log negative guids to internal SPA history
    Reviewed by: Matthew Ahrens <mahrens@delphix.com>
    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Christopher Siden <christopher.siden@delphix.com>
    Reviewed by: Gordon Ross <gordon.ross@nexenta.com>
    Approved by: Garrett D'Amore <garrett@damore.org>
Actions

Also available in: Atom PDF