From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EBB78C00144 for ; Tue, 26 Jul 2022 23:13:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232501AbiGZXNB (ORCPT ); Tue, 26 Jul 2022 19:13:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231734AbiGZXNB (ORCPT ); Tue, 26 Jul 2022 19:13:01 -0400 Received: from zeniv.linux.org.uk (zeniv.linux.org.uk [IPv6:2a03:a000:7:0:5054:ff:fe1c:15ff]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A6EFEB57; Tue, 26 Jul 2022 16:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=linux.org.uk; s=zeniv-20220401; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=guB1cTIS1RRgHxlh1DGoPy13IP31UCciVViLjNYzMvY=; b=SxJjZiwzslnm81HdqmigkghWkM 3XFhpuDVJ/UAvWdRaU6R976S0ZfSdaH30q6gGxwGJJojPWqJzw+wyZTxMnj0dALQkgP958DK+rv9R 80Usq58V53ImrSOk5Uu7QM1uxo1haVbOtDE9XAfQB6z42vW/v6CtLM3gMrqTp7cXOpN/SH+sSCOUR 1P/TfaIzIenEGEIJr/kmNj41a1zmRQHRSKtHFvi0enEG4cUGLQKKSBc2DwotQPqSK9jKTtIqCNJHc vdhaasYibAX9CKzXmwXj3IDwNXrF9dnEK3ZSzHFkTOlb0xnItbN6Kn9Mxas3jlvFj5q0OV1Wziglo akfijmVQ==; Received: from viro by zeniv.linux.org.uk with local (Exim 4.95 #2 (Red Hat Linux)) id 1oGTjR-00GALr-2x; Tue, 26 Jul 2022 23:12:53 +0000 Date: Wed, 27 Jul 2022 00:12:53 +0100 From: Al Viro To: Keith Busch Cc: linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, io-uring@vger.kernel.org, linux-fsdevel@vger.kernel.org, axboe@kernel.dk, hch@lst.de, Keith Busch Subject: Re: [PATCH 4/5] io_uring: add support for dma pre-mapping Message-ID: References: <20220726173814.2264573-1-kbusch@fb.com> <20220726173814.2264573-5-kbusch@fb.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220726173814.2264573-5-kbusch@fb.com> Sender: Al Viro Precedence: bulk List-ID: X-Mailing-List: io-uring@vger.kernel.org On Tue, Jul 26, 2022 at 10:38:13AM -0700, Keith Busch wrote: > + if (S_ISBLK(file_inode(file)->i_mode)) > + bdev = I_BDEV(file->f_mapping->host); > + else if (S_ISREG(file_inode(file)->i_mode)) > + bdev = file->f_inode->i_sb->s_bdev; *blink* Just what's the intended use of the second case here?