Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31718590rwd; Fri, 7 Jul 2023 03:31:39 -0700 (PDT) X-Google-Smtp-Source: APBJJlF8yN5S7NCom8r6NRQgn+4+E9xrcH9Z8mvrNo1NUjB7+pNWtlG+bIcDEhss9FiEo3Ws1TQx X-Received: by 2002:a17:903:41c2:b0:1b2:676d:1143 with SMTP id u2-20020a17090341c200b001b2676d1143mr7986344ple.15.1688725899044; Fri, 07 Jul 2023 03:31:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688725899; cv=none; d=google.com; s=arc-20160816; b=xXfJLXjpZcU9dHGXv25/MWpyEwo5VzTPu+Wr91A4bkmBCbXte10jyL310M6GHedO4a AphfjBTXvvSPbL6faGypETbV0dLFMjauIfl6wDNSzI1yt8MqMWSh2SeXkuw1xUy9Wmr5 Kd2HLGHfprjVuLDs+GztGrQK5s+s0twqFAL+RS4B+esrdfh+Jl5SlhDY8FG7KPYcUCFr fRbV6GsCoISy6vMt1F20ZpfaIgNuebeab72rFO2iKo3eIKad/ySCg3SA1vwF2/XfMI9Q 1Lx6SNbBvxslM21ZFgM0gGqlZO0xloRtVQ9wSbP9W84uCHn92WSr6qC+oHWE33U//Mag nJfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WSvxmo86chuNdo4OZEtSWD076Vkrebseittknh73kpQ=; fh=qemClKi9ScRH/sIvEJRZbCqEeVdy97ZcvKfXWv7qKec=; b=Tenu5dSmLQfa39/qsxyMS0cFodWfQaghlkiBHaDd2vBLcvEMU2uQCHuiUUDEDaKgng AkU6v9jQlp+6+dHKidS2lVM9hw3PDytqodDgB8hAfmP8DmaQKL6oEDSKIyAjCB224JF7 htOggNbKD4sTgKCruCqRRGftEfPK363/wyBBWO2ZUi/ZqN9VXKrLh9RUTsxijkMQ+NLy GPW06E2zvJK5OqKe37DPuVy9IAwWC7u1bM1roJm2l09OWAYtEWguxIUXKczeD9qzTvHt KumlM98MK5JDX/ztxjOWfFSMQzSFGZ0pdYw1+WmA5f4RWd+AVIYRIA4uxL2xVerxej9c DVew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T5UYkQlb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id kv14-20020a17090328ce00b001b8867a7ce2si3171846plb.273.2023.07.07.03.31.21; Fri, 07 Jul 2023 03:31:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=T5UYkQlb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229963AbjGGKHk (ORCPT + 99 others); Fri, 7 Jul 2023 06:07:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230445AbjGGKHi (ORCPT ); Fri, 7 Jul 2023 06:07:38 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B2FF2107 for ; Fri, 7 Jul 2023 03:06:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1688724409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WSvxmo86chuNdo4OZEtSWD076Vkrebseittknh73kpQ=; b=T5UYkQlbFICooyKOPVzLDRMafeoMn/g4z7wsW6SqVeD54uv1lxUQjJPUh4oxKOafq8bx+F tRQlCOxgX68P5lgTI7ZyiHJ9dqcJxE0l/lKuCANP3hKsBzLdSDqFbF9lJ59eizHmwvLhcO rnuLodQJJbQyUz8VFeF1/FcWuFno4jo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-618-Rg4ImdXwM9ei7Tx08fjlXg-1; Fri, 07 Jul 2023 06:06:41 -0400 X-MC-Unique: Rg4ImdXwM9ei7Tx08fjlXg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id F3C5D185A791; Fri, 7 Jul 2023 10:06:40 +0000 (UTC) Received: from ovpn-8-34.pek2.redhat.com (ovpn-8-18.pek2.redhat.com [10.72.8.18]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5ED40200BA8B; Fri, 7 Jul 2023 10:06:35 +0000 (UTC) Date: Fri, 7 Jul 2023 18:06:30 +0800 From: Ming Lei To: chengming.zhou@linux.dev Cc: axboe@kernel.dk, hch@lst.de, tj@kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, zhouchengming@bytedance.com Subject: Re: [PATCH v3 4/4] blk-flush: reuse rq queuelist in flush state machine Message-ID: References: <20230707093722.1338589-1-chengming.zhou@linux.dev> <20230707093722.1338589-5-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230707093722.1338589-5-chengming.zhou@linux.dev> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 07, 2023 at 05:37:22PM +0800, chengming.zhou@linux.dev wrote: > From: Chengming Zhou > > Since we don't need to maintain inflight flush_data requests list > anymore, we can reuse rq->queuelist for flush pending list. > > Note in mq_flush_data_end_io(), we need to re-initialize rq->queuelist > before reusing it in the state machine when end, since the rq->rq_next > also reuse it, may have corrupted rq->queuelist by the driver. > > This patch decrease the size of struct request by 16 bytes. > > Signed-off-by: Chengming Zhou > Reviewed-by: Christoph Hellwig > --- > v3: > - fix a bug report of blktests nvme/012, we need to re-initialize > rq->queuelist before reusing it in the state machine when end. > Because rq->rq_next reuse may have corrupted it. Thanks Ming Lei. Reviewed-by: Ming Lei Thanks, Ming