diff options
author | Paul Zuchowski <[email protected]> | 2018-06-07 21:07:29 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2018-06-07 18:07:29 -0700 |
commit | 2ffd89fcb90969bd9e3a118cfe373dd356d1519a (patch) | |
tree | 1d2492c9dcef30ba37227e6fda0b0cf95a69973c /module/zfs/zil.c | |
parent | 174bcd581d546be77d055273d2bad67cc854fc01 (diff) |
Wrong error message when removing log device
In the case where the pool is loaded without the crypto
keys necessary to playback the intent log, and log device
removal is attempted, a generic busy message is received.
Change the message to inform the user that the datasets
must be mounted.
Reviewed-by: Tony Hutter <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tom Caputi <[email protected]>
Signed-off-by: Paul Zuchowski <[email protected]>
Closes #7518
Diffstat (limited to 'module/zfs/zil.c')
-rw-r--r-- | module/zfs/zil.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/module/zfs/zil.c b/module/zfs/zil.c index da3ee4500..e8adc6d99 100644 --- a/module/zfs/zil.c +++ b/module/zfs/zil.c @@ -22,6 +22,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2011, 2017 by Delphix. All rights reserved. * Copyright (c) 2014 Integros [integros.com] + * Copyright (c) 2018 Datto Inc. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -3159,7 +3160,7 @@ zil_suspend(const char *osname, void **cookiep) mutex_exit(&zilog->zl_lock); dsl_dataset_long_rele(dmu_objset_ds(os), suspend_tag); dsl_dataset_rele(dmu_objset_ds(os), suspend_tag); - return (SET_ERROR(EBUSY)); + return (SET_ERROR(EACCES)); } zilog->zl_suspending = B_TRUE; @@ -3400,6 +3401,9 @@ zil_reset(const char *osname, void *arg) int error; error = zil_suspend(osname, NULL); + /* EACCES means crypto key not loaded */ + if ((error == EACCES) || (error == EBUSY)) + return (SET_ERROR(error)); if (error != 0) return (SET_ERROR(EEXIST)); return (0); |