From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752115AbcBOHBk (ORCPT ); Mon, 15 Feb 2016 02:01:40 -0500 Received: from mail-pf0-f194.google.com ([209.85.192.194]:34943 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751868AbcBOHBi (ORCPT ); Mon, 15 Feb 2016 02:01:38 -0500 From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Sagi Grimberg Subject: [PATCH 0/4] block: fix bio_will_gap() Date: Mon, 15 Feb 2016 15:01:23 +0800 Message-Id: <1455519687-23873-1-git-send-email-ming.lei@canonical.com> X-Mailer: git-send-email 1.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, After bio splitting is introduced, the splitted bio can be fast-cloned, which is correct because biovecs has become immutable since v3.13. Unfortunately bio_will_gap() isn't ready for this kind of change, because it figures out the last bvec via 'bi_io_vec[prev->bi_vcnt - 1]' directly. It is observed that lots of BIOs are merges even the virt boundary limit is violated, and the issue is reported from Sagi Grimberg. This patchset try to fix the issue by introducing two helpers for getting the first and last bvec of one bio by the bio iterator helpers. block/blk-merge.c | 8 ++------ include/linux/bio.h | 20 ++++++++++++++++++++ include/linux/blkdev.h | 11 ++++++++--- 3 files changed, 30 insertions(+), 9 deletions(-) Thanks, Ming