Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2730085pxk; Tue, 15 Sep 2020 00:11:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR5hjKSQuqN5LKGB5bV6hrdKL4Tw+IKtou1ORl1SWelcQRz+SvxeqQDs6OuHZf6dJCahSn X-Received: by 2002:a17:906:b097:: with SMTP id x23mr17990061ejy.21.1600153865526; Tue, 15 Sep 2020 00:11:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600153865; cv=none; d=google.com; s=arc-20160816; b=gD59vdWykwm+o9fyU9cCgG3Y7mOq7e6x30RtaElPLlBl1/NlnW4VM5NCDwUSGeDu4N vPO+/gJnWr3hGWxZz2sqwVWn0hP08c9BiM/Oa8o33J7MKaUR5e/Z+mUkrjBL+uUIPyGi cmBWA8YVW6LdH1FC1bGT3QlwnHZjJC3DYszmrbEC7ME+13TxPCQrnNpVjggUkQy+p6bb +A5Eouj8HKs8JSmBTzTfQyr0rAhzyBFXuY82WxJdmt3H2qez8jJqJeFs9pcRL/Z8oWDI GsrskHgpyEO4/5PzM3ZWslQsEGAH7/gr+vURUJvu8T7Naan4buyu1ay62cVvUpkhTKoQ bsTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=sM54MfCrHmsK5GNgrOE3BXvEfqoy4H/2Ynyse4y/Cfs=; b=SPu83Y1p+cSwDQ5b2sGT08DrMSVUxAFLUZnqP1C5f/GbsBrLo3CgOcKM74CD0AOeVP Hj/mw7h7wo789GEph8EnqrcXkoh4j4TrOf6Pi3bPpP0sziKOwLz+h8HHDbX2VL5YG14Z j0Cs+8j0eJupnGSFLhFBYb/6fht7udLpQPn58J+vir3abih3hZV/Oe+MuRwBeiaiZCUh 9owA2Me7dbw92X0H+BJxRHH8zgXVCV/2Y0UJ51lgYihtVKXkd/aGNXXdj6d5mjrj1F/t Hxd3tzH7VrTJBptnDxnPbLTZ3d6r0VmaJOOjRPK4Zq/9k+XVUQY0jUrgqdNYulnHFdBa 1slg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n12si8992160eji.393.2020.09.15.00.10.42; Tue, 15 Sep 2020 00:11:05 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726161AbgIOHIe (ORCPT + 99 others); Tue, 15 Sep 2020 03:08:34 -0400 Received: from verein.lst.de ([213.95.11.211]:46699 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726073AbgIOHGO (ORCPT ); Tue, 15 Sep 2020 03:06:14 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 9B14E68AFE; Tue, 15 Sep 2020 09:05:22 +0200 (CEST) Date: Tue, 15 Sep 2020 09:05:22 +0200 From: Christoph Hellwig To: Mike Snitzer Cc: Christoph Hellwig , Jens Axboe , linux-block@vger.kernel.org, martin.petersen@oracle.com, Hans de Goede , Song Liu , Richard Weinberger , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org, Minchan Kim , dm-devel@redhat.com, linux-mtd@lists.infradead.org, linux-mm@kvack.org, drbd-dev@tron.linbit.com, cgroups@vger.kernel.org Subject: Re: [PATCH 06/14] block: lift setting the readahead size into the block layer Message-ID: <20200915070522.GA19974@lst.de> References: <20200726150333.305527-1-hch@lst.de> <20200726150333.305527-7-hch@lst.de> <20200826220737.GA25613@redhat.com> <20200902151144.GA1738@lst.de> <20200902162007.GB5513@redhat.com> <20200910092813.GA27229@lst.de> <20200910171541.GB21919@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200910171541.GB21919@redhat.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 10, 2020 at 01:15:41PM -0400, Mike Snitzer wrote: > > I'll move it to blk_register_queue, which should work just fine. > > That'll work for initial DM table load as part of DM device creation > (dm_setup_md_queue). But it won't account for DM table reloads that > might change underlying devices on a live DM device (done using > __bind). > > Both dm_setup_md_queue() and __bind() call dm_table_set_restrictions() > to set/update queue_limits. It feels like __bind() will need to call a > new block helper to set/update parts of queue_limits (e.g. ra_pages and > io_pages). > > Any chance you're open to factoring out that block function as an > exported symbol for use by blk_register_queue() and code like DM's > __bind()? I agree with the problem statement. OTOH adding an exported helper for two trivial assignments seems a little silly.. For now I'll just keep the open coded ->io_pages assignment in dm. Note that dm doesn't currently update the ->ra_pages value based on the underlying devices, so an incremental patch to do that might be useful as well.