[PATCH] Fix bug 9412 - SMB2 server doesn't support recvfile.
jra at samba.org
Wed Apr 3 22:57:26 MDT 2013
OEMs who are running lower powered boxes often use
the recvfile capability in Samba in conjunction with
a modified Linux kernel that does a zero-copy on
writes directly from the TCP buffers into the file
The SMB2 server doesn't currently support that, so
a couple of OEMs asked me to implement this. I originally
prototyped this in 3.6.x (as can be seen in the
attachments to the listed bug report):
But the SMB2 server was re-written to do less
readv() calls in 4.0.x, so I've had to re-write
my patch for master/4.0.x.
The good news is that it got a lot smaller :-).
I'm really pleased with how little I had to
change to make this work. It's only a 10 element
patch set, and most of these are 5-10 line micro
It turns out the changes made for 4.0.x meant
that I had to make *no* changes in the
smbd/smb2_write.c code to make RECVFILE work
(which is pretty amazing :-), and I think proves
we have some good abstractions in the 4.0.x code.
This patchset has been tested by me under valgrind,
and by the OEM on their box, and gives an 18%
improvement in SMB2 write speed which finally makes
SMB2 faster than SMB1 on their smaller machines.
Please review and give feedback (feel free to push
if you're happy with it :-).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 14410 bytes
Desc: not available
More information about the samba-technical