Discussion:
GOP_ALLOC vs VOP_FALLOCATE
Emmanuel Dreyfus
2014-09-24 11:33:08 UTC
Permalink
Hi

Is there a real difference between GOP_ALLOC and VOP_FALLOCATE? The two
operation seem very similar, with just extra flag and cred args for
GOP_ALLOC.
--
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
***@netbsd.org
Chuck Silvers
2014-09-24 15:02:13 UTC
Permalink
Post by Emmanuel Dreyfus
Hi
Is there a real difference between GOP_ALLOC and VOP_FALLOCATE? The two
operation seem very similar, with just extra flag and cred args for
GOP_ALLOC.
VOP_* calls are part of the interface between a file system and the rest of the kernel.
they may be called on any vnode (though calls that aren't implemented will return an error).

the GOP_* calls are only to be used internal to the implementation of a file system.
they are an interface between a file system implementation and some bits of the genfs code.
the fs calls genfs, and the GOP_* calls allow the genfs code to call back into the specific fs code.
unless you're writing a new fs, you should not use these.

-Chuck

Loading...