* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2018 by Delphix. All rights reserved.
* Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>
- * Copyright (c) 2017 Datto Inc.
+ * Copyright (c) 2018 Datto Inc.
* Copyright (c) 2017 Open-E, Inc. All Rights Reserved.
*/
break;
case EBUSY:
- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
- "Pool busy; removal may already be in progress"));
+ if (islog) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "Mount encrypted datasets to replay logs."));
+ } else {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "Pool busy; removal may already be in progress"));
+ }
(void) zfs_error(hdl, EZFS_BUSY, msg);
break;
+ case EACCES:
+ if (islog) {
+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+ "Mount encrypted datasets to replay logs."));
+ (void) zfs_error(hdl, EZFS_BUSY, msg);
+ } else {
+ (void) zpool_standard_error(hdl, errno, msg);
+ }
+ break;
+
default:
(void) zpool_standard_error(hdl, errno, msg);
}
* 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 */
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;
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);