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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2655DC4363A for ; Wed, 21 Oct 2020 11:45:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80A3220872 for ; Wed, 21 Oct 2020 11:45:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="QGd9o9rB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80A3220872 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 9C7A26B005C; Wed, 21 Oct 2020 07:45:34 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 950906B0062; Wed, 21 Oct 2020 07:45:34 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 818CF6B0068; Wed, 21 Oct 2020 07:45:34 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 5116A6B005C for ; Wed, 21 Oct 2020 07:45:34 -0400 (EDT) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id E74451EE6 for ; Wed, 21 Oct 2020 11:45:33 +0000 (UTC) X-FDA: 77395752546.03.thumb81_5d10e6027248 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin03.hostedemail.com (Postfix) with ESMTP id BD34A28A4E8 for ; Wed, 21 Oct 2020 11:45:33 +0000 (UTC) X-HE-Tag: thumb81_5d10e6027248 X-Filterd-Recvd-Size: 3757 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf33.hostedemail.com (Postfix) with ESMTP for ; Wed, 21 Oct 2020 11:45:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.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=8zzsgfeCz+OvMf8zlEZunmz93FbN8Y4rF8K/uFWA5ks=; b=QGd9o9rBa2iW7Cyr2v7NAiwDn8 0Et+wmPKEP4cW4o7FgHtSsDY6es0NhSFUbxGZAbLK59bexfbkGxsMpCbQen6TaoNpLDcdQsevt0VU H4AGXhHPvO3YZr+wsmik1x6wQTgzJ5eGaa5IGNq/lqRd7ErRe8XAlFx4DV0uaUX92bZH8/aXToY7O k2JfovW8cwvr2tg6YmnVsNfvVSe0yuwilN3JKm50avUs+I2c2xhL+LbswIPmKm3d7oxIaYGVOxtMs 4A1gqTSPAVbV5JaQzGfjKC2b6vexUcL6Vl6BoDkedhL5rc5p+SaPBT23PJ2QUhYzC3R+IwUev6MWW a6JfcM+A==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kVCXm-0002kB-L9; Wed, 21 Oct 2020 11:44:38 +0000 Date: Wed, 21 Oct 2020 12:44:38 +0100 From: Matthew Wilcox To: Damien Le Moal Cc: Sergei Shtepa , "axboe@kernel.dk" , "viro@zeniv.linux.org.uk" , "hch@infradead.org" , "darrick.wong@oracle.com" , "linux-xfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , "rjw@rjwysocki.net" , "len.brown@intel.com" , "pavel@ucw.cz" , "akpm@linux-foundation.org" , Johannes Thumshirn , "ming.lei@redhat.com" , "jack@suse.cz" , "tj@kernel.org" , "gustavo@embeddedor.com" , "bvanassche@acm.org" , "osandov@fb.com" , "koct9i@gmail.com" , "steve@sk2.org" , "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , "linux-mm@kvack.org" Subject: Re: [PATCH 1/2] Block layer filter - second version Message-ID: <20201021114438.GK20115@casper.infradead.org> References: <1603271049-20681-1-git-send-email-sergei.shtepa@veeam.com> <1603271049-20681-2-git-send-email-sergei.shtepa@veeam.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, Oct 21, 2020 at 09:21:36AM +0000, Damien Le Moal wrote: > > + * submit_bio_direct - submit a bio to the block device layer for I/O > > + * bypass filter. > > + * @bio: The bio describing the location in memory and on the device. > > * > > + * Description: You don't need this line. > > + * This is a version of submit_bio() that shall only be used for I/O > > + * that cannot be intercepted by block layer filters. > > + * All file systems and other upper level users of the block layer > > + * should use submit_bio() instead. > > + * Use this function to access the swap partition and directly access > > + * the block device file. I don't understand why O_DIRECT gets to bypass the block filter. Nor do I understand why anybody would place a block filter on the swap device. But if somebody did place a filter on the swap device, why should swap be able to bypass the filter?