Re: [PATCH 00/20] EXT4 encoding support

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

 



"Theodore Y. Ts'o" <tytso@xxxxxxx> writes:

> On Tue, Jul 03, 2018 at 01:06:40PM -0400, Gabriel Krisman Bertazi wrote:
>> Since not every NLS tables support normalization operations, we limit
>> which encodings can be used by an ext4 volume.  Right now, ascii and
>> utf8n are supported, utf8n being a new version of the utf8 charset, but
>> with normalization support using the SGI patches, which are part of this
>> patchset.
>
> Why do we need to have to distinguish between utf8n vs utf8?  Why
> can't we just add normalization to existing utf8 character set?  What
> would break?

The reason I made it separate charsets is that if we ever decide to
support normalization on filesystems that already implement some support
for uftf8 already (fat, for instance), we don't want to change the
behavior of existing disks, where strings wouldn't be normalized, since
that would be an ABI breakage.  By separating the non-normalized and
normalized version of the charset, we let the user decide, or at least
the superblock inform whether the disk wants normalization or not by
setting the right charset.

>
> Also, do we *have* to support only encodings that have normalization?
> It's pointless w/o case-folding support (which is not in this patch
> series), but what would happen if we supported case-folding w/o
> normalization?

We could fallback the normalization operation to the string identity,
which would allow us to support any charset available in NLS.  My
concern with that is if we someday add normalization to any other
charset, we'd breaking the compatibility of fs that had it, similarly to
the reason I implemented utf8n separately from utf8.  Also there is the
small issue of assigning magic numbers for the encodings in the
superblock, but this is easy to fix.

If, for some reason, this is not a problem in this case, I can change it
in the next iteration, to merge utf8n and utf8, and also allow other
charsets.

-- 
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