Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp1285600rwo; Wed, 2 Aug 2023 11:26:48 -0700 (PDT) X-Google-Smtp-Source: APBJJlHV6POCFZD1IhckLmRVEgnoi0vmasE3l6zEqHr05jtj0uMe+JC9b6kBHtREbnuunpH9OqpX X-Received: by 2002:a19:4f44:0:b0:4fb:96f3:2f4 with SMTP id a4-20020a194f44000000b004fb96f302f4mr4839201lfk.51.1691000807634; Wed, 02 Aug 2023 11:26:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691000807; cv=none; d=google.com; s=arc-20160816; b=0SBqyj9aQP+poBsSDrW0V3+e2KmCY38pJecwQPB07QV3ANuFg7UDx1DqV7YYGjnOQt OMx/LQfo2SIzcYEynjcqOM++vQFWQfoU5E93PpS05YXt2wGG0Zaswx8Ili1BlL+uClse uG95+UkjiAdj/1KGHIeFViR1d7BUi9/tdYOpWQxp1AkSMyIhHH3BIM0MIkQ/WhnCDAV8 eJRsZh+AoO9qNQ+Qtf4xaeO09HOdwT/7YGIKPWKppDpL60AvuFR9zZjXXPkjimp11VY9 Gad8cLzYzbEjwt5B26SmA59CtrcYI8P263LUwYj3GexcU2LM3uHI/EF50gtILsoDbuHa BU3A== 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:dkim-signature:date; bh=pZgu6VYBtVmDJxB8/yQqdmC5ll//zvqWRVFeO9x8huE=; fh=7gvr3PZTJbYwX2F35Hck8vHqEy0l6XwJAyI4KbTuj8I=; b=mzeARET2AJaCmGTzUz0NTI4kbKmVRy+4nKRML0b6XlmJmaSTbYptRA4Zd5tVXt9j1t WFI7BW6pcbilh01pJVS7TN9iNajzgVackgLUGWN72+3e5/Nm0eY9cEydwHpiNvBkD97u zHvim1qy7aeF+D1JXhLNYzfjGNxag5qwpExYRJofrf0IkgCGq5TtMNReg62W0xsk3lUF KnGOPHd/FU5ClzD/ACFg3fY0hJNbSDzSMQD9nAE8SPr7VsT0A4HkpzZVTKSEYps5Xb/c NwBO54gG9iihExoBiJJRcLV2U3+djcHP64b/JQAGMs5EaMWEaKZIbO14L+y3ZrBUYAJ7 j4Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=fce+OLsE; 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=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r1-20020a056402034100b005224d26ab13si10783613edw.378.2023.08.02.11.26.22; Wed, 02 Aug 2023 11:26:47 -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=@linux.dev header.s=key1 header.b=fce+OLsE; 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=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbjHBQoq (ORCPT + 99 others); Wed, 2 Aug 2023 12:44:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229923AbjHBQoo (ORCPT ); Wed, 2 Aug 2023 12:44:44 -0400 Received: from out-114.mta1.migadu.com (out-114.mta1.migadu.com [95.215.58.114]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C19D19F for ; Wed, 2 Aug 2023 09:44:43 -0700 (PDT) Date: Wed, 2 Aug 2023 12:44:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1690994681; 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=pZgu6VYBtVmDJxB8/yQqdmC5ll//zvqWRVFeO9x8huE=; b=fce+OLsEemL82w3gvvoTSKcithaQm7VhHQwGW1Rlpuf7kw3knwpOdgJ+tuUuunjiijUxHa 5N6DI50igXJhCvKGa5fTTo9x5aho5jo0/fXftHomHmeD0u0LvDU2NigvOpU2xEFPcGEWQ5 lZzSqKR+IqsPHWoPCg0YnnvAh13JbEc= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Christoph Hellwig Cc: linux-bcachefs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Jens Axboe , linux-block@vger.kernel.org Subject: Re: [PATCH 05/20] block: Allow bio_iov_iter_get_pages() with bio->bi_bdev unset Message-ID: <20230802164437.jskidimw32dofxpi@moria.home.lan> References: <20230712211115.2174650-1-kent.overstreet@linux.dev> <20230712211115.2174650-6-kent.overstreet@linux.dev> <20230725024312.alq7df33ckede2gb@moria.home.lan> <20230801190450.3lbr2hjdi7t52anx@moria.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Wed, Aug 02, 2023 at 04:47:18AM -0700, Christoph Hellwig wrote: > On Tue, Aug 01, 2023 at 03:04:50PM -0400, Kent Overstreet wrote: > > > Because blk-cgroup not only works at the lowest level in the stack, > > > but also for stackable block devices. It's not a design decision I > > > particularly agree with, but it's been there forever. > > > > You're setting the association only to the highest block device in the > > stack - how on earth is it supposed to work with anything lower? > > Hey, ask the cgroup folks as they come up with it. I'm not going to > defend the logic here. > > > And looking at bio_associate_blkg(), this code looks completely broken. > > It's checking bio->bi_blkg, but that's just been set to NULL in > > bio_init(). > > It's checking bi_blkg because it can also be called from bio_set_dev. So bio_set_dev() has subtly different behaviour than passing the block device to bio_init()? That's just broken. > > > And this is your code, so I think you need to go over this again. > > It's "my code" in the sene of that I did one big round of unwinding > the even bigger mess that was there. There is another few rounds needed > for the code to vaguely make sense. Well, I'll watch for those patches then...