otherwise osd_trans_commit_cb() calling qsd_op_end() may
find qsd structure released.
Change-Id: Ifd64b17d636f5e728ed6a4ad1a2d4d43998c90ec
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: https://review.whamcloud.com/26496
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Mike Pershin <mike.pershin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
/* shutdown quota slave instance associated with the device */
if (o->od_quota_slave != NULL) {
+ /* complete all in-flight callbacks */
+ osd_sync(env, &o->od_dt_dev);
+ txg_wait_callbacks(spa_get_dsl(dmu_objset_spa(o->od_os)));
qsd_fini(env, o->od_quota_slave);
o->od_quota_slave = NULL;
}
ENTRY;
- osd_shutdown(env, o);
- osd_oi_fini(env, o);
-
if (o->od_os) {
osd_objset_unregister_callbacks(o);
if (!o->od_dt_dev.dd_rdonly) {
}
}
+ /* now with all the callbacks completed we can cleanup the remainings */
+ osd_shutdown(env, o);
+ osd_oi_fini(env, o);
+
rc = osd_procfs_fini(o);
if (rc) {
CERROR("proc fini error %d\n", rc);