From mboxrd@z Thu Jan 1 00:00:00 1970 From: Coly Li Subject: Re: [PATCH 03/13] bcache: inherit the optimal I/O size Date: Tue, 22 Sep 2020 17:39:24 +0800 Message-ID: <5ce140e1-a6c1-42d7-7d10-c3eb9b2785df@suse.de> References: <20200921080734.452759-1-hch@lst.de> <20200921080734.452759-4-hch@lst.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20200921080734.452759-4-hch@lst.de> Content-Language: en-US To: Christoph Hellwig , Jens Axboe Cc: Song Liu , Hans de Goede , Richard Weinberger , Minchan Kim , Johannes Thumshirn , Justin Sanders , linux-mtd@lists.infradead.org, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-bcache@vger.kernel.org, linux-kernel@vger.kernel.org, drbd-dev@lists.linbit.com, linux-raid@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, cgroups@vger.kernel.org List-Id: dm-devel.ids On 2020/9/21 16:07, Christoph Hellwig wrote: > Inherit the optimal I/O size setting just like the readahead window, > as any reason to do larger I/O does not apply to just readahead. > > Signed-off-by: Christoph Hellwig Acked-by: Coly Li Thanks. Coly Li > --- > drivers/md/bcache/super.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c > index 1bbdc410ee3c51..48113005ed86ad 100644 > --- a/drivers/md/bcache/super.c > +++ b/drivers/md/bcache/super.c > @@ -1430,6 +1430,8 @@ static int cached_dev_init(struct cached_dev *dc, unsigned int block_size) > dc->disk.disk->queue->backing_dev_info->ra_pages = > max(dc->disk.disk->queue->backing_dev_info->ra_pages, > q->backing_dev_info->ra_pages); > + blk_queue_io_opt(dc->disk.disk->queue, > + max(queue_io_opt(dc->disk.disk->queue), queue_io_opt(q))); > > atomic_set(&dc->io_errors, 0); > dc->io_disable = false; >