[Samba] What's the difference between source3 and source4 in samba? How to use an asynchronous file system?

Jeremy Allison jra at samba.org
Tue Jul 12 20:23:03 UTC 2016


On Mon, Jul 11, 2016 at 01:06:53PM +0000, withlog at yahoo.com wrote:
>  Hi, list,     I recently begin to study samba source code.
> Now I have some questions to ask. Can you give me some help?
> The first question is what the relationship between samba versions(such as 3.x.x , 4.x.x)
> and samba3/samba4. In samba source code, I find two directories, souce3 and soure4. Do they
> mean  samba3 and samba4? 

No. They are historical artifacts from the original
split due to the attempt a rewrite of Samba with Samba4.

All the source code is Samba4, whether in source3 or
source4 directories. They may be considered historical
placement showing where they originally came from. As
they are merged into one, the code gets moved into the
top-level lib/ util/ etc. directories.

> Actually, almost all docs in samba are about samba3,
> where to find docs about samba4?

https://wiki.samba.org/index.php/User_Documentation

> The second question is how to use an asynchronous file system
> interface in samba? Actually we develop a new file system. But
> in our system, synchronous interfaces worked poorly, so we begin
> to use  asynchronous  interfaces. I only find this case in source4.
> Is that right?

No. Look inside the fileserver code source3/include/vfs.h
at the interfaces XXXX_send_fn()/XXXX_recv_fn() pairs.

Then study how these are implemented in the code. This
should help. Not all filesystem interfaces are currently
async, so we could do with some help in expanding this
list.

> Someone said source4 will be deprecated. Is this true?

Only in that both source3 and source4 will eventually
be merged.



More information about the samba mailing list