Message ID | 20231129075832.73600-1-zhangjiachen.jaycee@bytedance.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a5a7:0:b0:403:3b70:6f57 with SMTP id d7csp184042vqn; Tue, 28 Nov 2023 23:59:38 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlzHZXWHBMdFT3jk8bBI6qsFK2AP9HFF623QV/+dJoPGOWAWq72dIACXVbMdhcVWi6T0mq X-Received: by 2002:a5b:54c:0:b0:da3:76c1:c779 with SMTP id r12-20020a5b054c000000b00da376c1c779mr17417546ybp.52.1701244778424; Tue, 28 Nov 2023 23:59:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701244778; cv=none; d=google.com; s=arc-20160816; b=luteUTshBM/dttuIA2Non1quhJ3NCn/gfHnKeA3jSlg7HkqlGfNFYmNwvS1Xnptd2n ATe8jecG5Gxwm+5PncYCfT9mFc/POlOJY5o71N9f87VOCfnGn1dbOuzDXrY6S0yas1Ez 7wU5NaQrUn8/gvhixtgdzUwkwmh5XyZyahgAlk24cRn6TTlS2hCM6QvYomurbmzn/B9F r0MXiSeIfsy78gnvc5TCOs6dm3J/ig/xJQL+dmIGvbYjVdVNYnmLm5n2NFS3I/ZIEr5W jkPtu6Z+5R8ZPjawGdmLnFdw/DqPVplgtT6nHSQIkeCMc9TLYiHqsrULH4jSovtCF+Rz gA1g== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=YauZ5nFY7F7io1hORv7LvgfYKOqlkddb830K39XSJwk=; fh=af6/g7Mw4PWw8c1/IQL1lMUyTpO0lxbaYh3SFBWn9U8=; b=zkGg/ak9cYYub2RFRITJXMbQNPHmd7Ge+RlFVisEIjHUCwfzgyB8a1ZQSdao/W3jre R77/ccFEJpKrTg7XvaRhfOOoyCOQh2UgXM3lAzh+ciVSfrunRpkUjRolwigl2fdZAwxD ZlmCHT8e1EUD9Zahr/dLdFUJBlMbsQg7K5i34i32AkEumtfAiUbyBdzP8L0LsR55dMeo Lj3xjvpG+KreKHM/6DTPO+Xk4eeP8XmZJzFHIB41oApafvpJLVsPAactf+gk8a2TLNg1 MYN9XUnJCu6HrKIb0pJ1hPc9OLaaY0GvKJ4jocczbput7jM7+akmk3IuHATB+7jSzMKl dh4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Ar6QsFEg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id 3-20020a631543000000b005b92a7d88e6si13716863pgv.823.2023.11.28.23.59.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 23:59:38 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=pass header.i=@bytedance.com header.s=google header.b=Ar6QsFEg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 61996805CADC; Tue, 28 Nov 2023 23:59:34 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229581AbjK2H7Z (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Wed, 29 Nov 2023 02:59:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229464AbjK2H7Y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 29 Nov 2023 02:59:24 -0500 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ACA2A1A5 for <linux-kernel@vger.kernel.org>; Tue, 28 Nov 2023 23:59:29 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1ce28faa92dso49890145ad.2 for <linux-kernel@vger.kernel.org>; Tue, 28 Nov 2023 23:59:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance.com; s=google; t=1701244769; x=1701849569; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=YauZ5nFY7F7io1hORv7LvgfYKOqlkddb830K39XSJwk=; b=Ar6QsFEgzh0w8kdputYDcWo2TnCJKb7Dcq9ZxbDvtO7xZC0g9ibnr7aW9PtIytmc3q oO4AIiYSlm8vjQCwj3sl1S4zvy9BXV3gdvauRBb4LxQXgPhD9AlXcvvBUV9M6b/GvFiy SIXPbxJ7sto4+cADBwFhy1EyP5Ssr6yU4e3aUhDzNr4g5gnEvOHL01CGKvB50awODAMn 9Io/qgmTSbVQfaG3RV8dn/quYReo7gbXvcr9ReRC24EiqgGL4BjPaXx2Wzhy8hqXsXKn KpJdLUbDLoJ+ay9JlbniY32tZtIeZEJGPVOZd/NQACCRJBn7h54/ZF3esan2yC2DHm48 fKig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701244769; x=1701849569; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=YauZ5nFY7F7io1hORv7LvgfYKOqlkddb830K39XSJwk=; b=HhDe4EoawFypKz0q/c3WkrPoABnOmfvc634y9MgNACbsPtBoLpILMRnEWJerAY6Hgk z3R87eOdMtM1LBEwkTbpPOn21+u8v5RL8Tw/kHMQ/caABZGTPEls7+A+mZZGNxF6l8F4 z8pHOU6LoJgdfml7YrgvmzNqXp4P4zBw4F17/tsg2llA+WybP0xhzFJpMTVjLK9V4pwT GkY1U9bAQAnaUb/9mTH7lwaYcMJ9ZxBiF94f8nLA52jBqeXyfHdTsrE1GSyuq7i2mN3f qTKquNESTwicrpgBqySfu6nzTQi1KujlevzBTlg75dEfOlhePfgIDkVQwDojNTm8US0G Gy3g== X-Gm-Message-State: AOJu0YyZ4UXMyGIX3cCWGA9KVLNtygyK90QcpgVylxBdY72Snxun3ybZ AjuTV+6yP5hZ7Um8bicnvyGMzw== X-Received: by 2002:a17:902:e744:b0:1cf:bd98:633b with SMTP id p4-20020a170902e74400b001cfbd98633bmr13147413plf.64.1701244769204; Tue, 28 Nov 2023 23:59:29 -0800 (PST) Received: from localhost.localdomain ([61.213.176.9]) by smtp.gmail.com with ESMTPSA id s17-20020a170902989100b001cfd0ddc5d3sm4979419plp.277.2023.11.28.23.59.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 23:59:28 -0800 (PST) From: Jiachen Zhang <zhangjiachen.jaycee@bytedance.com> To: Chandan Babu R <chandan.babu@oracle.com>, "Darrick J. Wong" <djwong@kernel.org> Cc: Dave Chinner <dchinner@redhat.com>, Allison Henderson <allison.henderson@oracle.com>, Zhang Tianci <zhangtianci.1997@bytedance.com>, Brian Foster <bfoster@redhat.com>, Ben Myers <bpm@sgi.com>, linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, xieyongji@bytedance.com, me@jcix.top, Jiachen Zhang <zhangjiachen.jaycee@bytedance.com> Subject: [PATCH v2 0/2] Fixes for ENOSPC xfs_remove Date: Wed, 29 Nov 2023 15:58:30 +0800 Message-Id: <20231129075832.73600-1-zhangjiachen.jaycee@bytedance.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Tue, 28 Nov 2023 23:59:34 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783884444764887376 X-GMAIL-MSGID: 1783884444764887376 |
Series |
Fixes for ENOSPC xfs_remove
|
|
Message
Jiachen Zhang
Nov. 29, 2023, 7:58 a.m. UTC
Hi, Recently, our use-case ran into 2 bugs in case doing xfs_remove when the disk space is in-pressure, which may cause xfs shutdown and kernel crash in the xfs log recovery procedure. Here are 2 patches to fix the problem. The 1st patch fixes an uninitialized variable issue. The 2nd patch ensures the blkno in the xfs_buf is updated when doing xfs_da3_swap_lastblock(). Compared with the V1 patchset, this V2 patchset - directly set the *logflagsp value to make the code more robust in the 1st commit, - check xfs's crc-feature rather than magic in the 2nd commit, and - fixed code style and rebased onto the master branch. Thanks, Jiachen Jiachen Zhang (1): xfs: ensure logflagsp is initialized in xfs_bmap_del_extent_real Zhang Tianci (1): xfs: update dir3 leaf block metadata after swap fs/xfs/libxfs/xfs_bmap.c | 26 ++++++++++++++------------ fs/xfs/libxfs/xfs_da_btree.c | 11 ++++++++++- 2 files changed, 24 insertions(+), 13 deletions(-)