Bug #9084

spa_*_ashift must ignore spare devices

Added by Prakash Surya 3 months ago. Updated 3 months ago.

Status:ClosedStart date:2018-02-09
Priority:NormalDue date:
Assignee:Prakash Surya% Done:

100%

Category:zfs - Zettabyte File System
Target version:-
Difficulty:Medium Tags:needs-triage

Description

It's possible for the following assertion to be tripped when running ztest:

assertion failed for thread 0xf09fca40, thread-id 549:
spa->spa_max_ashift spa->spa_min_ashift (0xc 0x9),
file ../../../uts/common/fs/zfs/vdev_removal.c, line 965
> $c
libc.so.1`_lwp_kill+7(ebdde6c0, ebdde6c0, a9, fee7865e)
libc.so.1`_assfail+0x214(ebddea28, fed7ac3c, 3c5, fef62000)
libc.so.1`assfail3+0xde(fed7b130, c, 0, fed812cb, 9, 0)
libzpool.so.1`spa_vdev_copy_impl+0x26b(89a4b40, ebddef74, ebddef68, 8992dc0, ebe10a00, fef073c0)
libzpool.so.1`spa_vdev_remove_thread+0x6cd(87450c0, 0, 0, fee8f43a)
libc.so.1`_thrp_setup+0x8c(f09fca40)
libc.so.1`_lwp_start(f09fca40, 0, 0, 0, 0, 0)
> ::spa -v
ADDR STATE NAME
08723000 ACTIVE ztest

ADDR STATE AUX DESCRIPTION
087466c0 HEALTHY - root
087450c0 HEALTHY - /rpool/tmp/ztest.0a
08745640 HEALTHY - indirect
08745bc0 HEALTHY - /rpool/tmp/ztest.2a
08746140 HEALTHY - /rpool/tmp/ztest.3a
- - - spares
08744b40 HEALTHY - /rpool/tmp/ztest.spares.0

The problem is that spa_min_ashift and spa_max_ashift need to ignore
spare devices.

History

#1 Updated by Prakash Surya 3 months ago

  • Subject changed from ztest failure: spa->spa_ max_ashift == spa->spa_min_ashift (0xc == 0x9) to spa_{min,max}_ashift must ignore spare devices

#2 Updated by Prakash Surya 3 months ago

  • Subject changed from spa_{min,max}_ashift must ignore spare devices to spa_*_ashift must ignore spare devices

#3 Updated by Electric Monk 3 months ago

  • % Done changed from 0 to 100
  • Status changed from New to Closed

git commit b037f3dbd69cef4a7ffd576ad33e07bfaf0b1e84

commit  b037f3dbd69cef4a7ffd576ad33e07bfaf0b1e84
Author: Prakash Surya <prakash.surya@delphix.com>
Date:   2018-02-21T16:33:37.000Z

    9084 spa_*_ashift must ignore spare devices
    Reviewed by: Prashanth Sreenivasa <pks@delphix.com>
    Reviewed by: George Wilson <george.wilson@delphix.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom