From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Snitzer Subject: Re: [PATCH 1/4] dm: remove nr_iovecs parameter from alloc_tio() Date: Fri, 3 Oct 2014 16:01:30 -0400 Message-ID: <20141003200129.GA13982@redhat.com> References: <542E8CF9.6000609@ce.jp.nec.com> <542E8EA4.2010704@ce.jp.nec.com> Reply-To: device-mapper development Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <542E8EA4.2010704@ce.jp.nec.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com To: Junichi Nomura Cc: Jens Axboe , device-mapper development , Kent Overstreet List-Id: dm-devel.ids On Fri, Oct 03 2014 at 7:55am -0400, Junichi Nomura wrote: > alloc_tio() allocates a bio for clone. It takes the number of > bvecs to allocate for the clone-bio. > However, with the introduction of bio_clone_fast() in v3.14, > we no longer need to allocate bvecs and nr_iovecs is always 0. > > __clone_and_map_simple_bio() looks like passing non-zero > nr_iovecs, but its value is always within the range of > inline bvecs and no allocation actually happens. > If allocation happened, BUG_ON() in __bio_clone_fast() would > trigger. > > This patch removes the nr_iovecs parameter from alloc_tio() > to prevent possible future mis-use of the interface. > > Signed-off-by: Jun'ichi Nomura I picked this patch up and staged in linux-dm.git's for-next, see: https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=8d59090cdc0ea91ffc390f78d0406baf8f66ae38