What is the purpose of CAP_LARGE_READX?

George K Colley gcolley at apple.com
Thu Jan 17 16:01:09 MST 2013


On Jan 17, 2013, at 2:24 PM, Christopher R. Hertel <crh at ubiqx.mn.org> wrote:

> On 01/17/2013 04:15 PM, Jeremy Allison wrote:
>> On Fri, Jan 18, 2013 at 09:10:33AM +1100, Andrew Bartlett wrote:
>>> On Thu, 2013-01-17 at 13:54 -0800, Jeremy Allison wrote:
>>>> On Fri, Jan 18, 2013 at 08:44:42AM +1100, Andrew Bartlett wrote:
>>>>> I'm chasing a bug where a MacOSX client asks for 64k of data, we ignore
>>>>> the high bits, and return 0 bytes.  The client then writes a 64k zero
>>>>> page locally. 
>>>>> 
>>>>> The formal bug report will follow once I clear the details with the
>>>>> reporter, but it raised in my head some 'meta' questions.
>>>>> 
>>>>> What is the purpose of CAP_LARGE_READX?  The Samba smbd file server only
>>>>> mentions it to claim support for it in negprot, but does not use it in
>>>>> reply.c since
>>>>> https://git.samba.org/?p=samba.git;a=commitdiff;h=f8c26c16b82989e002b839fc9eba6386fc036f6a
>>>>> 
>>>>> I would say 'so, we should not advertise it', but the trace I've been
>>>>> given of Win2008R2 also claims the same flag, but that patch claims it
>>>>> also isn't supported.
>>>>> 
>>>>> If the only way to do large reads and writes with SMB1 is via the unix
>>>>> extensions, what is the purpose of the capability flag?
>>>> 
>>>> Was created to allow implementations to do unix extensions without
>>>> having to allow large readX or large writeX calls (there's also a
>>>> CAP_LARGE_WRITEX). As we're the only server who ever implemented
>>>> the unix extensions they appear synonomous, but they're not.
>>> 
>>> I guess what I'm puzzled at is windows advertising it, but not honouring
>>> it, or getting a closer idea what's really going on.
>> 
>> Oh, ok - if Windows is advertizing it them I'm completely confused,
>> and I'm not remembering the CAP flags correctly. Sorry, ignore my
>> previous comment :-).
> 
> It is in the Windows code, but I will need to re-read portions of MS-CIFS
> and MS-SMB to jog my memory.  As I recall (vaguely), CAP_LARGE_READX and
> CAP_LARGE_WRITEX were defined at the same time, but one of them was not
> implemented until much later.
> 
Correct NT4 only supported SMB_CAP_LARGE_READX, WinXP and above support both


> Let me check tonight and I'll see what I can remember.
> 
> Chris -)-----
> 
> -- 
> "Implementing CIFS - the Common Internet FileSystem" ISBN: 013047116X
> Samba Team -- http://www.samba.org/     -)-----   Christopher R. Hertel
> jCIFS Team -- http://jcifs.samba.org/   -)-----   ubiqx development, uninq.
> ubiqx Team -- http://www.ubiqx.org/     -)-----   crh at ubiqx.mn.org
> OnLineBook -- http://ubiqx.org/cifs/    -)-----   crh at ubiqx.org



More information about the samba-technical mailing list