From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753189AbcFFFD0 (ORCPT ); Mon, 6 Jun 2016 01:03:26 -0400 Received: from mail-yw0-f182.google.com ([209.85.161.182]:34667 "EHLO mail-yw0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752563AbcFFFDX (ORCPT ); Mon, 6 Jun 2016 01:03:23 -0400 MIME-Version: 1.0 In-Reply-To: <575195CD.6090607@kernel.dk> References: <2f0f6811938dafd14c6c7b1dbe8fbabfdcbb19c1.1464346333.git.baolin.wang@linaro.org> <575195CD.6090607@kernel.dk> From: Baolin Wang Date: Mon, 6 Jun 2016 13:03:22 +0800 Message-ID: Subject: Re: [RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio To: Jens Axboe Cc: Alasdair G Kergon , Mike Snitzer , "open list:DEVICE-MAPPER (LVM)" , Herbert Xu , David Miller , Eric Biggers , Joonsoo Kim , tadeusz.struk@intel.com, smueller@chronox.de, Masanari Iida , Shaohua Li , Dan Williams , "Martin K. Petersen" , Sagi Grimberg , Kent Overstreet , Keith Busch , Tejun Heo , Ming Lei , Mark Brown , Arnd Bergmann , linux-crypto@vger.kernel.org, linux-block@vger.kernel.org, "open list:SOFTWARE RAID (Multiple Disks) SUPPORT" , LKML Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 3 June 2016 at 22:35, Jens Axboe wrote: > On 05/27/2016 05:11 AM, Baolin Wang wrote: >> >> In dm-crypt, it need to map one bio to scatterlist for improving the >> hardware engine encryption efficiency. Thus this patch introduces the >> blk_bio_map_sg() function to map one bio with scatterlists. >> >> For avoiding the duplicated code in __blk_bios_map_sg() function, add >> one parameter to distinguish bio map or request map. > > > Just detach the bio in blk_bio_map_sg() instead of adding a separate case > (and argument) for it in __blk_bios_map_sg(). Make sense. > > -- > Jens Axboe > -- Baolin.wang Best Regards