Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp631567imm; Wed, 10 Oct 2018 01:34:13 -0700 (PDT) X-Google-Smtp-Source: ACcGV60eiakwkLAUxRefgu0IRaSMpy2kvBba01H/xMFWBaLelbtFl9v9HtcfEts2/NPTwR0QlTCr X-Received: by 2002:a63:6781:: with SMTP id b123-v6mr29107834pgc.151.1539160453108; Wed, 10 Oct 2018 01:34:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539160453; cv=none; d=google.com; s=arc-20160816; b=csOM8Xu7zGQDFYhV40vcErnLHAQyD8rkTv5DG/VIxil2lJMcNMeGbAEMP67agqBUlT VkJ9WZAXhzZ9dVMfk1dTEm4fgs2Vnl2RubNiDoayXse3cW0gooItAV3PzTC4s7TvHUl7 DISZQBA3E5Kp89nxriQjJG4xhfNrT+QCQj12JP88j4r21A3txXQhZ5wa7bLw2xvVqd32 KS4cN/R5UC8Bg5yxXvMxzCvHxnTXP/Vox5/iB1VQle9o1xNwynpt1ezyCBNjeEd4pLU8 O9RWgJRwkKwbpBGWirkKh8EuaxEj7Y/vLGJ236PUDv3Onw2PHLgPKrsvnXX05tn6Bnzv 5wfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=tep/GRtaPsB6kCE8rAZm1ALimaWPMOS6VQXfKLAFJ18=; b=B9mcObBU+ILxzxQ0May7mG3j6U9R/kBeMDYW/5y28GfwXJ5581sZ1jnDCr96QVCbkK X1Hrssc3WthdwTFJArD6xDQ5RW0hEFyKkezwEZmCl/+nXZ3J5PsYvmd+QvSfppwHhhYg sBOgiDRwMIfZO7kRetcLHoVwx8JHh3yvYo6/K1yBjRWZd6RmCTwXXnccDczSsifjEiw4 3sqfPJ9osgyP/hZuyAdjKx/oBfJwFYw3UA/P4GgR7qqUyRMBF5YjDCiGYNJGErisAVI1 lYfiBZDVD+v5bBxyeUIbNFdQImZWSu7jeFpBeMXKhQd0l8VrgltXE5WZX14594okIbVY TaZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=honMeLma; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c1-v6si21143156pld.107.2018.10.10.01.33.58; Wed, 10 Oct 2018 01:34:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=honMeLma; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727328AbeJJPxQ (ORCPT + 99 others); Wed, 10 Oct 2018 11:53:16 -0400 Received: from merlin.infradead.org ([205.233.59.134]:57648 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726579AbeJJPxP (ORCPT ); Wed, 10 Oct 2018 11:53:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tep/GRtaPsB6kCE8rAZm1ALimaWPMOS6VQXfKLAFJ18=; b=honMeLma1eJ+UEFlVCySIE1nG tHxlzbGvySQf6n9EmKKnIB5Qi5rOoc4StT2Qx4EKGKsWnpDlzHVhf9WC6c9fCOlzjQ85OtQvukN2E c7nE6SvgZtC1/cAsqu79Xu7msFL8QzNhiI5jHapYLcO+WIgz0d/A/vtmoUkudeOFw4cV/+Sko5bKu 6gBSSkp0SHPT2m/Lzw2K2ea1dTcPQUgUivTPxirmiMXDndihq3DviBWStssKdgEDmKaxb4SuOlXbP Tpa+Pak9Sc03fZWPnm9UuoaDSs4iE6GwZyIyBaaF892IAW6jfoVqPBfnTi+ZFkznj5qwkL8tuB1E4 7pbDx/HMQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gA9tx-0003zh-Ee; Wed, 10 Oct 2018 08:31:29 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 7B3522029856A; Wed, 10 Oct 2018 10:31:27 +0200 (CEST) Date: Wed, 10 Oct 2018 10:31:27 +0200 From: Peter Zijlstra 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 Subject: Re: [PATCH 1/2] sched/wait: Add wait_event_lock_irq_timeout for TASK_UNINTERRUPTIBLE usage 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 Content-Disposition: inline In-Reply-To: <1539141790-13557-2-git-send-email-nab@linux-iscsi.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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)