From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 744EEC4332F for ; Fri, 10 Nov 2023 06:37:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=HDolRf0rSiUiekfE+3OAKfjZrdEB6y9yH5htnGx1qBU=; b=GLOpB5IUjpjVwa wpDIHnon4B7cwxo2aobUZiyebyKIFlK9cJS20Tn+1JqICIVIbtgBO34RJGhTzAJd9+dCSzJXFCEOI zla8/q+tJVN3APuiaYZrTGqf6o12v8oxSpv+JXh+WsmjWYseb0j61d8ZF8b0VkIxXIYnIAuvxDXiO eJGFZ1BTSkKszZ+EXywd/B5+t4uj94oJ6p0utEU85lFUk0Uiy1IOpRe5Ss2PnmQslcOwdID+fBgex RutKjQvd8LJanq4rxHk3FsLo8Dfz1ZiUGraLSXoUCSQaHko+6Ne9waptO7gZUAjtdA14JbJMRy0ZD vkp08H8ZZxrLmpK0AfVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r1L8N-007yZb-0q; Fri, 10 Nov 2023 06:36:51 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1r1L8J-007yZG-1y; Fri, 10 Nov 2023 06:36:47 +0000 Date: Thu, 9 Nov 2023 22:36:47 -0800 From: Christoph Hellwig To: ed.tsai@mediatek.com Cc: ming.lei@redhat.com, hch@lst.de, Jens Axboe , Matthias Brugger , AngeloGioacchino Del Regno , wsd_upstream@mediatek.com, chun-hung.wu@mediatek.com, casper.li@mediatek.com, will.shiu@mediatek.com, light.hsieh@mediatek.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: Re: [PATCH v2] block: limit the extract size to align queue limit Message-ID: References: <20231110051950.21972-1-ed.tsai@mediatek.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231110051950.21972-1-ed.tsai@mediatek.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 10, 2023 at 01:19:49PM +0800, ed.tsai@mediatek.com wrote: > + if (bdev && blk_queue_pci_p2pdma(bdev->bd_disk->queue)) > extraction_flags |= ITER_ALLOW_P2PDMA; As pointed out in reply to Ming, you really need to first figure out if we can assume we have a valid bdev or not, and if not pass all the relevant information separately. > + if (bdev && bio_op(bio) != REQ_OP_ZONE_APPEND) { > + unsigned int max = queue_max_bytes(bdev_get_queue(bdev)); The higher level code must not look at queue_max_bytes, that is only used for splitting and might not even be initialized. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel