Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp5820417pxu; Thu, 22 Oct 2020 11:52:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOVH8Rb9cUpc3qkMk+v71NtR7oFIPrLP+lpmakEopt/N7jQ+fbCeKwz1FPuP50rDbZU05b X-Received: by 2002:a50:e447:: with SMTP id e7mr3586454edm.263.1603392764977; Thu, 22 Oct 2020 11:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603392764; cv=none; d=google.com; s=arc-20160816; b=AEPKUaZ0MONS7sTFYTgMgi0JsekqMaVrYZjaGrjzs8vEGHqCTKHUJF/DtoyYhAlPZK /WX3wc8tV908Gk29nUSpfSX4vQ9I1m8FNnudIMYqp0CVcfyUS9xks3yCoXsy6qwtjdim /ksyGj1czf98Bq++fzRm75jCNEhK73QgAXIbzwmOzOkbDhmnrEHhWFvh40oOQqkFpqhq 3tHvSVkXSGD7pfSYi7FJnJFLBP92uaKFYBEdRfV8x9BdvpPfTqnVoMGvq0cO6IkxBPyp 0G+WBhRkzZ+M+OtxWB49bHKHEhrUxAuJgAtcY82Vz6A2x34IFRq0OTYMZ7f6dp8CjK7O Vo3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=1XI2Q+0LJ+MrF6PTdb/vTI0hg1qM7/BgdBxfc/cQLFU=; b=cxM8/XcBggIJWJZFGcQQTViI6bz2s1jTq0xc+LyFd5fO4U7hlECEsGlaAwXerFpveb id2trn8Mf6heinTKQSkvXTEMN9zD03DjqhVH317GyHM0lohJtE9NkFKUNVntWAoUsscR 74aKIYrYd0GRbBkRYufu5N4aL1Q1oaI2EEq/wT7HB66YNRaxMIlVxSa4O4o0k0DbfxrR zaUZFUBYkdArMZ9p/ZHkGvrLwJJYbOPGupCux+L8QTVbg5jg50NPc026/YrQ74zpvvTv DcSazSiDfzf/uQil7W+3NtTay7N84EwJ7G1NO8pJv6ETNbemYKdJu8bNTcV0VZCedSsn TCAg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y7si1464624ejd.450.2020.10.22.11.52.23; Thu, 22 Oct 2020 11:52:44 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S369721AbgJVSfQ (ORCPT + 99 others); Thu, 22 Oct 2020 14:35:16 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:42208 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S368258AbgJVSfQ (ORCPT ); Thu, 22 Oct 2020 14:35:16 -0400 Received: by mail-pf1-f193.google.com with SMTP id x13so1675919pfa.9; Thu, 22 Oct 2020 11:35:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1XI2Q+0LJ+MrF6PTdb/vTI0hg1qM7/BgdBxfc/cQLFU=; b=KfvJzwfxn7jq43862MSUDXsjHVLQiDL2XxoZJGmoXONgP4vY3GlCA5FN+8DrSsW8wB 9SmbJi6W4JdS5zP5MzYogQw2PEMOlYdeKT6+WY0h01gtWfYbQhRjLOx0oc5r/8kiEOLp 4eIQiBAyv4wvJfpI6+JS713/r5xD54+18A2io2LjdPOKLQCw3Xa5BGWDUkjlj5m5F1SR raWFqZtJq/rlWV3AqoLz7KXLZypGdBl3h/vciJMketksAu0hImF/F4e3OxebTToubG+f 1/VAmkFB1GxeNxg75NKaDKeoIUGinxz/SKDwgRSkrGuq/Xq3oIYt2o+5il5uSpTq1j7G cmcQ== X-Gm-Message-State: AOAM53173u/AwlX54c+Hsy6e5BJ0qGFyF8+wWy5WJICweLZmcvJ93i1Y hO+KLdQJP5Q3SwhAmQL9TxmqQ9iFEr7O+8FtCOE= X-Received: by 2002:a63:a546:: with SMTP id r6mr3310324pgu.160.1603391713825; Thu, 22 Oct 2020 11:35:13 -0700 (PDT) MIME-Version: 1.0 References: <1603271049-20681-1-git-send-email-sergei.shtepa@veeam.com> In-Reply-To: <1603271049-20681-1-git-send-email-sergei.shtepa@veeam.com> From: Mike Snitzer Date: Thu, 22 Oct 2020 14:35:02 -0400 Message-ID: Subject: Re: [PATCH 0/2] block layer filter and block device snapshot module To: Sergei Shtepa Cc: Jens Axboe , Alexander Viro , Christoph Hellwig , "Darrick J. Wong" , linux-xfs@vger.kernel.org, linux-fsdevel , rjw@rjwysocki.net, len.brown@intel.com, Pavel Machek , Andrew Morton , johannes.thumshirn@wdc.com, Ming Lei , Jan Kara , Tejun Heo , gustavo@embeddedor.com, Bart Van Assche , osandov@fb.com, koct9i@gmail.com, Damien Le Moal , steve@sk2.org, linux-block , "linux-kernel@vger.kernel.org" , linux-pm@vger.kernel.org, linux-mm@kvack.org, device-mapper development Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 21, 2020 at 5:04 AM Sergei Shtepa wrote: > > Hello everyone! Requesting for your comments and suggestions. > > # blk-filter > > Block layer filter allows to intercept BIO requests to a block device. > > Interception is performed at the very beginning of the BIO request > processing, and therefore does not affect the operation of the request > processing queue. This also makes it possible to intercept requests from > a specific block device, rather than from the entire disk. > > The logic of the submit_bio function has been changed - since the > function execution results are not processed anywhere (except for swap > and direct-io) the function won't return a value anymore. Your desire to switch to a void return comes exactly when I've noticed we need it. ->submit_bio's blk_qc_t return is the cookie assigned by blk-mq. Up to this point we haven't actually used it for bio-based devices but it seems clear we'll soon need for bio-based IO polling support. Just today, I've been auditing drivers/md/dm.c with an eye toward properly handling the blk_qc_t return (or lack thereof) from various DM methods. It could easily be that __submit_bio_noacct and __submit_bio_noacct_mq will be updated to do something meaningful with the returned cookie (or that DM will) to facilitate proper IO polling. Mike