All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Shishkin <edward.shishkin@gmail.com>
To: Michael Raskin <7c6f434c@mail.ru>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [BUG] fallocate behavior when crossing end-of-file
Date: Wed, 06 May 2009 17:36:14 +0200	[thread overview]
Message-ID: <4A01AE6E.1050400@gmail.com> (raw)
In-Reply-To: <4A01A8C4.20205@mail.ru>

Michael Raskin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Edward Shishkin wrote:
>   
>>> Desired: something (probably, one block) is allocated/reserved for the
>>> file. File length is set to 1 byte.
>>>       
>>              
>> Where is it documented?
>>
>> IMHO we should only guarantee that writes
>> to [0, 1] won't fail because of lack of disk space.
>> Other things (including file size) are up to implementation.
>>     
>
> POSIX, SUS.
>
> http://www.opengroup.org/onlinepubs/009695399/functions/posix_fallocate.html
>
> <<<
> If the offset+ len is beyond the current file size, then
> posix_fallocate() shall adjust the file size to offset+ len. Otherwise,
> the file size shall not be changed.
>   

fallocate (2) is something different from posix_fallocate:

"...This default behavior closely resembles the behavior
of the posix_fallocate(3) library function, and is intended
as a method of optimally implementing that function."

  reply	other threads:[~2009-05-06 15:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-06 13:03 [BUG] fallocate behavior when crossing end-of-file Raskin Michael
2009-05-06 14:59 ` Edward Shishkin
2009-05-06 15:10   ` Chris Mason
2009-05-06 15:12   ` Michael Raskin
2009-05-06 15:36     ` Edward Shishkin [this message]
2009-05-06 21:07       ` Michael Raskin

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=4A01AE6E.1050400@gmail.com \
    --to=edward.shishkin@gmail.com \
    --cc=7c6f434c@mail.ru \
    --cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.