Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6033161rwb; Mon, 14 Nov 2022 13:12:47 -0800 (PST) X-Google-Smtp-Source: AA0mqf6iHN7vHh023YtoAn1fxTbnD+a5WzNj9LY6rk1xtwHCvHgB4bwAUFBHTdilgBkKks6SVuTY X-Received: by 2002:aa7:ca50:0:b0:461:9d22:348d with SMTP id j16-20020aa7ca50000000b004619d22348dmr12153214edt.76.1668460367640; Mon, 14 Nov 2022 13:12:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668460367; cv=none; d=google.com; s=arc-20160816; b=fEagjmDnh8l95VYjtSSlyr2ahGtG4Ti2c433u9jlN8sIoia7isq2EnwKcNq/Yv3ZfC mAE6w/ZwwpD9yLT4/Li+5ELZoMI/QTFq8IntoEauUFE0I33qqIaYRuLY/Fugbq8FYzZn eC03gmLiuYZZNV1QvwWnIusSpJ2+nvbBMMFfOvY/4FsEeQYIGhnQH2e/CLzr7rJJ8Mpn 2gb4r0rl4FGbbfFao7cjA63gImzqs3jWzqvSNPyr0z5tr3hlC8O9AWXeyRwJKUFq/TnC +G0h8yYnpRt7ljJoszu0d6DImHb2A8xBzVu1JSEjXcq5A3eUSxbs8v2V7J8AL/Ikq+oK 2cEg== 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:reply-to:message-id:subject:cc:to:from:date :dkim-signature:dkim-signature; bh=Ar7Rs3mu749aifR7unXFY0zzj5m0E6hzLhuJrw5TDzo=; b=kq+IaRlTsbaxDA1lvZ7S+5SCrlJVA6M5taF/vg6M7IjRowmW6zRActyPunFkbMM8Ku N3d4PGTMpspqSUyOabBhqOgQt69zSRMmSgAkFq/grDMbAU1FnEh+CD17YpC8Cdl3CMn/ 3onQnSE9xNxYYG8qXGQ/eG5sO8ZgCHHLMvi0fz20Ldgbpw2XqN0Auv5z1Dl/vMh0cn09 mEov2H/qWykCDopy83IVUKyHG/zK11nQsR+5cyawsCEDcKOeg7Q1vK68CilyTcJ9EAkd QWzOeNbbxK+nulu0bSq8zbPpinoRLpGl5VDOxKvI6P9WCpeFwWnzBAlj4Y2CqXyNPt1O VP6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.cz header.s=susede2_rsa header.b=ptpItOUT; dkim=neutral (no key) header.i=@suse.cz header.b=zAJ0y9uF; 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 i23-20020a50fc17000000b00463ba265d95si7931452edr.392.2022.11.14.13.12.26; Mon, 14 Nov 2022 13:12:47 -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=ptpItOUT; dkim=neutral (no key) header.i=@suse.cz header.b=zAJ0y9uF; 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 S236787AbiKNUzg (ORCPT + 88 others); Mon, 14 Nov 2022 15:55:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37362 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236456AbiKNUze (ORCPT ); Mon, 14 Nov 2022 15:55:34 -0500 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65CD4BC99; Mon, 14 Nov 2022 12:55:33 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 1FF7C202D4; Mon, 14 Nov 2022 20:55:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1668459332; 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=Ar7Rs3mu749aifR7unXFY0zzj5m0E6hzLhuJrw5TDzo=; b=ptpItOUTEWyg9J3CK+83l4zGo3iQpR+/VmY4ax4Hajn0nzWwKDW3JOXCFnfYO0e7fa3q42 lJUjAJH3OrOtgu0I9N7zQuBBpju+mrV+XXOPvbQIbCwyuY+2joJdDikSNuCkLm7E94ZXov 3Y3qvybuUTdO9erXrMYewBO1eHa9dmo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1668459332; 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=Ar7Rs3mu749aifR7unXFY0zzj5m0E6hzLhuJrw5TDzo=; b=zAJ0y9uFTKMO2P6RfUVjHQtF5vmn9qGSAF6RXWzozOgQxIilsBZwhrw9MvFDOrUXjzIDhH 1Ek7AGfa8MB2zIDQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id E659313A92; Mon, 14 Nov 2022 20:55:31 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id idVIN0OrcmPSPgAAMHmgww (envelope-from ); Mon, 14 Nov 2022 20:55:31 +0000 Date: Mon, 14 Nov 2022 21:55:06 +0100 From: David Sterba To: Li zeming Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com, linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] btrfs: volumes: Increase bioc pointer check Message-ID: <20221114205506.GC5824@twin.jikos.cz> Reply-To: dsterba@suse.cz References: <20221026013611.2900-1-zeming@nfschina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221026013611.2900-1-zeming@nfschina.com> 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 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, Oct 26, 2022 at 09:36:11AM +0800, Li zeming wrote: > The __GFP_NOFAIL flag will cause memory to be allocated an infinite > number of times until the allocation is successful, but it is best to > use it only for very necessary code, and try not to use it. > > The alloc_btrfs_io_context function looks a little closer to normal > (excuse my analysis), but I think we can remove __GFP_NOFAIL from it and > add a bioc pointer allocation check that returns NULL if the allocation > fails. > > Signed-off-by: Li zeming I've reworded the subject and changelog and patch is now in misc-next, thanks.