• J
    cifs: when server doesn't set CAP_LARGE_READ_X, cap default rsize at MaxBufferSize · ec01d738
    Jeff Layton 提交于
    When the server doesn't advertise CAP_LARGE_READ_X, then MS-CIFS states
    that you must cap the size of the read at the client's MaxBufferSize.
    Unfortunately, testing with many older servers shows that they often
    can't service a read larger than their own MaxBufferSize.
    
    Since we can't assume what the server will do in this situation, we must
    be conservative here for the default. When the server can't do large
    reads, then assume that it can't satisfy any read larger than its
    MaxBufferSize either.
    
    Luckily almost all modern servers can do large reads, so this won't
    affect them. This is really just for older win9x and OS/2 era servers.
    Also, note that this patch just governs the default rsize. The admin can
    always override this if he so chooses.
    
    Cc: <stable@vger.kernel.org> # 3.2
    Reported-by: NDavid H. Durgee <dhdurgee@acm.org>
    Signed-off-by: NJeff Layton <jlayton@redhat.com>
    Signed-off-by: NSteven French <sfrench@w500smf.(none)>
    ec01d738
connect.c 114.9 KB