Skip to content

Commit

Permalink
new readonly?
Browse files Browse the repository at this point in the history
  • Loading branch information
pcd1193182 committed Dec 19, 2019
1 parent 29dc4b0 commit dbfc117
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions module/zfs/dsl_dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,29 +2301,21 @@ dsl_dir_activity_in_progress(dsl_dir_t *dd, dsl_dataset_t *ds,

switch (activity) {
case ZFS_WAIT_DELETEQ: {
#ifdef _KERNEL
objset_t *os;
error = dmu_objset_from_ds(ds, &os);
if (error != 0)
break;

#ifdef _KERNEL
if (dmu_objset_type(os) != DMU_OST_ZFS ||
zfs_get_vfs_flag_unmounted(os)) {
*in_progress = B_FALSE;
return (0);
}
#else
if (dmu_objset_type(os) != DMU_OST_ZFS) {
*in_progress = B_FALSE;
return (0);
}
#endif

uint64_t readonly = B_FALSE;
dsl_pool_config_enter(dd->dd_pool, FTAG);
error = dsl_prop_get_dd(dd, zfs_prop_to_name(ZFS_PROP_READONLY),
sizeof (readonly), 1, &readonly, NULL, B_FALSE);
dsl_pool_config_exit(dd->dd_pool, FTAG);
error = zfs_get_temporary_prop(ds, ZFS_PROP_READONLY, &readonly,
NULL);

if (error != 0)
break;
Expand All @@ -2345,6 +2337,14 @@ dsl_dir_activity_in_progress(dsl_dir_t *dd, dsl_dataset_t *ds,
if (error == 0)
*in_progress = (count != 0);
break;
#else
/*
* The delete queue is ZPL specific, and libzpool doesn't have
* it. It doesn't make sense to wait for it.
*/
*in_progress = B_FALSE;
break;
#endif
}
default:
panic("unrecognized value for activity %d", activity);
Expand Down

0 comments on commit dbfc117

Please sign in to comment.