Post Reply 
newRPL: [UPDATED April 27-2017] Firmware for testing available for download
10-19-2016, 11:25 PM
Post: #423
RE: newRPL: [UPDATED September-17-16] Firmware for testing available for download
(10-19-2016 03:01 AM)Claudio L. Wrote:  Regarding the SFN fallback: I think if there's no room to create the entry, then file creation needs to fail and return an error (as-implemented). Creating a file with a name different from the requested one won't help the user find his file... not to mention that if there's no room for the directory entry the disk might be full. It's better to let the user know with an error, don't you think?
Running out of free directory entries to be allocated for a LFN does not necessarily mean that a file cannot be created nor that the case of the filename cannot be preserved.
The size of the directory table for the root directory on FAT12 and FAT16 partitions is fixed - if the file would be created in the root directory, the filesystem may still have plenty of free clusters, but still run out of directory entries. In fact, this is a rather common problem when using VFAT LFNs on FAT12 and FAT16 volumes, as the root directory allows for a maximum of 512 directory entries on many systems. (Of course, the problem does not exist in sub-directories.)
If there is no free directory entry for the LFN and the file's filename and extension are all-uppercase or all-lowercase, it is still possible to preserve the case via the "case"-bit method on systems supporting this extension - so, it's not that the case could not be stored (which should cause an error message), more that not all platforms will be able to retrieve this info later on (not sure, if this already warrants bailing out with an error message prophylactically).
In the other cases, there should be at least one cluster which could be used for the file - not much, but it may be sufficient for the file.
So, always bailing out with an error message as soon as there are no more free directory entries to be allocated for a LFN appears to be a bit premature to me - however, I totally agree, that the system should issue an error when there are no more directory entries for a LFN if the case of the given filename is mixed and therefore cannot be stored using the "case"-bit method (unless the system is in case-insensitive mode).

Greetings,

Matthias


--
"Programs are poems for computers."
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: newRPL: [UPDATED September-17-16] Firmware for testing available for download - matthiaspaul - 10-19-2016 11:25 PM



User(s) browsing this thread: 3 Guest(s)