Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2008038rwo; Sun, 23 Jul 2023 05:56:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlEqC+yZg64ZwDnUyISAE345tY9Uy/Sow/mLKdM0zIBfBR6zILuVHGHxHtFa+U6iu5VO1BPp X-Received: by 2002:aa7:d8d9:0:b0:51e:309:2e12 with SMTP id k25-20020aa7d8d9000000b0051e03092e12mr5560315eds.28.1690117015580; Sun, 23 Jul 2023 05:56:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690117015; cv=none; d=google.com; s=arc-20160816; b=KbSXRNhMTUeWE/kWZqH+AeYJuxBW4sN2dQjR3ySYtnmv3FEgXo3ACjuUmbQVWgMutR Y9owZ2Ry8t/bGm2LIBtfI26LOgCXTPJHUSUYQoajzIAGU9+PS4CUFXFHXFIGNuVAA7qC IZXUyGkHep5DXBR/qJKlij/Mnxe3mdZC9t0RTU534jPQQFVdJ0yk4x5RlKEZbghhIGwf j2+Vlcjv/d04FvEsG406FjfwoLCWSX91Rs0axzUjbJBXp9DRsoV7qdQLb1tE6vtYE5kg NomD8X1pSo7T4LnKtEYc0whwZGFFrWdT+nt4hRZ1reZqKcBqqq4oeSB75Pr42WPrdAqt gIqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=f8fJOKa5Ro/KTo0xGIv7OJI2g/dAB3fdmH+CiwAC2JU=; fh=Tc3iyYfsYxdMUx+xohngbl22DAxTkHWyQEeXjwi4g7A=; b=SicDimKVUrtRneZbKxvDVk3FK4QdghBKqkC9N5fuZPudVMuTzwrTSJZIS01o4pUTQx zxlTgVNaNarvUDBEffE8diOGeBIlacFRrIQDzGJpN54N9/FuHUSQa4w1ah3jAsFOdIHr 5lPzk8reCOpfXA9Gjf7HeBGqZbGPapLO2gjly+uBUdaYfFGBkkQy1EDyDI8sf2G3EnCN wm564vGOprMyIfaiu/lDN4vyKunpwKBBLz6dhqHImJqC6dY20ctJPTUfZO/7dQt00yhZ Rdj+RYZfMznvOUqI/CLlY0MIisxLOMCMc+e/l9bP/GLnvik+SVeqU3thpXjwbOezy8CQ Gm5g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mit.edu header.s=outgoing header.b=XNrTNTk8; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g5-20020aa7c585000000b0051d9a12291esi5084422edq.449.2023.07.23.05.56.23; Sun, 23 Jul 2023 05:56:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-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=@mit.edu header.s=outgoing header.b=XNrTNTk8; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=mit.edu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229623AbjGWMiM (ORCPT + 99 others); Sun, 23 Jul 2023 08:38:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjGWMiL (ORCPT ); Sun, 23 Jul 2023 08:38:11 -0400 Received: from outgoing.mit.edu (outgoing-auth-1.mit.edu [18.9.28.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B9CAC1AA for ; Sun, 23 Jul 2023 05:38:10 -0700 (PDT) Received: from cwcc.thunk.org (pool-173-48-116-181.bstnma.fios.verizon.net [173.48.116.181]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 36NCW71a012921 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 23 Jul 2023 08:32:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mit.edu; s=outgoing; t=1690115529; bh=f8fJOKa5Ro/KTo0xGIv7OJI2g/dAB3fdmH+CiwAC2JU=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type; b=XNrTNTk8wBPdKBf9wmt2tnUtBDKj4iu6UiYvx9fr+vvACCMnN02GZaERBLTmkTQdQ fW17KcNmnOp+TIb2UmYU/hj54/zQBJc+BemNHpVcKPb0FvgOWEsRMzsjxmIPShhZVk Y6+ZA7vgN3qr2ekBi4dvbz/CNZw7zoEkRZj99/1nEHHNSLqxOg4wbW4+noQsyDYfFp tQG24a7iU7u2ldNhRcGQEbsoeFq5oMOYetqDII1eP1plJb0xGIpsvN+XqMFC6CIDHo E6RkqPQDi/tcg5W52FWJf81qgzJpipPvrUI1Et4NIVuYcqT6/AhGJ4uu+XWK9PEKpi BD0GP/XT+rkWw== Received: by cwcc.thunk.org (Postfix, from userid 15806) id 7D94515C04D7; Sun, 23 Jul 2023 08:32:07 -0400 (EDT) From: "Theodore Ts'o" To: linux-ext4@vger.kernel.org, Ojaswin Mujoo Cc: "Theodore Ts'o" , Ritesh Harjani , linux-kernel@vger.kernel.org, Jan Kara , Naresh Kamboju Subject: Re: [PATCH 0/1] ext4: Fix regression in mballoc due to deleted inode PAs in rbtree Date: Sun, 23 Jul 2023 08:32:00 -0400 Message-Id: <169011551315.10885.4411764690665517539.b4-ty@mit.edu> X-Mailer: git-send-email 2.31.0 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit 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_NONE,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-ext4@vger.kernel.org On Sat, 22 Jul 2023 22:45:23 +0530, Ojaswin Mujoo wrote: > Recently there was a regression found in the mballoc [1] due the existence > of deleted preallocations(PAs) in the per inode preallocation rbtree. > Such deleted PAs can occur because ext4_mb_discard_group_preallocations > traverses the grp->bb_prealloc_list and marks the PAs as deleted without > taking any inode specific locks like i_data_sem. > > Due to presence of such PAs, we were sometimes missing some of the pa > entries when traversing the per node rbtree in ext4_mb_use_preallocated. > Due to this, in some rare conditions we ended up missing a PA that did > overlap with our original request start. when this happens, we exit > ext4_mb_use_preallocated and proceed with the allocation. However, > during ext4_mb_normalize_request() we were hitting a bug on as > a PA that could satisfy our request already existed. Since normalize > request was already fixed earlier to account for the deleted PAs we > actually able to catch it there. > > [...] Applied, thanks! [1/1] ext4: Fix rbtree traversal bug in ext4_mb_use_preallocated commit: 9d3de7ee192a6a253f475197fe4d2e2af10a731f Best regards, -- Theodore Ts'o