Samba VFS: Is it really a Virtual File System API?
sconde at dilmun.ls.fi.upm.es
Mon Oct 3 07:53:58 MDT 2011
On 30/09/11 22:01, Jeremy Allison wrote:
> On Fri, Sep 30, 2011 at 09:22:05PM +0200, Sergio Conde Gómez wrote:
>> El 30/09/2011 19:41, Jeremy Allison escribió:
>>> On Fri, Sep 30, 2011 at 03:21:58PM +0200, Sergio Conde Gómez wrote:
>>>> I were searching a way for sharing through samba an online disk
>>>> space from a provider that gives an https based API without mounting
>>>> or syncing the files on the computer that runs the samba server.
>>>> I have discovered Samba VFS but the developer documentation is old,
>>>> its dated 2003, and I don't know if Samba VFS works as an API for
>>>> creating Virtual File Systems and sharing them or only for extending
>>>> capabilities of existing file systems.
>>>> If Samba VFS is not the way but that can be done with Samba, can
>>>> anyone send me in the right direction? (I don't care if I have to
>>>> develop a module for samba if there is an API).
>>> Samba VFS can be used to create a file system out of thin air :-),
>>> not just extend an existing filesystem as all calls from the
>>> upper layer code go through it.
>> Uhm... I dont see the way for returning file contents, for example,
> Yep - easy - just write your own implementation of pread& read.
>> or things like that so I want to ask something, is there any updated
>> documentation or any example about implementing external
>> file-systems? Should I use Transparent or Opaque...
> To replace an underlying file system, use opaque.
> There aren't any updated docs I'm afraid, but if you ask
> questions here I'll try and answer.
I have some questions to begin with (and considering I have not started
designing my module):
Using opaque, should I make functional all the functions? Because there
are some of them that I can't implement due provider API restriction
(Such as all acl related functions, symlinks, chmod, maybe lseek. Other
problem is that open/close are nonsense because I can only read and write).
If I should implement all functions, will do the trick returning "OK it
went well" and doing nothing?
Note that previously I only worked with FUSE for things similar to this.
More information about the samba-technical