[haiku-bugs] Re: [Haiku] #6285: Implement posix_fallocate()

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Fri, 15 Oct 2010 19:22:22 -0000

#6285: Implement posix_fallocate()
---------------------------+------------------------------------------------
  Reporter:  korli         |         Owner:  nobody   
      Type:  enhancement   |        Status:  new      
  Priority:  low           |     Milestone:  R1       
 Component:  System/POSIX  |       Version:  R1/alpha2
Resolution:                |      Keywords:           
Blocked By:                |   Has a Patch:  0        
  Platform:  All           |      Blocking:           
---------------------------+------------------------------------------------

Comment (by bonefish):

 Replying to [comment:7 axeld]:
 > It's filed under realtime extensions, so I guess it's purpose is not
 only to ensure there is enough space left (you can always at least check
 if there is enough space, and you could always just enlarge the file
 before writing it if you actually know its size beforehand), but also to
 make sure there is no time wasted making space for it (to be able to
 guarantee a certain drive throughput).

 I'm certain that the intended main purpose of the function is realtime use
 -- i.e. allocate now, don't wait later -- but still the function is
 supposed to do the allocation. If the underlying file system doesn't
 implement it, I think the function should fail, since it can neither be
 guaranteed that a later write will not fail due to lack of space, nor that
 the expected realtime behavior will ensue.

 It certainly wouldn't harm to check how that works on other POSIX
 platforms (Linux, *BSD). It might not be easy to find a file system
 implementation that cannot implement this feature -- maybe some network
 file system.

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/6285#comment:8>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: