Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758856AbcDENTf (ORCPT ); Tue, 5 Apr 2016 09:19:35 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:33503 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752362AbcDENTe (ORCPT ); Tue, 5 Apr 2016 09:19:34 -0400 MIME-Version: 1.0 In-Reply-To: <20160405125630.GE11986@infradead.org> References: <1459858062-21075-1-git-send-email-tom.leiming@gmail.com> <1459858062-21075-12-git-send-email-tom.leiming@gmail.com> <20160405125630.GE11986@infradead.org> Date: Tue, 5 Apr 2016 21:19:32 +0800 Message-ID: Subject: Re: [PATCH 26/27] kernel/power/swap.c: use bio_get_base_vec() From: Ming Lei To: Christoph Hellwig Cc: Jens Axboe , Linux Kernel Mailing List , linux-block@vger.kernel.org, Boaz Harrosh , "Rafael J. Wysocki" , Len Brown , Pavel Machek , "open list:SUSPEND TO RAM" Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 706 Lines: 18 On Tue, Apr 5, 2016 at 8:56 PM, Christoph Hellwig wrote: > I really don't like all these bio_get_base_vec uses. The end_io > handlers generall want to iterate over all pages in the bio, with > a special case where all of them is the fixed number one. > > So What I think we'll need is a bio_for_each_page, and if there is > any good justification for it as special version of the single > page case. I thought about that too, and bio_get_base_vec() can be thought as the special version too, IMO. Actually it is just about the name of the helper, do you have a better name or other idea for such issue? There are about ten such usages, as found in this patchset. Thanks, Ming Lei