* [v2 PATCH] CIFS: Fix incorrect max RFC1002 write size value
@ 2011-10-07 19:27 Pavel Shilovsky
[not found] ` <1318015651-18764-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Shilovsky @ 2011-10-07 19:27 UTC (permalink / raw)
To: linux-cifs-u79uwXL29TY76Z2rM5mHXA
..the length field has only 17 bits.
Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
---
fs/cifs/connect.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index 633c246..1a645ee 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2807,10 +2807,10 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
/*
* When the server doesn't allow large posix writes, only allow a wsize of
- * 128k minus the size of the WRITE_AND_X header. That allows for a write up
+ * 2^17-1 minus the size of the WRITE_AND_X header. That allows for a write up
* to the maximum size described by RFC1002.
*/
-#define CIFS_MAX_RFC1002_WSIZE (128 * 1024 - sizeof(WRITE_REQ) + 4)
+#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
/*
* The default wsize is 1M. find_get_pages seems to return a maximum of 256
--
1.7.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [v2 PATCH] CIFS: Fix incorrect max RFC1002 write size value
[not found] ` <1318015651-18764-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
@ 2011-10-09 11:45 ` Jeff Layton
[not found] ` <20111009074549.711f1d31-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2011-10-09 11:45 UTC (permalink / raw)
To: Pavel Shilovsky; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA
On Fri, 7 Oct 2011 23:27:31 +0400
Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> wrote:
> ..the length field has only 17 bits.
>
> Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
> ---
> fs/cifs/connect.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
> index 633c246..1a645ee 100644
> --- a/fs/cifs/connect.c
> +++ b/fs/cifs/connect.c
> @@ -2807,10 +2807,10 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
>
> /*
> * When the server doesn't allow large posix writes, only allow a wsize of
> - * 128k minus the size of the WRITE_AND_X header. That allows for a write up
> + * 2^17-1 minus the size of the WRITE_AND_X header. That allows for a write up
> * to the maximum size described by RFC1002.
> */
> -#define CIFS_MAX_RFC1002_WSIZE (128 * 1024 - sizeof(WRITE_REQ) + 4)
> +#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
>
> /*
> * The default wsize is 1M. find_get_pages seems to return a maximum of 256
Looks fine...
If we're going to do this though, should we also consider getting rid
of the bogus pad in the WRITE_REQ header? It's preferable to make the
wsize as large as we can get away with...
Acked-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [v2 PATCH] CIFS: Fix incorrect max RFC1002 write size value
[not found] ` <20111009074549.711f1d31-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
@ 2011-10-11 10:55 ` Pavel Shilovsky
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Shilovsky @ 2011-10-11 10:55 UTC (permalink / raw)
To: Jeff Layton, Steve French; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA
2011/10/9 Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>:
> On Fri, 7 Oct 2011 23:27:31 +0400
> Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org> wrote:
>
>> ..the length field has only 17 bits.
>>
>> Signed-off-by: Pavel Shilovsky <piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
>> ---
>> fs/cifs/connect.c | 4 ++--
>> 1 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
>> index 633c246..1a645ee 100644
>> --- a/fs/cifs/connect.c
>> +++ b/fs/cifs/connect.c
>> @@ -2807,10 +2807,10 @@ void cifs_setup_cifs_sb(struct smb_vol *pvolume_info,
>>
>> /*
>> * When the server doesn't allow large posix writes, only allow a wsize of
>> - * 128k minus the size of the WRITE_AND_X header. That allows for a write up
>> + * 2^17-1 minus the size of the WRITE_AND_X header. That allows for a write up
>> * to the maximum size described by RFC1002.
>> */
>> -#define CIFS_MAX_RFC1002_WSIZE (128 * 1024 - sizeof(WRITE_REQ) + 4)
>> +#define CIFS_MAX_RFC1002_WSIZE ((1<<17) - 1 - sizeof(WRITE_REQ) + 4)
>>
>> /*
>> * The default wsize is 1M. find_get_pages seems to return a maximum of 256
>
> Looks fine...
>
> If we're going to do this though, should we also consider getting rid
> of the bogus pad in the WRITE_REQ header? It's preferable to make the
> wsize as large as we can get away with...
>
> Acked-by: Jeff Layton <jlayton-eUNUBHrolfbYtjvyW6yDsg@public.gmane.org>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-cifs" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Steve, is there any chance to get it into 3.1?
--
Best regards,
Pavel Shilovsky.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-11 10:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-07 19:27 [v2 PATCH] CIFS: Fix incorrect max RFC1002 write size value Pavel Shilovsky
[not found] ` <1318015651-18764-1-git-send-email-piastry-7qunaywFIewox3rIn2DAYQ@public.gmane.org>
2011-10-09 11:45 ` Jeff Layton
[not found] ` <20111009074549.711f1d31-4QP7MXygkU+dMjc06nkz3ljfA9RmPOcC@public.gmane.org>
2011-10-11 10:55 ` Pavel Shilovsky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.