withlog at yahoo.com
2016-Jul-11 13:06 UTC
[Samba] What's the difference between source3 and source4 in samba? How to use an asynchronous file system?
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? Actually, almost all docs in samba are about samba3, where to find docs about samba4? 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? Someone said source4 will be deprecated. Is this true? thanks!Best regards! 11th,July Sent from Yahoo Mail. Get the app
Volker Lendecke
2016-Jul-11 15:12 UTC
[Samba] What's the difference between source3 and source4 in samba? How to use an asynchronous file system?
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? > Actually, almost all docs in samba are about samba3, where to find > docs about samba4? 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? Someone said source4 will be > deprecated. Is this true?source4/ntvfs has not seen any updates for a while, most SMB protocol and file server development happened in source3. If you want to revive that, feel free, but you'll be pretty much on your own. What exactly are your interfaces that you are async instead of sync? The source3/smbd/smb2* file at its core is already pretty much async, however many of our core routines are not. If have specially severe pain points for bad sync API behaviour, that might be a reason for making it more asynchronous. BTW, pread/pwrite are already async. Regards, Volker
Jeremy Allison
2016-Jul-12 20:23 UTC
[Samba] What's the difference between source3 and source4 in samba? How to use an asynchronous file system?
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.
Seemingly Similar Threads
- Why smbd (version 4.1.0) uses source3/smbd/server.c not source4/smbd/server.c
- libldb-samba.so does not link in source4 samba
- any available asynchronous dce rpc library?
- Re: Rails-spinoffs] Ajax.Updater asynchronous => false
- periodically_call_remote forces asynchronous to true?