Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936987AbdCJMeS (ORCPT ); Fri, 10 Mar 2017 07:34:18 -0500 Received: from mail-io0-f172.google.com ([209.85.223.172]:36075 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935306AbdCJMeO (ORCPT ); Fri, 10 Mar 2017 07:34:14 -0500 MIME-Version: 1.0 In-Reply-To: <87varhg14d.fsf@notabene.neil.brown.name> References: <87h93blz6g.fsf@notabene.neil.brown.name> <71562c2c-97f4-9a0a-32ec-30e0702ca575@profitbricks.com> <87lgsjj9w8.fsf@notabene.neil.brown.name> <87r328j00i.fsf@notabene.neil.brown.name> <87d1dphhuy.fsf@notabene.neil.brown.name> <58be6551-4aa7-72ee-1616-a1545606d029@kernel.dk> <87varhg14d.fsf@notabene.neil.brown.name> From: Lars Ellenberg Date: Fri, 10 Mar 2017 13:34:06 +0100 Message-ID: Subject: Re: [PATCH v2] blk: improve order of bio handling in generic_make_request() To: NeilBrown Cc: Jens Axboe , Jack Wang , LKML , Kent Overstreet , Pavel Machek , Mike Snitzer , Mikulas Patocka , linux-raid@vger.kernel.org, device-mapper development , linux-block@vger.kernel.org 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: 1057 Lines: 28 > --- a/block/blk-core.c > +++ b/block/blk-core.c > @@ -1975,7 +1975,14 @@ generic_make_request_checks(struct bio *bio) > */ > blk_qc_t generic_make_request(struct bio *bio) > { > - struct bio_list bio_list_on_stack; > + /* > + * bio_list_on_stack[0] contains bios submitted by the current > + * make_request_fn. > + * bio_list_on_stack[1] contains bios that were submitted before > + * the current make_request_fn, but that haven't been processed > + * yet. > + */ > + struct bio_list bio_list_on_stack[2]; > blk_qc_t ret = BLK_QC_T_NONE; May I suggest that, if you intend to assign something that is not a plain &(struct bio_list), but a &(struct bio_list[2]), you change the task member so it is renamed (current->bio_list vs current->bio_lists, plural, is what I did last year). Or you will break external modules, silently, and horribly (or, rather, they won't notice, but break the kernel). Examples of such modules would be DRBD, ZFS, quite possibly others. Thanks, Lars