Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753981AbcCMEUv (ORCPT ); Sat, 12 Mar 2016 23:20:51 -0500 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34677 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751535AbcCMEUo (ORCPT ); Sat, 12 Mar 2016 23:20:44 -0500 Subject: Re: [PATCH] block: don't optimize for non-cloned bio in bio_get_last_bvec() To: Ming Lei , linux-kernel@vger.kernel.org References: <1457794579-6125-1-git-send-email-ming.lei@canonical.com> <56E4E575.5020303@kernel.dk> Cc: linux-block@vger.kernel.org, Christoph Hellwig , Sagi Grimberg , Kent Overstreet , stable@vger.kernel.org From: Jens Axboe Message-ID: <56E4EA98.7090304@kernel.dk> Date: Sat, 12 Mar 2016 21:20:40 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56E4E575.5020303@kernel.dk> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 681 Lines: 17 On 03/12/2016 08:58 PM, Jens Axboe wrote: > On 03/12/2016 07:56 AM, Ming Lei wrote: >> For !BIO_CLONED bio, we can use .bi_vcnt safely, but it >> doesn't mean we can just simply return .bi_io_vec[.bi_vcnt - 1] >> because the start postion may have been moved in the middle of >> the bvec, such as splitting in the middle of bvec. > > Added and tested. And Ming, let's not get a repeat of this situation. For critical fixes, it has to be spot on for post -rc1, especially for code that is notoriously difficult to get right. Fixes are obviously fine, but it has to be just enough to fix the regression, no more. This has been too lax, I expect this to improve. -- Jens Axboe