[Samba] sendfile questions...
William Jojo
jojowil at hvcc.edu
Sun Jan 2 18:06:47 GMT 2005
Why in smbd/reply.c does send_file_readX only use sendfile if write cache
size is 0?
<snip>
if (chain_size ==0 && (CVAL(inbuf,smb_vwv0) == 0xFF) && lp_use_sendfile(
SNUM(conn)) &&
(lp_write_cache_size(SNUM(conn)) == 0) ) {
</snip>
While its true send_file_readX works regardless of the state of oplocks
(which is cool!) the smb.conf.5 man page still indicates the file must be
exclusively oplocked.
I was researching why an XP client was having 32K reads broken into 28K/4K
pairs (which is mildly bizarre) and ran into this.
[2004/12/30 14:10:35, 3] smbd/reply.c:send_file_readX(2133)
send_file_readX: sendfile fnum=10940 max=28672 nread=-1
[2004/12/30 14:10:35, 3] smbd/process.c:process_smb(1091)
Transaction 84503 of length 63
[2004/12/30 14:10:35, 3] smbd/process.c:switch_message(886)
switch message SMBreadX (pid 450664) conn 0x2010fee8
[2004/12/30 14:10:35, 3] smbd/sec_ctx.c:set_sec_ctx(288)
setting sec ctx (0, 206) - sec_ctx_stack_ndx = 0
[2004/12/30 14:10:35, 3] smbd/reply.c:send_file_readX(2133)
send_file_readX: sendfile fnum=10940 max=4096 nread=-1
nread is not captured from the actual sendfile request, which is fine with
me, and the return value is -1 anyway to assure no chaining, but I was
wondering how to find out who's breaking the request down to 28 and 4, the
client or samba?
Bill
More information about the samba
mailing list