Details regarding Bug #1383

Chris Johns chrisj at rtems.org
Thu Mar 5 21:29:06 UTC 2009


Santosh vattam wrote:
> 
> I am a newbie to RTEMS and I was going through the bug list when I
> came across Bug # 1383. It says that "filesystem off_t is limited to
> 32bits". Its been told there that the bug is open and assigned to Joel
> Sherill. Can I get more information about this bug? Its mentioned in
> the bug report that the file in question may be machine/types.h but I
> am not able to locate the file. Can I get a litlle help with this?
> Thanks in advance
> 

The bug report deals with RTEMS internals only not the external interface. 
That is a separate issue.

I have updated the bug to show what I have found since filing the PR.

I found newlib defines '_off64_t'. What needs to be decided is the type for 
RTEMS's internal use so the file system handlers and similar interfaces can be 
changed to 64bit. Once the internal interfaces have changed the required 
external interface can be changed or added.

For the external interface I found various solutions to this problem in other 
operating systems. MacOS and Darwin have off_t as a 64bit value so they do not 
have a different type or interface while Linux has lseek64. There is also 
llseek in places. I understand this is being looked within newlib so we may 
wait for the results of that.

A search of the SUS only returned off_t and lseek while loff_t, off64_t, 
lseek64 and llseek where not found. The nature of off_t is not detailed. I 
suppose the external interface is a standards view, ie Darwin, verses a 
compatibility one. I have hacked a local copy of RTEMS to internally support 
64bit offsets so the dosfsck tool could be ported. I am using it on a 4.3G 
disk and so the 32bit offset failed.

Please note this change only effects the file size you can seek not the size 
of the supported media. The libblock layers use blocks as an unsigned 32bit 
number. For a DOSFS disk with a block size of 512bytes you can have a disk of 
size (2^32) x 512. For dosfsck the direct block device interface is used and 
seeking to the end of the disk is a test performed.

Regards
Chris




More information about the users mailing list