Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp249622ybz; Thu, 30 Apr 2020 21:01:54 -0700 (PDT) X-Google-Smtp-Source: APiQypL2lOSV8AetvVajjXSGs6rpv33u2xvmt6VRN31J3LKZdydrH0ZybiNtQIi3/3pcqk761awu X-Received: by 2002:a50:ea87:: with SMTP id d7mr1894363edo.48.1588305714268; Thu, 30 Apr 2020 21:01:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588305714; cv=none; d=google.com; s=arc-20160816; b=sn7hdagA9sKaDE/8ghmOVJei5YQh0CMfiSr9hFZQuJ5yf5HUCErltoWtA8tzoZqCoY qaIuMb9Yib+lK1aTdKokEiGSuusyIW3hZlpkmbpZTXEZcBHzxxymxLIi/d89F93XfWqC wtO2ieHAPr52KXdmJXQ6fEaJPGbQqDlKZNzVcdyzQSPc6qUy9ILg62n/xbTTjJrUIu8v YimbXoIZtWZe/HrgYcbRXz4OXrX/Us+BWjadQmYPzX5Pq+dlrC9cb3rEunsYkMetCHcT u6CcJXyFICdTvEWa+PdtKRaLt+VOQKQHPh7o1+heJ+X6dZgCBVt+VaqyGRBikSHKr178 TZBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Wt6qsfNGWcWX3rsnMizR4KSNLymdJSfJY2AEjXwV8OQ=; b=hYZ10VqBJVwUs40smzZitv206d9MiEpGxFa+DGmz0xCklEKb7NKskYQ4WMfH7CmPwi C/1IT1XJihJ26ricsDAekmwu4dB0tTquRukmdKWwjuVjCUd0RcMXZo264HRDq8y2cPZN i347L1zZq9IMY3VFYdKD1BkoI5H4orrTTyuBkaUE8twKxSS1OR/2mu+mMZMllzWaboSK 3ryi/UZxA5Yyc8e/DG+wjGHw79MHOtBD0cOWROHI+95pMaQmFAQ4t6lDaPhjwpy6HEmc UTXr+VgYOCI9mg5PAwHv4L2ld6KSHw7E0djwBjMQyV8JZfAS9JYXtedIydsZ0ZZhLSWE sV7w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j12si1055621ejt.110.2020.04.30.21.01.31; Thu, 30 Apr 2020 21:01:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728236AbgEAD6X (ORCPT + 99 others); Thu, 30 Apr 2020 23:58:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46334 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728133AbgEAD6W (ORCPT ); Thu, 30 Apr 2020 23:58:22 -0400 Received: from ZenIV.linux.org.uk (zeniv.linux.org.uk [IPv6:2002:c35c:fd02::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F9B2C035494; Thu, 30 Apr 2020 20:58:22 -0700 (PDT) Received: from viro by ZenIV.linux.org.uk with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jUMoe-00FaSo-R2; Fri, 01 May 2020 03:58:21 +0000 Date: Fri, 1 May 2020 04:58:20 +0100 From: Al Viro To: Jens Axboe Cc: linux-fsdevel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] pipe: read/write_iter() handler should check for IOCB_NOWAIT Message-ID: <20200501035820.GH23230@ZenIV.linux.org.uk> References: <273d8294-2508-a4c2-f96e-a6a394f94166@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <273d8294-2508-a4c2-f96e-a6a394f94166@kernel.dk> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 30, 2020 at 10:24:46AM -0600, Jens Axboe wrote: > Pipe read/write only checks for the file O_NONBLOCK flag, but we should > also check for IOCB_NOWAIT for whether or not we should handle this read > or write in a non-blocking fashion. If we don't, then we will block on > data or space for iocbs that explicitly asked for non-blocking > operation. This messes up callers that explicitly ask for non-blocking > operations. Why does io_uring allow setting IOCB_NOWAIT without FMODE_NOWAIT, anyway?