[haiku-development] Re: Filesystem API documentation

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sat, 14 Jul 2007 18:15:15 +0200 CEST

"Niels Reedijk" <niels.reedijk@xxxxxxxxx> wrote:
> I have updated the filesystem API documentation Ingo started to
> reflect the latest version. I've added as much information as I 
> could,

Thanks!

> Other points:
> - Are there any other changes coming up? I remember Axel and Ingo
> agreeing on changing the fs_cookie, fs_vnode and fs_volume typedefs 
> to
> something that did not hide they were 'void *' objects.

Exactly, I plan to remove all those types; they have very little value 
(especially since we name our parameters even in the header files).

> - Also, there are a few notify functions that are documented as
> deprecated, but what will come in place?

The replacements are already in place - the notify_listener() function 
was formerly used for all kinds of notifications; now, it has been 
divided into several ones.

> - In which hooks should file system developers use the vnode 
> functions
> in fs_interface.h?

I don't understand this question.

> - And, last but not least, did I forget anything important. I did not
> dive into the vfs layer, because it looks far too complex. Are there
> any hooks that should return specific error codes?

I currently haven't got the time to look into your documentation 
itself, but there is no code that depends on specific error code - 
expecting specific error codes is often a sign of bad code; it should 
only be used where it makes sense (like when dealing with semaphores), 
or when you always have control over all the code (ie. it would be a 
particularly bad thing to check for error codes coming from arbitrary 
file system implementations).

Bye,
   Axel.


Other related posts: