Re: [PATCHv2] tcmu: allow userspace to reset netlink

2018-04-13 Thread Xiubo Li
On 2018/4/14 1:21, Mike Christie wrote: On 04/12/2018 10:08 PM, Xiubo Li wrote: + +if (val != 1) { +pr_err("Invalid block value %d\n", val); I think you wanted "Invalid reset value %d\n" Yeah, just copied it from other place. +return -EINVAL; +} + +spin_unlock(&ud

Re: [PATCHv2] tcmu: allow userspace to reset netlink

2018-04-13 Thread Mike Christie
On 04/12/2018 10:08 PM, Xiubo Li wrote: > >>> + >>> +if (val != 1) { >>> +pr_err("Invalid block value %d\n", val); >> I think you wanted >> >> "Invalid reset value %d\n" > Yeah, just copied it from other place. >> >>> +return -EINVAL; >>> +} >>> + >>> +spin_unlock(&udev

Re: [PATCHv2] tcmu: allow userspace to reset netlink

2018-04-12 Thread Xiubo Li
+ + if (val != 1) { + pr_err("Invalid block value %d\n", val); I think you wanted "Invalid reset value %d\n" Yeah, just copied it from other place. + return -EINVAL; + } + + spin_unlock(&udev->nl_cmd_lock); Need spin_lock() instead of unlock.

Re: [PATCHv2] tcmu: allow userspace to reset netlink

2018-04-12 Thread Mike Christie
On 04/04/2018 11:39 PM, xiu...@redhat.com wrote: > 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

[PATCHv2] tcmu: allow userspace to reset netlink

2018-04-04 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