Project

General

Profile

Bug #3598

want to dtrace when errors are generated in zfs

Added by Christopher Siden over 6 years ago. Updated over 6 years ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
needs-triage

Description

From Matt Ahrens's original bug report at Delphix:

add a new dtrace STD probe, set-error, whose arg0 is an errno.  This probe will
fire when an error is generated (e.g. "return (EINVAL)" or "zio->io_error =
EXDEV;" will use a new SET_ERROR(err) macro which will trigger the probe.

libzpool should support this same functionality via USDT.

This bug uses the new probe throughout all of ZFS which helps when you're seeing an error in ZFS and wondering where it originated.

For example:

dtrace -n 'zfs::set-error { printf("%u %s\\n", arg0, probefunc); stack(); }'

Would show you when errors are generated, you could include a predicate that filters based on a specific errno you are looking for.

History

#1

Updated by Christopher Siden over 6 years ago

  • Status changed from In Progress to Closed
commit be6fd75
Author: Matthew Ahrens <mahrens@delphix.com>
Date:   Fri Mar 8 10:41:28 2013

    3598 want to dtrace when errors are generated in zfs
    Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
    Reviewed by: Adam Leventhal <ahl@delphix.com>
    Reviewed by: Christopher Siden <christopher.siden@delphix.com>
    Approved by: Garrett D'Amore <garrett@damore.org>

Also available in: Atom PDF