From patchwork Wed Feb 15 00:25:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 9573131 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8678D6045F for ; Wed, 15 Feb 2017 00:27:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7A00F267EC for ; Wed, 15 Feb 2017 00:27:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6EE5628438; Wed, 15 Feb 2017 00:27:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E17A9267EC for ; Wed, 15 Feb 2017 00:27:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750943AbdBOA11 (ORCPT ); Tue, 14 Feb 2017 19:27:27 -0500 Received: from esa2.hgst.iphmx.com ([68.232.143.124]:50689 "EHLO esa2.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751348AbdBOA1Z (ORCPT ); Tue, 14 Feb 2017 19:27:25 -0500 X-IronPort-AV: E=Sophos;i="5.35,163,1483977600"; d="scan'208";a="81774846" Received: from unknown (HELO milsmgep15.sandisk.com) ([63.163.107.21]) by ob1.hgst.iphmx.com with ESMTP; 15 Feb 2017 08:43:11 +0800 Received: from MILHUBIP03.sdcorp.global.sandisk.com (Unknown_Domain [10.201.67.162]) (using TLS with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by (Symantec Messaging Gateway) with SMTP id 17.E4.57638.A20A3A85; Tue, 14 Feb 2017 16:26:18 -0800 (PST) Received: from milsmgip11.sandisk.com (10.177.8.100) by MILHUBIP03.sdcorp.global.sandisk.com (10.177.9.96) with Microsoft SMTP Server id 14.3.319.2; Tue, 14 Feb 2017 16:26:15 -0800 X-AuditID: 0ac94369-26dee9800001e126-69-58a3a02a0589 Received: from exp-402881.sdcorp.global.sandisk.com ( [10.177.9.6]) by (Symantec Messaging Gateway) with SMTP id 69.7D.11415.720A3A85; Tue, 14 Feb 2017 16:26:15 -0800 (PST) From: Bart Van Assche To: "Nicholas A . Bellinger" CC: , Bart Van Assche , Hannes Reinecke , Christoph Hellwig , Mike Christie , David Disseldorp Subject: [PATCH v6 07/33] target: Use system workqueues for TMF Date: Tue, 14 Feb 2017 16:25:46 -0800 Message-ID: <20170215002612.14566-8-bart.vanassche@sandisk.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170215002612.14566-1-bart.vanassche@sandisk.com> References: <20170215002612.14566-1-bart.vanassche@sandisk.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrOLMWRmVeSWpSXmKPExsXCddJ5ka7WgsURBu92G1p8/T+dxWLBm71s FitXH2WyWH9kA6NF2+ozjBatS98yObB53N9+hMlj980GNo/3+66yeazfcpXFY/Ppao/Pm+QC 2KK4bFJSczLLUov07RK4Ms7d0Slo565486y2gXEzZxcjB4eEgInEm4mFXYxcHEICS5kkvh+5 zwrh7GCUeLPkIlMXIydY0Z2FjUwQiY2MEtMnN4El2ASMJL69n8kCYosA2at7loEVMQvcY5T4 vaKVFSQhLGAv8f7cTTYQm0VAVWLlt9uMIDYvULxn/Sw2iA3yErvaLoLVcwo4SMzYcZIF5Dwh oJpHZ6xBZkoIzGOV2H3lDStEr6DEyZlPwBYzC0hIHHzxghnEFhJQlzi5ZD7TBEahWUjKZiEp W8DItIpRLDczpzg3PbXA0FSvODEvJbM4Wy85P3cTIyT4M3cw3n3ifYhRgINRiYf3hOziCCHW xLLiytxDjBIczEoivGz1QCHelMTKqtSi/Pii0pzU4kOM0hwsSuK852SmRggJpCeWpGanphak FsFkmTg4pRoYk90/nEv+8TFpU0ibWjSHutvkqYpsF77tktHX6J3lzfgy0zOmy9r37pZbf/jD KkUPHL3WLyf++/El47ymdFW+8yvdC+dGLfZNXLjUy3a3gr7kdNZHH3i5lnPe3JRSUz43usRC zszqqHm3qwPvipwPBUeuVnHdM9hXaKozedcqVpObq98fiVikxFKckWioxVxUnAgAvjN88XoC AAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOJMWRmVeSWpSXmKPExsXCtZGTTVd9weIIg9MfBSwO/mxjtPj6fzqL xYI3e9ksVq4+ymSx/sgGRou21WcYLVqXvmVyYPe4v/0Ik8fumw1sHu/3XWXzmLbmPJPH+i1X WTw2n672+LxJLoA9issmJTUnsyy1SN8ugSvj3B2dgnbuijfPahsYN3N2MXJySAiYSNxZ2MjU xcjFISSwnlHi/u+1TCAJNgEjiW/vZ7KA2CJA9uqeZWBFzAIPGCUuLDrPCpIQFrCXeH/uJhuI zSKgKrHy221GEJsXKL5k5QdWiA3yErvaLoLZnAIOEjN2nAQaygG0zV7i0RnrCYzcCxgZVjGK 5WbmFOemZxYYGuoVJ+alZBZn6yXn525ihARN5A7GpxPNDzEycXBKNTDyMBi6rXnMcXuPyaxQ j2AmppcRUk++aRQ1py+bc3XC0SjXvgfCGnuPeVvdPJX5be8Vzre+HF9jPd/6PvrJlDjxrfPW K+U2ouVid/aIy744fv0dX+bWyFUZX6StlCuW7qot5rsdWxu1IVDW1Keo9fqxjtwrLm7M793v tLvlRKWKcCz48fxv200lluKMREMt5qLiRABhsQ70ygEAAA== MIME-Version: 1.0 Sender: target-devel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: target-devel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A quote from SAM-5: "The order in which task management requests are processed is not specified by the SCSI architecture model. The SCSI architecture model does not require in-order delivery of such task management requests or processing by the task manager in the order received. To guarantee the processing order of task management requests referencing sent to a specific logical unit, an application client should not have more than one such task management request pending to that logical unit." This means that it is safe to use the system workqueues instead of tmr_wq for processing TMFs. Signed-off-by: Bart Van Assche Cc: Hannes Reinecke Cc: Christoph Hellwig Cc: Mike Christie Cc: David Disseldorp --- drivers/target/target_core_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c index efb9e6f38201..ba74f53ef09d 100644 --- a/drivers/target/target_core_transport.c +++ b/drivers/target/target_core_transport.c @@ -3150,7 +3150,7 @@ int transport_generic_handle_tmr( } INIT_WORK(&cmd->work, target_tmr_work); - queue_work(cmd->se_dev->tmr_wq, &cmd->work); + schedule_work(&cmd->work); return 0; } EXPORT_SYMBOL(transport_generic_handle_tmr);