From: "Brüns, Stefan" <Stefan.Bruens@rwth-aachen.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] fs/fat: Optimizes memory size with single global variable instead of 3
Date: Fri, 9 Sep 2016 16:34:40 +0000 [thread overview]
Message-ID: <1665374.aYEjcpluY2@sbruens-linux> (raw)
In-Reply-To: <CA+sos7_9FVhL-FFpUj-ygznFW8C-S9D9z-_vyR+hX5_eFTZ_Rg@mail.gmail.com>
On Sonntag, 14. August 2016 00:57:38 CEST Beno?t Th?baudeau wrote:
> Hi,
>
> On Tue, Aug 2, 2016 at 9:35 PM, Beno?t Th?baudeau
>
> <benoit.thebaudeau.dev@gmail.com> wrote:
> > On Tue, Aug 2, 2016 at 8:53 PM, Stephen Warren <swarren@wwwdotorg.org>
wrote:
> >> On 07/28/2016 12:11 AM, Tien Fong Chee wrote:
> >>> Single 64KB get_contents_vfatname_block global variable would be used
> >>> for
> >>> all FAT implementation instead of allocating additional two global
> >>> variables
> >>> which are get_denfromdir_block and do_fat_read_at_block. This
> >>> implementation
> >>> can help in saving up 128KB memory space.
> >>
> >> The series,
> >>
> >> Tested-by: Stephen Warren <swarren@nvidia.com>
> >> (via DFU's FAT reading/writing on various Tegra; likely primarily FAT
> >> rather than VFAT though)
> >>
> >> Reviewed-by: Stephen Warren <swarren@nvidia.com>
> >
> > I suspect that reading a filename with VFAT entries crossing a cluster
> > boundary in a FAT32 root directory will be broken by this series. I do
> > not have time to test this and other corner cases right now though,
> > but it will be possible in the next few weeks.
>
> I have tested VFAT long filenames with the current implementation on
> Sandbox. It's completely broken:
> - There is a length limit somewhere between 111 and 120 characters,
> instead of 256 characters. Beyond this limit, the files are invisible
> with ls.
That one is expected. U-Boot limits the extended name to 9 "slots", each 26
bytes. As filenames are encoded as UTF-16/UCS-2, each ASCII character uses two
bytes -> 9 * 26 / 2 = 117.
> - Some filenames are truncated or mixed up between files. I have
> tested 111-character random filenames for 1000 empty files in the root
> directory. Most filenames had the expected length, but a few were
> shorter or longer.
Where there any filenames with characters outside the ASCII range? There may
have been some double en-/decoding of UTF-8 vs UTF-16.
Kind regards,
Stefan
next prev parent reply other threads:[~2016-09-09 16:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-28 6:11 [U-Boot] [PATCH 2/2] fs/fat: Optimizes memory size with single global variable instead of 3 Tien Fong Chee
2016-08-02 18:53 ` Stephen Warren
2016-08-02 19:35 ` Benoît Thébaudeau
2016-08-13 22:57 ` Benoît Thébaudeau
2016-08-15 16:08 ` Stephen Warren
2016-08-17 15:04 ` Tom Rini
2016-08-17 15:54 ` Stephen Warren
2016-09-09 16:34 ` Brüns, Stefan [this message]
2016-09-09 21:54 ` Benoît Thébaudeau
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1665374.aYEjcpluY2@sbruens-linux \
--to=stefan.bruens@rwth-aachen.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox