gmediaserver-devel
[Top][All Lists]
Advanced

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

Re: [gmediaserver-devel] File size limit


From: Jan Ceuleers
Subject: Re: [gmediaserver-devel] File size limit
Date: Wed, 04 Jul 2007 15:59:10 +0200
User-agent: Thunderbird 2.0.0.4 (Windows/20070604)

Wayne Stallwood wrote:
On Tue, 2007-07-03 at 20:20 +0200, Jan Ceuleers wrote:
However, if I strace the process, the stat64() call actually returns zero:

stat64("/home/storage/Test/Eragon-001.avi", {st_mode=S_IFREG|0644, st_size=2200526492, ...}) = 0

Maybe I am being a bit daft here but isn't stat64 actually returning an exit 
status of 0 there and a file size of 2200526492 bytes
Absolutely correct. But if you check the source code, you'll see that the piece of code that generates the error message is only executed if the stat() call returns a negative value.

So: the source code contains a stat() call; the library appears to translate that into a stat64() call which returns zero; the library then presumably does some more checking and finds that the file is too large to be supported by the stat() call so it returns a negative value instead.

I have since changed the stat() call into a stat64 call myself (along with the necessary changes in variable declarations). This then causes the subsequent open() call to fail. Unfortunately there does not seem to be a 64-bit equivalent of the open() call, so I'm stuck.

Subsequent to my message I also found out that the block size of the ext3 filesystem might be relevant. The block size is 4K, so I would not expect this to be the reason for the failure.

Thanks, Jan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]