Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4406970rdh; Tue, 28 Nov 2023 23:59:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEBvgCdCtau6Yz8NID9+4gn2gac6ZIxWrK5P1lnKcF0tYhF+Lg3qvBNsTX10zq8Mf9/OSkR X-Received: by 2002:a05:6a20:12c6:b0:18a:59fa:7da4 with SMTP id v6-20020a056a2012c600b0018a59fa7da4mr18339994pzg.29.1701244782775; Tue, 28 Nov 2023 23:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701244782; cv=none; d=google.com; s=arc-20160816; b=K13QNfQSoPVW1/tklgHvDdupZ/cFDo019gXtFriXxnPqhFfW/Q9HA3Sw8hchSOzUjF h/h8gUPuJjFBfEehp/WsF/zESvrlJ47V/i2WnNSJWMO7S+uZun1w7g+M1KK5cqQ1J89k gxxXmkmtWY88JnijrPtKHH+M59nWl2nsxzc+IgtG0/y/AfewY7toTA5VekJ7xX+ewFrS ioXpISHaHcU5USca0vhwx57sCS3tR62tvmMM4O7q6m36eYIInzL+ESBmii9mvrqBUhQQ L6ysnHzb5cGz35j1jjn/Qx6cazv9anqnywfduTJ7Hf9xd9wA/5pmlCkXGtVr03MackxK ZDqw== 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 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=bytedance.com Return-Path: Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id v19-20020a17090a899300b00283a148d836si829422pjn.27.2023.11.28.23.59.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Nov 2023 23:59:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; 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 2620:137:e000::3:1 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 39879805E116; Tue, 28 Nov 2023 23:59:39 -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 + 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 ); 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 ; Tue, 28 Nov 2023 23:59:29 -0800 (PST) Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1ce28faa92dso49890145ad.2 for ; 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 To: Chandan Babu R , "Darrick J. Wong" Cc: Dave Chinner , Allison Henderson , Zhang Tianci , Brian Foster , Ben Myers , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, xieyongji@bytedance.com, me@jcix.top, Jiachen Zhang 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: 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:39 -0800 (PST) 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(-) -- 2.20.1