mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 11:18:52 +03:00
Illumos #3598
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> References: https://www.illumos.org/issues/3598 illumos/illumos-gate@be6fd75a69 Ported-by: Richard Yao <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #1775 Porting notes: 1. include/sys/zfs_context.h has been modified to render some new macros inert until dtrace is available on Linux. 2. Linux-specific changes have been adapted to use SET_ERROR(). 3. I'm NOT happy about this change. It does nothing but ugly up the code under Linux. Unfortunately we need to take it to avoid more merge conflicts in the future. -Brian
This commit is contained in:
committed by
Brian Behlendorf
parent
7011fb6004
commit
2e528b49f8
@@ -20,7 +20,7 @@
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012 by Delphix. All rights reserved.
|
||||
* Copyright (c) 2013 by Delphix. All rights reserved.
|
||||
*/
|
||||
|
||||
#include <sys/dmu.h>
|
||||
@@ -113,7 +113,7 @@ diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
|
||||
int err = 0;
|
||||
|
||||
if (issig(JUSTLOOKING) && issig(FORREAL))
|
||||
return (EINTR);
|
||||
return (SET_ERROR(EINTR));
|
||||
|
||||
if (zb->zb_object != DMU_META_DNODE_OBJECT)
|
||||
return (0);
|
||||
@@ -136,7 +136,7 @@ diff_cb(spa_t *spa, zilog_t *zilog, const blkptr_t *bp,
|
||||
if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf,
|
||||
ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL,
|
||||
&aflags, zb) != 0)
|
||||
return (EIO);
|
||||
return (SET_ERROR(EIO));
|
||||
|
||||
blk = abuf->b_data;
|
||||
for (i = 0; i < blksz >> DNODE_SHIFT; i++) {
|
||||
@@ -168,7 +168,7 @@ dmu_diff(const char *tosnap_name, const char *fromsnap_name,
|
||||
|
||||
if (strchr(tosnap_name, '@') == NULL ||
|
||||
strchr(fromsnap_name, '@') == NULL)
|
||||
return (EINVAL);
|
||||
return (SET_ERROR(EINVAL));
|
||||
|
||||
error = dsl_pool_hold(tosnap_name, FTAG, &dp);
|
||||
if (error != 0)
|
||||
@@ -191,7 +191,7 @@ dmu_diff(const char *tosnap_name, const char *fromsnap_name,
|
||||
dsl_dataset_rele(fromsnap, FTAG);
|
||||
dsl_dataset_rele(tosnap, FTAG);
|
||||
dsl_pool_rele(dp, FTAG);
|
||||
return (EXDEV);
|
||||
return (SET_ERROR(EXDEV));
|
||||
}
|
||||
|
||||
fromtxg = fromsnap->ds_phys->ds_creation_txg;
|
||||
|
||||
Reference in New Issue
Block a user