From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([65.50.211.133]:46777 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbdGLJQM (ORCPT ); Wed, 12 Jul 2017 05:16:12 -0400 Date: Wed, 12 Jul 2017 02:16:08 -0700 From: Christoph Hellwig To: Ming Lei Cc: Shaohua Li , linux-raid@vger.kernel.org, NeilBrown , linux-block@vger.kernel.org, Jens Axboe , Christoph Hellwig Subject: Re: [PATCH 2/2] md: raid1/raid10: initialize bvec table via bio_add_page() Message-ID: <20170712091608.GA27795@infradead.org> References: <20170712082912.491-1-ming.lei@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii In-Reply-To: <20170712082912.491-1-ming.lei@redhat.com> Sender: linux-block-owner@vger.kernel.org List-Id: linux-block@vger.kernel.org On Wed, Jul 12, 2017 at 04:29:12PM +0800, Ming Lei wrote: > We will support multipage bvec soon, so initialize bvec > table using the standardy way instead of writing the > talbe directly. Otherwise it won't work any more once > multipage bvec is enabled. It seems to me like these callsites also should use bio_init instead of bio_reset to get a clean slate (and eventually phase out bio_reset), which should probably got into the helper as well. E.g. instead of pretending to preserve things we should simply build a new bio here.