Skip to content

Commit 3e82e50

Browse files
committed
new readonly?
1 parent f9fd645 commit 3e82e50

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

module/zfs/dsl_dir.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2303,29 +2303,21 @@ dsl_dir_activity_in_progress(dsl_dir_t *dd, dsl_dataset_t *ds,
23032303

23042304
switch (activity) {
23052305
case ZFS_WAIT_DELETEQ: {
2306+
#ifdef _KERNEL
23062307
objset_t *os;
23072308
error = dmu_objset_from_ds(ds, &os);
23082309
if (error != 0)
23092310
break;
23102311

2311-
#ifdef _KERNEL
23122312
if (dmu_objset_type(os) != DMU_OST_ZFS ||
23132313
zfs_get_vfs_flag_unmounted(os)) {
23142314
*in_progress = B_FALSE;
23152315
return (0);
23162316
}
2317-
#else
2318-
if (dmu_objset_type(os) != DMU_OST_ZFS) {
2319-
*in_progress = B_FALSE;
2320-
return (0);
2321-
}
2322-
#endif
23232317

23242318
uint64_t readonly = B_FALSE;
2325-
dsl_pool_config_enter(dd->dd_pool, FTAG);
2326-
error = dsl_prop_get_dd(dd, zfs_prop_to_name(ZFS_PROP_READONLY),
2327-
sizeof (readonly), 1, &readonly, NULL, B_FALSE);
2328-
dsl_pool_config_exit(dd->dd_pool, FTAG);
2319+
error = zfs_get_temporary_prop(ds, ZFS_PROP_READONLY, &readonly,
2320+
NULL);
23292321

23302322
if (error != 0)
23312323
break;
@@ -2347,6 +2339,14 @@ dsl_dir_activity_in_progress(dsl_dir_t *dd, dsl_dataset_t *ds,
23472339
if (error == 0)
23482340
*in_progress = (count != 0);
23492341
break;
2342+
#else
2343+
/*
2344+
* The delete queue is ZPL specific, and libzpool doesn't have
2345+
* it. It doesn't make sense to wait for it.
2346+
*/
2347+
*in_progress = B_FALSE;
2348+
break;
2349+
#endif
23502350
}
23512351
default:
23522352
panic("unrecognized value for activity %d", activity);

0 commit comments

Comments
 (0)