From mboxrd@z Thu Jan 1 00:00:00 1970 From: Peter Zijlstra Subject: Re: [PATCH 1/2] sched/wait: Add wait_event_lock_irq_timeout for TASK_UNINTERRUPTIBLE usage Date: Wed, 10 Oct 2018 10:31:27 +0200 Message-ID: <20181010083127.GL5728@hirez.programming.kicks-ass.net> References: <1539141790-13557-1-git-send-email-nab@linux-iscsi.org> <1539141790-13557-2-git-send-email-nab@linux-iscsi.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <1539141790-13557-2-git-send-email-nab@linux-iscsi.org> Sender: linux-kernel-owner@vger.kernel.org To: "Nicholas A. Bellinger" Cc: target-devel , linux-scsi , lkml , "Martin K. Petersen" , Mike Christie , Hannes Reinecke , Christoph Hellwig , Sagi Grimberg , "Bryant G. Ly" , Bart Van Assche List-Id: linux-scsi@vger.kernel.org On Wed, Oct 10, 2018 at 03:23:09AM +0000, Nicholas A. Bellinger wrote: > From: Nicholas Bellinger > > Short of reverting commit 00d909a107 for v4.19, target-core needs a > wait_event_t marco can be executed using TASK_UNINTERRUPTIBLE to > function correctly with existing fabric drivers that expect to run > with signals pending during session shutdown and active se_cmd I/O > quiesce. > > The most notable is iscsi-target/iser-target, while ibmvscsi_tgt invokes > session shutdown logic from userspace via configfs attribute that could > also potentially have signals pending. > > So go ahead and introduce wait_event_lock_irq_timeout() to achieve this, > and update + rename __wait_event_lock_irq_timeout() to make it accept > 'state' as a parameter. > > Fixes: 00d909a107 ("scsi: target: Make the session shutdown code also wait for commands that are being aborted") > Cc: Bart Van Assche > Cc: Mike Christie > Cc: Hannes Reinecke > Cc: Christoph Hellwig > Cc: Sagi Grimberg > Cc: Bryant G. Ly > Cc: Peter Zijlstra (Intel) > Tested-by: Nicholas Bellinger > Signed-off-by: Nicholas Bellinger Acked-by: Peter Zijlstra (Intel)