From: Baolin Wang Subject: Re: [RFC v2 1/3] block: Introduce blk_bio_map_sg() to map one bio Date: Mon, 6 Jun 2016 13:03:22 +0800 Message-ID: References: <2f0f6811938dafd14c6c7b1dbe8fbabfdcbb19c1.1464346333.git.baolin.wang@linaro.org> <575195CD.6090607@kernel.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 Return-path: In-Reply-To: <575195CD.6090607@kernel.dk> Sender: linux-raid-owner@vger.kernel.org List-Id: linux-crypto.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