From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 177A8EEA8 for ; Thu, 28 May 2026 05:31:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.196 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779946296; cv=none; b=kWrtyL/I2agHxvJIOAreVFYQ3bTKsxj0gbbfXw0nxQ8JX72gFaIUb5+tO7UUfKYhH3VgWAqK7I1ogh4SfEC2xVecLYy1XHJYRVI9EsSSP7I2WOAEJBpgyPHCwwqXYLzYcZL3RE4EhyIoIeRrtx8bc/74gAjrhrWiSIGTWCO0UZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779946296; c=relaxed/simple; bh=4BnOYYTb7T97RMTGXTcfR2Md0+TeHYXB4VU6gbyex0I=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Blm5zluuH9mhEcBGPdZPKjyp7QYHL6C9rvOk+pysti+2Ti3M64FeIXSv2H/mx01mS8d1CpMxKmtmMQuqH/YM+uRhY4jeetMnnLjR8pt5tqhw0iJmJcqFk9JZav870YRXwloxu4ZuTuY+o0u50VTtIdRGtuBMOx/NemGRb64FQJk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=jultqHbB; arc=none smtp.client-ip=209.85.214.196 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="jultqHbB" Received: by mail-pl1-f196.google.com with SMTP id d9443c01a7336-2bf008a99d4so5516145ad.2 for ; Wed, 27 May 2026 22:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779946294; x=1780551094; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fFLT2sWkrj/RA6HeZzNRNeQFBEPLyGDvfOL2SeEC/uE=; b=jultqHbB+7fk9zDG9hPzFpt1aBRYNAD6e8BIUoi4gOso10uBHwKTTl6UJAMIHMt6uJ E1yaqggzh7v11NqJK33PKscyo44vVA/QCTk/x54rcAHE7Gl2QxC3vYkc5YQrW1rscJ8a 2/U5EuiYXElm1139265B8bIbqX8l0uX0e7a33N72fAEAfRswSbeiAZ634WOKp7xq40zT bkdYyMcR0MRU27yAODvn9dgu7u266zjpT35IkyiiNURC+4mpS/gbPiW8r9QZvv8htGB5 U2IZ7QtwtCgwUq1Aq/tMyfIoAMPzHiLt+l+7Rw/wZu26q6veBSmLim34cX2lwcrO2ll6 IFyg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779946294; x=1780551094; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fFLT2sWkrj/RA6HeZzNRNeQFBEPLyGDvfOL2SeEC/uE=; b=sATkYm9QDgrZ7XhCbUjbRhsxMLIXlqNJYAuO6WUZF85bKQ7oMB1OV68zTBxPAooO0X AQpmXaqVJDBj1G4CO0Iw1PuVyojanhVMnQbNzRiAUdhBe8mnbEneNBjAgLzaNH2T/feb P8pN08hDgIy4b2SOE4Mla9ARM/KFDNgQiKPpVajiXI3Jpe/5cvv0KsKx7/GFXI/3WEEq iInjGkSDjNV2ScjqfhMrUY5kvoefCf5h/6r7TwYmGHp/iQGcEOc/yQjRxdnCOGz5L3/N 2R3c8cgkorj0YKhhZOio+IDfuEtyNzaoj6/wjf0RNI7G7V6zwmDLdQM9KfNF/uwm9VQS XAxQ== X-Forwarded-Encrypted: i=1; AFNElJ8HQ5g/3t+fZXLBEFFG5ehuMitG/m8CcOMRZYLHcPYqgTlXahDR8TCJPpBG5wckAj29dlibdvHiaJiqsTk=@vger.kernel.org X-Gm-Message-State: AOJu0YzThTiw+hBUqlW2d4uLh7JdKzbcldBCfbAxmPA+NS3OqTGBWkJb q1Z8UpQbbP19Nh6grv+A0EJvdZ4yGy1G6+5OUxqHZVFU25uzcMt6bjrv X-Gm-Gg: Acq92OFSuk21XNLKGtcSG63vmo7FcB8TavUJ/OJnr1z0moKzP4t1+UdyzLlo8fhRt3I +zwuhuGhHMM78kod2GyI044jzaUnIEc9cxcfVY3uwino0g3NAf5OE1ZE/VlyFSxuPl8m1DY82NN aVCw765l+cgLUe9g3dCsjgf8NG3hIiT+lHJKk7rDf/R40KHuRGK/zPeaWtLugiWj+9Bcc2owezv riIcT6SEXPSzp+2VnR+7PTrIG3YTcFHz/TyKUrLPB4xMPv2dDFYh1SW3rfx0gL7DcrePbXOx6kp OrycD3uiGZGl40rYXvLZpeEDQY9SuCha/Zl71E2UlztMyLeTJTLdUyrXHWvMkbZ1kSmx62mNRQ7 HeLlmJoFKGeV4Ywr7DOXXzlTXzgXx1tl9DdIkVtr5JJt87NkCwG9J0j1AtmmOVBFd8GYc+6qR8R 4q0x5eFDDGWiDOPbPjHkC1h60q28U6HMJyWvH1pT0KaA== X-Received: by 2002:a17:903:240e:b0:2bd:907:2cf0 with SMTP id d9443c01a7336-2beb0632925mr287109895ad.32.1779946294313; Wed, 27 May 2026 22:31:34 -0700 (PDT) Received: from localhost ([111.228.63.84]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2beb5695a75sm217440825ad.14.2026.05.27.22.31.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 May 2026 22:31:33 -0700 (PDT) From: Zhang Cen To: Christoph Hellwig Cc: Carlos Maiolino , linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Zhang Cen , zerocling0077@gmail.com, 2045gemini@gmail.com Subject: Re: [PATCH] xfs: drain inodegc before quota teardown on mount failure Date: Thu, 28 May 2026 13:31:28 +0800 Message-Id: <20260528053128.3036120-1-rollkingzzc@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Christoph, Sorry, I missed this reply earlier and only noticed it now from the public archive. > How did you run into this? Normal xfstests under a new sanitizer? This was not from normal xfstests. I reproduced it in a KASAN-enabled QEMU guest with a disposable quota-enabled XFS image, then forced a late mount failure after quota setup while tracing the inodegc and quota teardown path. The failing ordering was: xfs_qm_mount_quotas() late mount failure xfs_qm_unmount_quotas() xfs_qm_unmount() / xfs_qm_destroy_quotainfo() xfs_inodegc_flush() with inodegc still able to reach the dqattach/dqget side during the teardown window. > This looks good. Thanks. > This is later in the teardown order than where I'd expect it. The > first thing that can bring in quotainodes is xfs_qm_newmount. I'd > expect a new label placed above out_rtunmount to handle this. Is > there a reason I'm missing why this won't work? No, I don't think you are missing anything. A separate label above out_rtunmount is the cleaner place for this. I'll send a v2 that keeps the out_agresv inodegc drain before xfs_qm_unmount_quotas(), adds an out_qm_unmount label above out_rtunmount, and routes the later post-quota failure paths through that label. I'll also fix the trailer spacing in v2. Thanks, Zhang