From: Jeff Layton Date: Thu, 19 May 2011 20:22:58 +0000 (-0400) Subject: cifs: clean up wsize negotiation and allow for larger wsize X-Git-Tag: v3.0-rc1~43^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7910cbd9fa319ee4501074f1f3b5ce23c4b1518;p=pandora-kernel.git cifs: clean up wsize negotiation and allow for larger wsize Now that we can handle larger wsizes in writepages, fix up the negotiation of the wsize to allow for that. find_get_pages only seems to give out a max of 256 pages at a time, so that gives us a reasonable default of 1M for the wsize. If the server however does not support large writes via POSIX extensions, then we cap the wsize to (128k - PAGE_CACHE_SIZE). That gives us a size that goes up to the max frame size specified in RFC1001. Finally, if CAP_LARGE_WRITE_AND_X isn't set, then further cap it to the largest size allowed by the protocol (USHRT_MAX). Signed-off-by: Jeff Layton Reviewed-and-Tested-by: Pavel Shilovsky Signed-off-by: Steve French --- Reading git-diff-tree failed