2011/10/11 Jeff Layton <jlayton@xxxxxxxxxx>: ... > + > + /* > + * Set default value... > + * > + * HACK alert! Ancient servers have very small buffers. Even though > + * MS-CIFS indicates that servers are only limited by the client's > + * bufsize for reads, testing against win98se shows that it throws > + * INVALID_PARAMETER errors if you try to request too large a read. > + * > + * If the server advertises a MaxBufferSize of less than one page, > + * assume that it also can't satisfy reads larger than that either. > + * > + * FIXME: Is there a better heuristic for this? > + */ > + if (tcon->unix_ext && (unix_cap & CIFS_UNIX_LARGE_READ_CAP)) > + defsize = CIFS_DEFAULT_IOSIZE; > + else if (server->capabilities & CAP_LARGE_READ_X) > + defsize = CIFS_DEFAULT_NON_POSIX_RSIZE; > + else if (server->maxBuf >= PAGE_CACHE_SIZE) > + defsize = CIFSMaxBufSize; > + else > + defsize = server->maxBuf - sizeof(READ_RSP); > + So, if the max buffer size that the server supports is greater or equal that PAGE_CACHE_SIZE than we set it to CIFSMaxBufSize. But if maxBuf is less than CIFSMaxBufSize? I think the server refects such a request. -- Best regards, Pavel Shilovsky. -- To unsubscribe from this list: send the line "unsubscribe linux-cifs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html