Messages in this thread |  | | From | Andries.Brouwer@cwi ... | Date | Thu, 15 Nov 2001 00:55:58 GMT | Subject | Re: 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/
|  |