From patchwork Tue Jun 11 14:27:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Henriques X-Patchwork-Id: 1946367 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=UeAZo699; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=ozlabs.org (client-ip=2404:9400:2221:ea00::3; helo=mail.ozlabs.org; envelope-from=srs0=kdpz=nn=vger.kernel.org=linux-ext4+bounces-2851-patchwork-incoming=ozlabs.org@ozlabs.org; receiver=patchwork.ozlabs.org) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Vz9xN3HVpz20Tk for ; Wed, 12 Jun 2024 00:27:36 +1000 (AEST) Received: from mail.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by gandalf.ozlabs.org (Postfix) with ESMTP id 4Vz9xD45KQz4wb0 for ; Wed, 12 Jun 2024 00:27:28 +1000 (AEST) Received: by gandalf.ozlabs.org (Postfix) id 4Vz9xD42SPz4wcp; Wed, 12 Jun 2024 00:27:28 +1000 (AEST) Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: gandalf.ozlabs.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: gandalf.ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=UeAZo699; dkim-atps=neutral Authentication-Results: gandalf.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=147.75.199.223; helo=ny.mirrors.kernel.org; envelope-from=linux-ext4+bounces-2851-patchwork-incoming=ozlabs.org@vger.kernel.org; receiver=ozlabs.org) Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org [147.75.199.223]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by gandalf.ozlabs.org (Postfix) with ESMTPS id 4Vz9xB2sCDz4wb0 for ; Wed, 12 Jun 2024 00:27:26 +1000 (AEST) Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id A6A331C2240B for ; Tue, 11 Jun 2024 14:27:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF70F17D899; Tue, 11 Jun 2024 14:27:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="UeAZo699" X-Original-To: linux-ext4@vger.kernel.org Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 6CE1317CA17 for ; Tue, 11 Jun 2024 14:27:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718116043; cv=none; b=qlhQQ9OdroFB45A1rXUVZHN6wB55lWNjxqzJMdVk/4Phq15hvD3nTLR5gXs8KEIewd54Vrv9ObOr4NMMC4W1CLP3+hyw+EHT3YYKPCCA2tJjIDyrvq6mLprHyYkrghWCNSrImmpqhm/15ZgrhMiyfnLdPWIxMJ1YW2g1ZERLNz4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718116043; c=relaxed/simple; bh=xQyi8x7XM6VeovpVDfhOGm0eR1PhSRVEsz1IpofzP0c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Dh67vpQ+pYgcKU13ch9aJk+1+LrSCr0vn06WMKkVuROi7IThv+jrGiGkwcApYYOQit0uEsEcYarhZE4fA2JAkvZUtV8uCxtNezbmDXS2dJcpaSBOCOEi/Ki09SU1BVL+JQjDwncYAvsVnNt58yKAZ75KDlP+I3MGvdDNbeQwm+w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=UeAZo699; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: luis.henriques@linux.dev DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1718116039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=If8+HtHtn91wWn82XIuz1y8GVldm8f6n22eLx1qHatI=; b=UeAZo699GIqXenoAEMN01idW+vVoNeOCBpy3q0ogFUis0LdaOeYI4cBLBK/+G4w0j9J9Z8 GkOgqvvzZztKbZIcMGQFwHGxZrqbhd6mKKNyLHtEKrXD+/vZx5WvR4qMfPoVzLd33hJTxR fCkuzWEuGm8fFZsjBo6H1RCAf+Mh+hA= X-Envelope-To: tytso@mit.edu X-Envelope-To: adilger@dilger.ca X-Envelope-To: linux-ext4@vger.kernel.org X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: "Luis Henriques (SUSE)" To: Theodore Ts'o , Andreas Dilger Cc: linux-ext4@vger.kernel.org, "Luis Henriques (SUSE)" Subject: [PATCH 1/2] e2fsck: don't skip checks if the orphan file is present in the filesystem Date: Tue, 11 Jun 2024 15:27:03 +0100 Message-ID: <20240611142704.14307-2-luis.henriques@linux.dev> In-Reply-To: <20240611142704.14307-1-luis.henriques@linux.dev> References: <20240611142704.14307-1-luis.henriques@linux.dev> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT If the filesystem supports the orphan file feature and that file is present then don't skip the filesystem checks as that file may need to be cleaned up. Signed-off-by: Luis Henriques (SUSE) --- e2fsck/unix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/e2fsck/unix.c b/e2fsck/unix.c index de20b216dde0..7768f0ed7c4e 100644 --- a/e2fsck/unix.c +++ b/e2fsck/unix.c @@ -371,6 +371,10 @@ static void check_if_skip(e2fsck_t ctx) if (ctx->options & E2F_OPT_JOURNAL_ONLY) goto skip; + if (ext2fs_has_feature_orphan_file(fs->super) && + ext2fs_has_feature_orphan_present(fs->super)) + return; + lastcheck = ext2fs_get_tstamp(sb, s_lastcheck); if (lastcheck > ctx->now) lastcheck -= ctx->time_fudge;