Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp3880229pxm; Tue, 1 Mar 2022 07:11:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJwxdxZLeCAhvE5oh+TaeQ7eht+Fa3O8apZYxGS/AhHvN8ugrmoonDEqC1JpRCDsOheAnaqH X-Received: by 2002:a50:9d47:0:b0:40f:9d3d:97b6 with SMTP id j7-20020a509d47000000b0040f9d3d97b6mr25482220edk.392.1646147474251; Tue, 01 Mar 2022 07:11:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646147474; cv=none; d=google.com; s=arc-20160816; b=LifY+NH//WrG9LH1DCCMm6rt0iUv5KVCnArVJyGHBDYUH3j++jqGrmYAkegxxfnxO/ o6WseB7wsT0SeSjsQTnJJ2RP06u9ZUCC8Mj74nz85y6O5dqPwskPnUhwImTOLXJ57lT5 2Sp8lnVCMOzlsWW5V9SIO+sXSf2d+bfOO14cS5wYLmtzIXRlJXhajakSrVnp+UDGZxLs NJkUEWV9/NivKXemtt6Fn9vsfVc2c9UjsiJe8ovSDBfKmSr4qYjyOrILASG9cBTLKkxG Zdv1rJMyKcanQi3I3sMFIa13V3RCNnPE1/s8kHrMuxjrM9c6IdIioa7dlEaH5aGVeN/e gtpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:mail-followup-to:reply-to:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=igSUBiGP75gcwuKKcw5IrELkytjlsx5b26P1/uxLTDI=; b=NjZhsllVIKnDLFrZ5UqEDiF6UBGe9UBIr6ZLfSALwoQ+9vi5CcZERjAb69ilm0smyZ ChjvXh4O9H1zQ064eywE4tlHFMGytUUM+NKVvpuRI1RadweVNH8gstji6xRZ168ol4Ia 2dk+VvKo7jPxqqJn2uQscfOapTFjDuKYkuOB41OsWFtcKHeaXf3uQN+b4AahieYW1QXs OfCaOdgVWFJmxdx5MdIIveFpWGypjQQsTNdN8aqWWBd9pq1Y8LFokmxiO6mbTvSGT0zZ Ewgyg/+jL1DGfy31xMCYKhYKxgFRTQBSVhiS6sS3jJSZ2Lefl3gadQPLsp3+pkVAASrQ wshA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=m4Ghdnjs; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=AS2kmChY; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jz23-20020a170906bb1700b006d6b1424862si4095587ejb.709.2022.03.01.07.10.49; Tue, 01 Mar 2022 07:11:14 -0800 (PST) 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=@suse.cz header.s=susede2_rsa header.b=m4Ghdnjs; dkim=neutral (no key) header.i=@suse.cz header.s=susede2_ed25519 header.b=AS2kmChY; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235248AbiCAO0p (ORCPT + 99 others); Tue, 1 Mar 2022 09:26:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231732AbiCAO0o (ORCPT ); Tue, 1 Mar 2022 09:26:44 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEC5A6E4C9; Tue, 1 Mar 2022 06:26:02 -0800 (PST) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id A216C2110B; Tue, 1 Mar 2022 14:26:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1646144761; h=from:from:reply-to:reply-to: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=igSUBiGP75gcwuKKcw5IrELkytjlsx5b26P1/uxLTDI=; b=m4GhdnjslealexAP/oRzJR1pak++pQpgQY4kGvEzjaC3YgUl6DX+wndyUWZb7LLrMlUDUL bDXGGES3NylgjPmmsF6g4hclkisVsizYxF7LUGh4WuoXDGkJOvlIsbr9g2ywdN4oZ/N8I5 Egd3FZTeVFhYl7SEjKJmrYj0gjJMsmc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1646144761; h=from:from:reply-to:reply-to: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=igSUBiGP75gcwuKKcw5IrELkytjlsx5b26P1/uxLTDI=; b=AS2kmChYl/LTYbL9BGHDEoAKkBtbDX0SK3ZHu2HGLBKbGwSLvwAIOHJkcZ711kpgGAIw50 0JidFyRYjfU/SpDg== Received: from ds.suse.cz (ds.suse.cz [10.100.12.205]) by relay2.suse.de (Postfix) with ESMTP id 600F3A3B81; Tue, 1 Mar 2022 14:26:01 +0000 (UTC) Received: by ds.suse.cz (Postfix, from userid 10065) id E36AEDA80E; Tue, 1 Mar 2022 15:22:09 +0100 (CET) Date: Tue, 1 Mar 2022 15:22:09 +0100 From: David Sterba To: Christoph Hellwig Cc: Jens Axboe , Coly Li , Mike Snitzer , Song Liu , "Martin K. Petersen" , Josef Bacik , David Sterba , Phillip Lougher , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: Re: [PATCH 1/5] btrfs: simplify ->flush_bio handling Message-ID: <20220301142209.GN12643@suse.cz> Reply-To: dsterba@suse.cz Mail-Followup-To: dsterba@suse.cz, Christoph Hellwig , Jens Axboe , Coly Li , Mike Snitzer , Song Liu , "Martin K. Petersen" , Josef Bacik , David Sterba , Phillip Lougher , linux-block@vger.kernel.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-bcache@vger.kernel.org, linux-raid@vger.kernel.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org References: <20220301084552.880256-1-hch@lst.de> <20220301084552.880256-2-hch@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220301084552.880256-2-hch@lst.de> User-Agent: Mutt/1.5.23.1-rc1 (2014-03-12) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, Mar 01, 2022 at 10:45:48AM +0200, Christoph Hellwig wrote: > @@ -6962,16 +6961,6 @@ struct btrfs_device *btrfs_alloc_device(struct btrfs_fs_info *fs_info, > if (!dev) > return ERR_PTR(-ENOMEM); > > - /* > - * Preallocate a bio that's always going to be used for flushing device > - * barriers and matches the device lifespan > - */ > - dev->flush_bio = bio_kmalloc(GFP_KERNEL, 0); > - if (!dev->flush_bio) { > - kfree(dev); > - return ERR_PTR(-ENOMEM); > - } > - > INIT_LIST_HEAD(&dev->dev_list); > INIT_LIST_HEAD(&dev->dev_alloc_list); > INIT_LIST_HEAD(&dev->post_commit_list); > diff --git a/fs/btrfs/volumes.h b/fs/btrfs/volumes.h > index 005c9e2a491a1..9af7b6211920c 100644 > --- a/fs/btrfs/volumes.h > +++ b/fs/btrfs/volumes.h > @@ -117,7 +117,7 @@ struct btrfs_device { > u64 commit_bytes_used; > > /* for sending down flush barriers */ > - struct bio *flush_bio; Please add this comment to the struct member declaration: /* Bio used for flushing device barriers */ > + struct bio flush_bio; Otherwise Reviewed-by: David Sterba Thanks.