Re: [PATCHv4 3/3] tcmu: add module wide action/reset_netlink support

2018-05-02 Thread Xiubo Li
On 2018/5/3 3:53, Mike Christie wrote: On 04/19/2018 02:46 AM, xiu...@redhat.com wrote: @@ -1572,13 +1579,16 @@ static int tcmu_wait_genl_cmd_reply(struct tcmu_dev *udev) if (udev->nl_reply_supported <= 0) return 0; + spin_lock(&udev->nl_cmd_lock); + nl_cmd->wa

Re: [PATCHv4 3/3] tcmu: add module wide action/reset_netlink support

2018-05-02 Thread Mike Christie
On 04/19/2018 02:46 AM, xiu...@redhat.com wrote: > @@ -1572,13 +1579,16 @@ static int tcmu_wait_genl_cmd_reply(struct tcmu_dev > *udev) > if (udev->nl_reply_supported <= 0) > return 0; > > + spin_lock(&udev->nl_cmd_lock); > + nl_cmd->waiter++; I think this will allow

[PATCHv4 3/3] tcmu: add module wide action/reset_netlink support

2018-04-19 Thread xiubli
From: Xiubo Li This patch adds 1 tcmu attr to reset and complete all the blocked netlink waiting threads. It's used when the userspace daemon like tcmu-runner has crashed or forced to shutdown just before the netlink requests be replied to the kernel, then the netlink requeting threads will get s