From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1C1D2C43334 for ; Thu, 7 Jul 2022 20:16:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236478AbiGGUQ1 (ORCPT ); Thu, 7 Jul 2022 16:16:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236411AbiGGUQ1 (ORCPT ); Thu, 7 Jul 2022 16:16:27 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B8B6205E4 for ; Thu, 7 Jul 2022 13:16:26 -0700 (PDT) Received: from localhost (mtl.collabora.ca [66.171.169.34]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: krisman) by madras.collabora.co.uk (Postfix) with ESMTPSA id D94C866019C8; Thu, 7 Jul 2022 21:16:24 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1657224985; bh=9KVTq+598AWBgquU3L+2OS2TTSqIfcRAlrdcoQsFS3I=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=U0fXOFvuKxaTP/F6v9VQI31fch3r5atUGYsGMk8a7ynNCAx/6KHqBcUVmY6XXefIj IBZNTdxcTfa8HFuX7iYa3tbvaRMCwkX/WvhfyUji+za9ZG6C7CekBYRjnCiVc6LYSD lhvPAm4dm/piyeYwO+/ylWXzmVZmBT9P7fG73mNHXrvtv+vrKqddoXblhp2Dnroxmb 5aseBIiGM8i9F6c9adZc0VDfHu5BN5IbO17ftuNwsGmv4JeTZ4id/QVwUUGyr3uQ9X F6o2Yzbo9g+dL5YqFmrktdGGV7bOL+Brgel7BfHv1bfTcUKXn28s922zQ1ooH1N7Q0 KlnhJZX/V/OMA== From: Gabriel Krisman Bertazi To: Eric Biggers Cc: Slava Bacherikov , tytso@mit.edu, linux-ext4@vger.kernel.org Subject: Re: [PATCH v2] tune2fs: allow disabling casefold feature Organization: Collabora References: <20220707190456.64972-1-slava@bacher09.org> Date: Thu, 07 Jul 2022 16:16:21 -0400 In-Reply-To: (Eric Biggers's message of "Thu, 7 Jul 2022 19:50:53 +0000") Message-ID: <87tu7s3ch6.fsf@collabora.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org Eric Biggers writes: > On Thu, Jul 07, 2022 at 10:04:56PM +0300, Slava Bacherikov wrote: >> + if (FEATURE_OFF(E2P_FEATURE_INCOMPAT, EXT4_FEATURE_INCOMPAT_CASEFOLD)) { >> + if (mount_flags & EXT2_MF_MOUNTED) { >> + fputs(_("The casefold feature may only be disabled when " >> + "the filesystem is unmounted.\n"), stderr); >> + return 1; >> + } >> + if (has_casefold_inode(fs)) { >> + fputs(_("The casefold feature couldn't be disabled when " >> + "there are inodes with +F flag.\n"), stderr); >> + return 1; >> + } >> + enabling_casefold = 0; > > Likewise, "couldn't" => "can't". > > Also, what are the semantics of disabling casefold, exactly? Do the encoding > and encoding flags fields in the superblock also get cleared? The kernel is able to ignore the non-zero encoding field if the feature is not set, but we definitely don't want to rely on that. The patch should explicitly zero both s_encoding and s_encoding_flags. -- Gabriel Krisman Bertazi