Skip to content

Commit

Permalink
Correct error returns to unify cross-pool operation error handling
Browse files Browse the repository at this point in the history
Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2911
  • Loading branch information
bprotopopov authored and behlendorf committed Dec 19, 2014
1 parent c0ba93d commit 9063f65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions module/zfs/dsl_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ dsl_dir_hold(dsl_pool_t *dp, const char *name, void *tag,
/* Make sure the name is in the specified pool. */
spaname = spa_name(dp->dp_spa);
if (strcmp(buf, spaname) != 0) {
err = SET_ERROR(EINVAL);
err = SET_ERROR(EXDEV);
goto error;
}

Expand Down Expand Up @@ -1209,7 +1209,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx)
if (dd->dd_pool != newparent->dd_pool) {
dsl_dir_rele(newparent, FTAG);
dsl_dir_rele(dd, FTAG);
return (SET_ERROR(ENXIO));
return (SET_ERROR(EXDEV));
}

/* new name should not already exist */
Expand Down

0 comments on commit 9063f65

Please sign in to comment.