[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87tvp4z868.fsf@collabora.co.uk>
Date: Thu, 12 Jul 2018 13:16:15 -0400
From: Gabriel Krisman Bertazi <krisman@...labora.co.uk>
To: "Theodore Y. Ts'o" <tytso@....edu>
Cc: linux-ext4@...r.kernel.org, darrick.wong@...cle.com,
kernel@...labora.com
Subject: Re: [PATCH 00/20] EXT4 encoding support
"Theodore Y. Ts'o" <tytso@....edu> 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
Powered by blists - more mailing lists