mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Correct error returns to unify cross-pool operation error handling
Signed-off-by: Boris Protopopov <boris.protopopov@actifio.com> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #2911
This commit is contained in:
parent
c0ba93dee6
commit
9063f65476
@ -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. */
|
/* Make sure the name is in the specified pool. */
|
||||||
spaname = spa_name(dp->dp_spa);
|
spaname = spa_name(dp->dp_spa);
|
||||||
if (strcmp(buf, spaname) != 0) {
|
if (strcmp(buf, spaname) != 0) {
|
||||||
err = SET_ERROR(EINVAL);
|
err = SET_ERROR(EXDEV);
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1209,7 +1209,7 @@ dsl_dir_rename_check(void *arg, dmu_tx_t *tx)
|
|||||||
if (dd->dd_pool != newparent->dd_pool) {
|
if (dd->dd_pool != newparent->dd_pool) {
|
||||||
dsl_dir_rele(newparent, FTAG);
|
dsl_dir_rele(newparent, FTAG);
|
||||||
dsl_dir_rele(dd, FTAG);
|
dsl_dir_rele(dd, FTAG);
|
||||||
return (SET_ERROR(ENXIO));
|
return (SET_ERROR(EXDEV));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* new name should not already exist */
|
/* new name should not already exist */
|
||||||
|
Loading…
Reference in New Issue
Block a user