Re: [PATCH 1/1] NFSv4.1 Increase NFS4_DEF_SLOT_TABLE_SIZE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy-

On Jul 19, 2013, at 5:09 PM, andros@xxxxxxxxxx wrote:

> From: Andy Adamson <andros@xxxxxxxxxx>
> 
> max_session_slots is a ushort. Bump NFS4_DEF_SLOT_TABLE_SIZE to the max ushort
> value: e.g. ask for 256 slots and let the server negotiate down if needed.

I don't have an objection to your patch, but the description is confusing.

In fs/nfs/super.c I see

   unsigned short max_session_slots = NFS4_DEF_SLOT_TABLE_SIZE;

but /usr/include/limits.h has

   #define USHRT_MAX 65535

The maximum value you can store in an unsigned octet is 255 (UCHAR_MAX).

Why did you choose 256 and not 65535?


> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
> ---
> fs/nfs/nfs4session.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h
> index 3a153d8..8b7899f 100644
> --- a/fs/nfs/nfs4session.h
> +++ b/fs/nfs/nfs4session.h
> @@ -8,7 +8,7 @@
> #define __LINUX_FS_NFS_NFS4SESSION_H
> 
> /* maximum number of slots to use */
> -#define NFS4_DEF_SLOT_TABLE_SIZE (16U)
> +#define NFS4_DEF_SLOT_TABLE_SIZE (256U)
> #define NFS4_MAX_SLOT_TABLE (1024U)
> #define NFS4_NO_SLOT ((u32)-1)
> 
> -- 
> 1.8.3.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com




--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux