On Mon, Jul 29, 2019 at 11:43 AM Dongsheng Yang <dongsheng.yang@xxxxxxxxxxxx> wrote: > > Currently, if we share osdc in rbd device and journaling, they are > sharing the notify_wq in osdc to complete watch_cb. When we > need to close journal held with mutex of rbd device, we need > to flush the notify_wq. But we don't want to flush the watch_cb > of rbd_device, maybe some of it need to lock rbd mutex. > > To solve this problem, this patch allow user to manage the notify > workqueue by themselves in watching. What do you mean by "mutex of rbd device", rbd_dev->header_rwsem? Did you actually encounter the resulting deadlock in testing? Thanks, Ilya