Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758452AbcDEM4f (ORCPT ); Tue, 5 Apr 2016 08:56:35 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51039 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751085AbcDEM4d (ORCPT ); Tue, 5 Apr 2016 08:56:33 -0400 Date: Tue, 5 Apr 2016 05:56:30 -0700 From: Christoph Hellwig To: Ming Lei Cc: Jens Axboe , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , "Rafael J. Wysocki" , Len Brown , Pavel Machek , "open list:SUSPEND TO RAM" Subject: Re: [PATCH 26/27] kernel/power/swap.c: use bio_get_base_vec() Message-ID: <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> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1459858062-21075-12-git-send-email-tom.leiming@gmail.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 331 Lines: 7 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.