public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: adilger@turbolabs.com, linux-fsdevel@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: generic_file_llseek() broken?
Date: Thu, 15 Nov 2001 00:55:58 GMT	[thread overview]
Message-ID: <UTC200111150055.AAA93544.aeb@cwi.nl> (raw)

> 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

             reply	other threads:[~2001-11-15  0:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-15  0:55 Andries.Brouwer [this message]
2001-11-15  9:02 ` generic_file_llseek() broken? Andreas Dilger
2001-11-15  9:55   ` Trond Myklebust
  -- strict thread matches above, loose matches on Subject: below --
2001-11-14 23:51 Andreas Dilger
2001-11-15  0:08 ` Alan Cox
2001-11-15  0:46   ` Andreas Dilger
2001-11-15  1:47 ` David Gomez
2001-11-15  5:24   ` Andreas Dilger
     [not found]     ` <3BF38CFB.21998301@idb.hist.no>
2001-11-15 21:09       ` Andreas Dilger
2001-11-15 22:02         ` Alan Cox

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=UTC200111150055.AAA93544.aeb@cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=adilger@turbolabs.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox