Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp3583586ybz; Mon, 4 May 2020 05:59:29 -0700 (PDT) X-Google-Smtp-Source: APiQypJrS0iUT46/0zKfiTAv8P5g1LYvVT6TkKs8g7LTLSuUlKK/tHwDS1rbLo6CVB/1sVpCIjna X-Received: by 2002:a17:906:31da:: with SMTP id f26mr14112441ejf.308.1588597168923; Mon, 04 May 2020 05:59:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588597168; cv=none; d=google.com; s=arc-20160816; b=lm6SU4m5QvUGCM7bMUV5GVGTw7YYqUkjLeiVSjviaWkGlMKOHYgWFTWaCV/00FxNg9 Gktz8Xmtj0E0YoQ3edWS2VC617yx7FJUpR5r4SPuLCx5ZKKXvXGw8lMzePcYR50Q3UTP ZDQMh3DV+mOMdiobpoug0Du7s44NFrfbf5svvTaxlqziwIOtq/zDg4w+Ex4lVs6BoR8R Tq/xQtJwO41xcGsJiwjY0lzrWR29MeXCSn/X9gc33Bu2fogpyxKOcrGLpJHWa4Qeo9rw RnJuQjO4sJdTGFpnYyiQCq6dJ4Sdu9s9R2sGNsFpGpfjWPIO3pVPm5zmSr8SeGxD3b2g huUg== 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 :dkim-signature; bh=f2dOPUrKZgUgGSkMrdOrs8H5s2b4gi+dnFwdsR381A4=; b=OpYRiu7FBzuAI30vmAI+0AkJBvAa5cVufarmpZjwY5fJG7mncvqQ86g3uILrzvRYo2 eYECVCPcNG1HElJ73KdY9tKjAIeM5IkzF+FFTeGyBlwnkcu4EiUruHcmIIWc3+pJHe/4 ARSE5qMdMWAPHhIsvIGXn54VokXoptqNktFeOh5tqZz16wv7fbRIjhuWKDKdWMWOslii qpaoxHQqxfztMX86Rsoy/DkBdpB6Yziryp4lNpRI1Sf30xk3+Ddu7BXESG/xRAKimaID zTxS1KDBrFCnF1VfvloDfKyzyCt0gbG5I7zPhIEhIZSN7ga+ycIabM3X9suImyWMWBUs Sc4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="MRIGG/fk"; 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 dn16si7008097edb.488.2020.05.04.05.59.05; Mon, 04 May 2020 05:59:28 -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; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="MRIGG/fk"; 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 S1728507AbgEDMjO (ORCPT + 99 others); Mon, 4 May 2020 08:39:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726625AbgEDMjO (ORCPT ); Mon, 4 May 2020 08:39:14 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 48D9FC061A0E; Mon, 4 May 2020 05:39:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.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; bh=f2dOPUrKZgUgGSkMrdOrs8H5s2b4gi+dnFwdsR381A4=; b=MRIGG/fk13IU7YQiPfdBNpKH6j DTRMMWl3oSa0d8XgMW4fpaSdWKCxKhphckwfEbWTA1dfs5pxJrb3KFnJa6fN7xC3CBduUKAZTvcVQ uB7SMCKeroTFlZj1g7/NeHGHXsZuMOQtVxKUi+SmGcMecwgo9nJEwqLtnbP2Kmz3w8kp/nXtMRntL yqA9IoyAWZTMc02SjkNpbasDk0SbHQ9jlQ8/fXsDQRWGiDgyP3BDKvqF3/4vv2ghDkT1qAX7qXXBU 3/q+5tWrOnhXHhyBKo602j2DRmXGy/gQuhKkmYBxHe0lqdOwEhN/8VUKGgPtjrtyBzSdxf4i9NXE8 aIgD6cvw==; Received: from hch by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVaNN-0007QD-6f; Mon, 04 May 2020 12:39:13 +0000 Date: Mon, 4 May 2020 05:39:13 -0700 From: Christoph Hellwig To: Jens Axboe Cc: Alexander Viro , linux-fsdevel , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH v4] eventfd: convert to f_op->read_iter() Message-ID: <20200504123913.GA14334@infradead.org> References: <6b29f015-bd7c-0601-cf94-2c077285b933@kernel.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6b29f015-bd7c-0601-cf94-2c077285b933@kernel.dk> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 01, 2020 at 01:11:09PM -0600, Jens Axboe wrote: > eventfd is using ->read() as it's file_operations read handler, but > this prevents passing in information about whether a given IO operation > is blocking or not. We can only use the file flags for that. To support > async (-EAGAIN/poll based) retries for io_uring, we need ->read_iter() > support. Convert eventfd to using ->read_iter(). > > With ->read_iter(), we can support IOCB_NOWAIT. Ensure the fd setup > is done such that we set file->f_mode with FMODE_NOWAIT. Can you add a anon_inode_getfd_mode that passes extra flags for f_mode instead of opencoding it? Especially as I expect more users that might want to handle IOCB_NOWAIT.