[PATCH v4] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-11-22 Thread xiubli
From: Xiubo Li Currently there has one cmd timeout timer and one qfull timer for each udev, and whenever there has any new coming cmd it will update the cmd timer or qfull timer. And for some corner case the timers are always working only for the ringbuffer's and full queue's newest cmd. That's

[PATCH v3] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-10-17 Thread xiubli
From: Xiubo Li Currently there has one cmd timeout timer and one qfull timer for each udev, and whenever there has any new coming cmd it will update the cmd timer or qfull timer. And for some corner case the timers are always working only for the ringbuffer's and full queue's newest cmd. That's

[PATCH v2] scsi: tcmu: avoid cmd/qfull timers updated whenever a new cmd comes

2018-09-20 Thread xiubli
From: Xiubo Li Currently there has one cmd timeout timer and one qfull timer for each udev, and whenever there has any new coming cmd it will update the cmd timer or qfull timer. And for some corner case the timers are always working only for the ringbuffer's and full queue's newest cmd. That's

[PATCH] scsi: tcmu: setup one timeout timer for each cmd

2018-09-18 Thread xiubli
From: Xiubo Li Currently there has one cmd timeout timer for each udev, and whenever there has any new coming cmd it will update the timer. And for some corner case the timer is always working only for the ringbuffer's newest cmd. That's to say the timer won't be fired even there has one cmd

[PATCH] tcmu: fix crash for dereferencing the released udev->mb_addr memory

2018-07-19 Thread xiubli
From: Xiubo Li The logs are: BUG: unable to handle kernel NULL pointer dereference at 0040 IP: [] tcmu_reset_ring_store+0x149/0x240 [target_core_user] PGD 8e254067 PUD e255067 PMD 0 Oops: 0002 [#1] SMP [...] CPU: 0 PID: 36077 Comm: tcmu-runner Kdump: loaded Not tainted

[PATCH] tcmu: remove useless code and clean up the code style.

2018-06-07 Thread xiubli
From: Xiubo Li Since the TCMU_RING_SIZE macro is not using here will discard it and at the same time clean up the code style. Signed-off-by: Xiubo Li --- drivers/target/target_core_user.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git

[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

[PATCHv4 2/3] target: adjust and export target_for_each_device visible to modules

2018-04-19 Thread xiubli
From: Xiubo Li Make the target_for_each_device could list all the devices not only configured as needed. Signed-off-by: Xiubo Li --- drivers/target/target_core_device.c | 10 +- drivers/target/target_core_internal.h | 2 --

[PATCHv4 0/3] tcmu: allow userspace to reset netlink

2018-04-19 Thread xiubli
From: Xiubo Li Changes since v1(suggested by Mike Christie): v2: - Makes the reset per device. v3: - Remove nl_cmd->complete, use status instead - Fix lock issue - Check if a nl command is even waiting before trying to wake up v4: - Add module wide action support and

[PATCHv4 1/3] target/configfs: add module wide action support

2018-04-19 Thread xiubli
From: Xiubo Li For some case we need some module wide configfs to contol some attributes of the whole transport module. Signed-off-by: Xiubo Li --- drivers/target/target_core_configfs.c | 46 +++

[PATCHv3] tcmu: allow userspace to reset netlink

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

[PATCH] tcmu: allow userspace to reset netlink

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