Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2135581rwl; Sat, 8 Apr 2023 08:24:02 -0700 (PDT) X-Google-Smtp-Source: AKy350Y7FpJWCo3doEp3TZnU/YAG3Y8i2MlbMRBVRLk4/nFOqX3qazBs36RjFTv8cySNcsstoZ87 X-Received: by 2002:a05:6a20:6daa:b0:db:10c8:4c95 with SMTP id gl42-20020a056a206daa00b000db10c84c95mr5848120pzb.17.1680967442715; Sat, 08 Apr 2023 08:24:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680967442; cv=none; d=google.com; s=arc-20160816; b=RKP7dR4vUK29EqD1paCplbTsN9iyObl/gMtRVd/o0jpUPWE/so43WPTALw/6pkiZBU FhAz6Ht/d+wSgk+aGfUbf0mEjv81Gj6SmmrlXSIoIKQglfnq+pI58gLg5YdlWh2rYvhD mEID6VhzqzzzW69CRZmOupAO0NvTHj7rUt5bHPFjtsIqJNqf/XBhecvtRGzMAeh9qa3+ ol6DMw1RG1j3L9j0cSqEUWzLr46BKt3EnFC7ePDhijts8tiDt9dSTpEGq0bBvCzc2SEc r72zT8YuHWmogcP0lLege8vxeJi31XQqKPKVN3G+ygd8y3GToBp9VaxyADulprQZeaGT UvAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id; bh=tn6IcbyPwoZW/SBJkDQHPp5xZHKDqiA3ix7SB1obYW8=; b=db8dlE90sWLe8Jhb7TtffYtd4d44Q9U6KqoIepxAYk4mtVJF2fpjDOCcsH9/zH6yLP SoBFLd5Mc/+JdVi26md49UpaLVRV7CYCPmHZ6eMTNs1tlJcbT88HZreSkR1ZOQ+DHeEW 7JAVYDv86yh7xWZQbdW08w55+KStgJM1ctCRdXGR8zjCwCtKdaQtUL1QLEtdgHQdTJTz tyFn/BByUFwScgyOZ6qhzF9pYLhVeGBq2WohC4UESl9rOrP3etdVi+zWtgen80WLWX52 z5MKgDo3fWNK6pZkJHLyTm6CWKGSp3UFY/E7bMMUyCs3ndXQ8uU9Kcl7dfeDjHhq3bxD KALw== ARC-Authentication-Results: i=1; mx.google.com; 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 y28-20020aa79afc000000b0062d9eed7d25si6505771pfp.57.2023.04.08.08.23.45; Sat, 08 Apr 2023 08:24:02 -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; 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 S229713AbjDHPQt (ORCPT + 99 others); Sat, 8 Apr 2023 11:16:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjDHPQs (ORCPT ); Sat, 8 Apr 2023 11:16:48 -0400 Received: from mx3.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64090EF96; Sat, 8 Apr 2023 08:16:46 -0700 (PDT) Received: from [192.168.1.190] (ip5b426bea.dynamic.kabel-deutschland.de [91.66.107.234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: buczek) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 6247761E4052B; Sat, 8 Apr 2023 17:16:43 +0200 (CEST) Message-ID: Date: Sat, 8 Apr 2023 17:16:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Subject: Re: [PATCH v3 02/11] block: Block Device Filtering Mechanism To: Sergei Shtepa , axboe@kernel.dk, hch@infradead.org, corbet@lwn.net, snitzer@kernel.org Cc: 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 References: <20230404140835.25166-1-sergei.shtepa@veeam.com> <20230404140835.25166-3-sergei.shtepa@veeam.com> Content-Language: en-US From: Donald Buczek In-Reply-To: <20230404140835.25166-3-sergei.shtepa@veeam.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS 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 Hi, Sergei, On 4/4/23 16:08, Sergei Shtepa wrote: > The block device filtering mechanism is an API that allows to attach > block device filters. Block device filters allow perform additional > processing for I/O units. > [...] > diff --git a/include/uapi/linux/fs.h b/include/uapi/linux/fs.h > index b7b56871029c..1848d62979a4 100644 > --- a/include/uapi/linux/fs.h > +++ b/include/uapi/linux/fs.h > @@ -185,6 +185,11 @@ struct fsxattr { > #define BLKROTATIONAL _IO(0x12,126) > #define BLKZEROOUT _IO(0x12,127) > #define BLKGETDISKSEQ _IOR(0x12,128,__u64) > +/* 13* is defined in linux/blkzoned.h */ nit: This is already explained in the comment below your insert. Best Donald > +#define BLKFILTER_ATTACH _IOWR(0x12, 140, struct blkfilter_name) > +#define BLKFILTER_DETACH _IOWR(0x12, 141, struct blkfilter_name) > +#define BLKFILTER_CTL _IOWR(0x12, 142, struct blkfilter_ctl) > + > /* > * A jump here: 130-136 are reserved for zoned block devices > * (see uapi/linux/blkzoned.h)