Re: [PATCH v2] tune2fs: allow disabling casefold feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Eric Biggers <ebiggers@xxxxxxxxxx> 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



[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux