Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752428AbaANEGs (ORCPT ); Mon, 13 Jan 2014 23:06:48 -0500 Received: from aserp1040.oracle.com ([141.146.126.69]:36997 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678AbaANEGo (ORCPT ); Mon, 13 Jan 2014 23:06:44 -0500 To: Kent Overstreet Cc: Hugh Dickins , Jens Axboe , Shaohua Li , Andrew Morton , "Martin K. Petersen" , linux-kernel@vger.kernel.org Subject: Re: next bio iters break discard? From: "Martin K. Petersen" Organization: Oracle Corporation References: <20140114023346.GN9037@kmo> Date: Mon, 13 Jan 2014 23:06:33 -0500 In-Reply-To: <20140114023346.GN9037@kmo> (Kent Overstreet's message of "Mon, 13 Jan 2014 18:33:46 -0800") Message-ID: User-Agent: Gnus/5.130005 (Ma Gnus v0.5) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Source-IP: ucsinet22.oracle.com [156.151.31.94] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Kent" == Kent Overstreet writes: Kent, Kent> I think for discards we can deal with this easily enough - Kent> __blk_recalc_rq_segments() will have to special case them - but Kent> there's a similar (but worse) issue with WRITE_SAME, and looking Kent> at the code it does attempt to merge WRITE_SAME requests too. DISCARD bios have no payload going down the stack. They get a payload attached in the sd driver and will therefore have a single bvec at completion time. WRITE_SAME bios have a single bvec payload throughout their lifetime. For both these types of requests we never attempt to merge the actual payloads. But the block range worked on may shrink or grow as the bio is split or merged going down the stack. IOW, DISCARD, WRITE SAME and the impending COPY requests do not have a 1:1 mapping between the block range worked on and the size of any bvecs attached. Your recent changes must have changed the way we handled that in the past. I'll take a look tomorrow... -- Martin K. Petersen Oracle Linux Engineering -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/