Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5073434rwl; Mon, 10 Apr 2023 23:26:33 -0700 (PDT) X-Google-Smtp-Source: AKy350ZORdMfxlFQ4hIvTZXdg8ctiS7WPmxOxtBXC54SGckSkknFaP3urXyq1mTzvrVgxUL+llxo X-Received: by 2002:a05:6402:5162:b0:504:89df:fcbd with SMTP id d2-20020a056402516200b0050489dffcbdmr8699044ede.4.1681194392897; Mon, 10 Apr 2023 23:26:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681194392; cv=none; d=google.com; s=arc-20160816; b=EyNhOrOLS4esTeJlU8U8NXG6KYYpsR7d89STJ2dUpmWNZCfC7QMpK/xtps1J71BBPg VkClDgqUNrDua0sE3a7ztBt8ZeDc+kDCSLUOu8UIL7ThBtSNNyMCjwOclYKNIJ2kne1h YwTPKzD9IL1ik1opHVO6xYgwcn6zfTPdC1DPEPALJemFdi6c2VZUInwCXT4VEsd2yVkR lEbDXvxUdjsGvUDrQn6JzmrCyc+qtJGQeptqY2fyae65mSX36WBOfOkGOSM3bA688xJg YnnCmXv7WPFrZGBXI6Ati/eGCNjMO1kNHZ/f4GmGpdbBpEGmbU49PPHeZjJzEo/mkfhI wOqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=V634ZR1sb91RRkxCjl933s0IREyHzeo5FH6izyocIFg=; b=c6IKbdDlA/JmWL7c6CdaHEJcmEZpjk2aSyN/hdNfsCW2qoybsrCA/CX9oF5LO8RkQ0 HmCqru57Sp4Cy5DPZbwVlX0tD4/kd0Xr4IDKXJwtNBibxsfK8tZAQGP28UnV2HjOucZb s52+Pf2bqrnwk28xtVj4xIDNdngZ6LlKOyrpF26GeYrfnF8EWGBklUkBnnBTiEzgx4rn IasiPd/Nxn2u7Lbv4CZ9y5nBKRgwDzexnvigY3Puc/1rNZLKj+NvaxeKA8vFPgQfuPPI BxjYzvgloRkH2mhTncERVQr54myStcW45eGBCGJRLHXHmKi7NYCBfmbcCRMcbLbHlnvi eK6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=I4hUZE36; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lo12-20020a170906fa0c00b0093ec7db2010si777872ejb.665.2023.04.10.23.26.08; Mon, 10 Apr 2023 23:26:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=I4hUZE36; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230220AbjDKGZ1 (ORCPT + 99 others); Tue, 11 Apr 2023 02:25:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjDKGZ0 (ORCPT ); Tue, 11 Apr 2023 02:25:26 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B60961722; Mon, 10 Apr 2023 23:25:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=V634ZR1sb91RRkxCjl933s0IREyHzeo5FH6izyocIFg=; b=I4hUZE36z0qp7Vq7v0DCCE0ozw uS/2ANsUXeehHb+Nl63FEeLgnTlp7jntuJk4QAyhO76S9KvodfcKhdM9+1IRBdu3dw0ujjoL69xae M6QqmipKYTwwKYn8wh69UPeqPCR7RvtvoRIRckZ0MqmohdAx1/f1aFswe8p8prSaCs76AV0FfkSoL 2lOC+cHqH0MUYUPXN7III+hikiyH4JZt92jbqm+qlN/2vnNR/bTJ8alULl5MvtCYTYA8vFshmgwyI /qJ0pLMn66MoVI4y5hMT0JHpbzG5y+/dnpbLfE/FlnENhUNa8fp5xvf+ibGmGp/oCkWN8Iy+KiIc+ rmx3jR7w==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1pm7R8-00GZdX-0B; Tue, 11 Apr 2023 06:25:02 +0000 Date: Mon, 10 Apr 2023 23:25:02 -0700 From: Christoph Hellwig To: Donald Buczek Cc: Sergei Shtepa , axboe@kernel.dk, hch@infradead.org, corbet@lwn.net, snitzer@kernel.org, viro@zeniv.linux.org.uk, brauner@kernel.org, willy@infradead.org, kch@nvidia.com, martin.petersen@oracle.com, vkoul@kernel.org, ming.lei@redhat.com, gregkh@linuxfoundation.org, linux-block@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH v3 02/11] block: Block Device Filtering Mechanism Message-ID: References: <20230404140835.25166-1-sergei.shtepa@veeam.com> <20230404140835.25166-3-sergei.shtepa@veeam.com> <793db44e-9e6d-d118-3f88-cdbffc9ad018@molgen.mpg.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <793db44e-9e6d-d118-3f88-cdbffc9ad018@molgen.mpg.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Apr 08, 2023 at 05:30:19PM +0200, Donald Buczek wrote: > Maybe detach the old filter and attach the new one instead? An atomic replace might be usefull and it wouldn't complicate the code to do that instead. If its the same filter, maybe just return success and don't go through ops->detach and ops->attach? I don't think a replace makes any sense. We might want multiple filters eventually, but unless we have a good use case for even just more than a single driver we can deal with that once needed. The interface is prepared to support multiple attached filters already.