lkml.org 
[lkml]   [2001]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: generic_file_llseek() broken?
> I _think_ there is a bug in generic_file_llseek(), with it returning -EINVAL
> instead of -EFBIG in the case where the offset is larger than the s_maxbytes.
> AFAICS, the return -EINVAL is for the case where "whence" is invalid, not the
> case where "offset" is too large for the underlying filesystem

My reading of the standards is:

[EFBIG] - File too large. You get this when trying to write. Not for a seek.
The size of a file would exceed the maximum file size
of an implementation or offset maximum established
in the corresponding file description.

[EOVERFLOW] - Value too large for data type. This can happen for a seek.
The resulting file offset would be a value which cannot be represented
correctly in an object of the given type.

[EINVAL] - Bad value for other reasons. This will happen for a seek to a
negative offset.

Andries
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:13    [W:0.066 / U:0.668 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site