From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A59472135B9 for ; Wed, 15 Jan 2025 06:27:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=213.95.11.211 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736922469; cv=none; b=sW1eRaFtJ4RNtB7coHb/7yL5qHcFcDcogjSsW+nPMX/1Mcg4RvUEmJFasZCo63qfYpxIOxLsxjwFKVOdE+EodeSkwnIhNanSgeCuyD+2NcZ3ndUSMVCrUpXiYAsL49niUyh1K7ncZxxNC4G6HD2zMurS3UwPDaC7MXtCxkSvCT8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736922469; c=relaxed/simple; bh=j2R4QF6QX6Xs9gB6kFKYzfdEOjAjpD4z8qgvJ/bocl8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=UbI7FAbyFTEAThTvYJUlZng94eMZcwvDiB0BQUoUhYMZ8qiWn0uyK6W4k+RneKgXAiIvozV7pKQU9MRDc0PfJG2CjiEmCunoA037SXDOAt59OieBfCiSqR43nwWrxLQXljhIxsKD4yPNdNHNrDRtb66fwHudplUbZfpwccTPnkQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de; spf=pass smtp.mailfrom=lst.de; arc=none smtp.client-ip=213.95.11.211 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lst.de Received: by verein.lst.de (Postfix, from userid 2407) id 0232968B05; Wed, 15 Jan 2025 07:27:43 +0100 (CET) Date: Wed, 15 Jan 2025 07:27:43 +0100 From: Christoph Hellwig To: "Darrick J. Wong" Cc: Christoph Hellwig , Carlos Maiolino , linux-xfs@vger.kernel.org, xfs-stable , stable@vger.kernel.org, david.flynn@oracle.com Subject: Re: [PATCH] xfs: fix online repair probing when CONFIG_XFS_ONLINE_REPAIR=n Message-ID: <20250115062743.GA29997@lst.de> References: <20250114224819.GD2103004@frogsfrogsfrogs> <20250115060615.GA29387@lst.de> <20250115062037.GF3557553@frogsfrogsfrogs> Precedence: bulk X-Mailing-List: xfs-stable@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250115062037.GF3557553@frogsfrogsfrogs> User-Agent: Mutt/1.5.17 (2007-11-01) On Tue, Jan 14, 2025 at 10:20:37PM -0800, Darrick J. Wong wrote: > Good point, we could cut it off right then and there. Though this seems > a little gross: > > if (xchk_could_repair(sc)) > #ifdef CONFIG_XFS_ONLINE_REPAIR > sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; > #else > return -EOPNOTSUPP; > #endif > return 0; > > but I don't mind. Some day the stubs will go away, fingers crossed. We'll I'd write it as: if (xchk_could_repair(sc)) { if (!IS_ENABLED(CONFIG_XFS_ONLINE_REPAIR)) return -EOPNOTSUPP; sc->sm->sm_flags |= XFS_SCRUB_OFLAG_CORRUPT; } but I'm fine with either version: Reviewed-by: Christoph Hellwig