zfs test mdb_001_pos can fail

Review Request #2541 — Created April 27, 2020 and submitted

jbk
illumos-gate
12028
general

zfs test mdb_001_pos can fail

Ran test

  • 0
  • 0
  • 2
  • 0
  • 2
Description From Last Updated
andy_js
  1. Ship It!
  2. 
      
kkantor
  1. Looks good! I'm looking forward to having this fixed. I just had a couple questions related to my own ignorance.

  2. I don't know enough about the implementation to know what to expect, but this command gives me results I don't understand on a few of the systems I tested it on:

    > metaslab_alloc_trace_cache::metaslab_trace
      MSID    DVA    ASIZE   ALLOCATOR      WEIGHT             RESULT               VDEV
         - 1869828096        0           0       0.03E     ? (1574881664)
    

    However, when I use a command more similar to what was there before I get normal looking results:

    > ::walk spa | ::walk metaslab | ::head -1 | ::metaslab_trace
      MSID    DVA    ASIZE   ALLOCATOR      WEIGHT             RESULT               VDEV
       458      0        0    e4e43840           0                 20
    
    1. Looking at it closer, I'm not sure either one is correct -- I think what might have been intended is *metaslab_alloc_trace_cache::walk kmem | ::metaslab_trace -- metaslab_alloc_trace_cache is a kmem_cache_t, and appears to be used to allocate metaslab_alloc_trace_t instances -- the ::walk metaslab walker will yield the addresses of metaslab_ts.

    2. I was still a little confused about this dcmd usage so jbk and I synced up. It sounds like we need metaslab tracing turned on to really exercise the ::metaslab_trace dcmd. It would be nice if there were a comment in the script about this (and any other no-op test cases in this list) or if we turned on that feature while we run this test. The fact that the test works (even with some no-ops) and doesn't fail is good enough for a +1 from me though.

  3. Does ksh provide the ability to use a 'for'-style iteration so we don't have to do the indexing+incrementing dance? That might make this loop a tad more readable if we could use that style.

  4. 
      
jbk
kkantor
  1. Ship It!
  2. 
      
andy_js
  1. Ship It!
  2. 
      
jbk
Review request changed

Status: Closed (submitted)

Loading...