Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 14 Aug 2002 16:38:08 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 14 Aug 2002 16:37:11 -0400 Received: from donkeykong.gpcc.itd.umich.edu ([141.211.2.163]:41945 "EHLO donkeykong.gpcc.itd.umich.edu") by vger.kernel.org with ESMTP id ; Wed, 14 Aug 2002 16:36:46 -0400 Date: Wed, 14 Aug 2002 16:40:33 -0400 (EDT) From: "Kendrick M. Smith" X-X-Sender: kmsmith@vanguard.gpcc.itd.umich.edu To: linux-kernel@vger.kernel.org, Subject: REPOST patch 09/38: CLIENT: new fields in 'struct nfs_mount_data' Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3304 Lines: 92 This patch changes 'struct nfs_mount_data' to include some new fields which will be passed down by the mount program: @mnt_path - In NFSv4, the client kernel obtains the mount path and is responsible for doing LOOKUP's component by component, starting with the root of the pseudo filesystem, until the filehandle of the mount point is obtained. This is in contrast with previous versions, in which the mount program obtains the filehandle of the mount point from mountd. @ip_addr - The mount program fills this in with the client's own IP address. This is used to set the client's clientid (an identifier, unique to the client, which the client sends to the server), and also to send callback information to the server. It also defines new mount flags NFS_MOUNT_VER4, NFS_MOUNT_STRICTLOCK. The STRICTLOCK flag will be used in a subsequent patch which implements byte-range file locking. Finally, this patch increases the filehandle size to 128 bytes, but also changes the definition of the 'root' field in 'struct nfs_mount_data' so that it remains a 64-byte filehandle (to ensure binary compatibility with pre-NFSv4 versions of the mount program). --- old/include/linux/nfs.h Sun Aug 11 18:11:53 2002 +++ new/include/linux/nfs.h Sun Aug 11 20:29:44 2002 @@ -120,7 +120,11 @@ enum nfs_ftype { /* * This is the kernel NFS client file handle representation */ -#define NFS_MAXFHSIZE 64 +#ifdef CONFIG_NFS_V4 +# define NFS_MAXFHSIZE 128 +#else +# define NFS_MAXFHSIZE 64 +#endif struct nfs_fh { unsigned short size; unsigned char data[NFS_MAXFHSIZE]; --- old/include/linux/nfs3.h Thu Aug 1 16:16:30 2002 +++ new/include/linux/nfs3.h Sun Aug 11 20:29:44 2002 @@ -28,6 +28,12 @@ #define NFS3_ACCESS_EXTEND 0x0008 #define NFS3_ACCESS_DELETE 0x0010 #define NFS3_ACCESS_EXECUTE 0x0020 +#define NFS3_ACCESS_FULL 0x003f + +struct nfs3_fh { + unsigned short size; + char data[NFS3_FHSIZE]; +}; /* Flags for create mode */ enum nfs3_createmode { --- old/include/linux/nfs_mount.h Thu Aug 1 16:16:03 2002 +++ new/include/linux/nfs_mount.h Sun Aug 11 20:29:44 2002 @@ -18,7 +18,7 @@ * mount-to-kernel version compatibility. Some of these aren't used yet * but here they are anyway. */ -#define NFS_MOUNT_VERSION 4 +#define NFS_MOUNT_VERSION 5 struct nfs_mount_data { int version; /* 1 */ @@ -37,7 +37,9 @@ struct nfs_mount_data { char hostname[256]; /* 1 */ int namlen; /* 2 */ unsigned int bsize; /* 3 */ - struct nfs_fh root; /* 4 */ + struct nfs3_fh root; /* 4 */ + char mnt_path[256]; /* 5 */ + char ip_addr[16]; /* 5 */ }; /* bits in the flags field */ @@ -53,6 +55,8 @@ struct nfs_mount_data { #define NFS_MOUNT_KERBEROS 0x0100 /* 3 */ #define NFS_MOUNT_NONLM 0x0200 /* 3 */ #define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */ +#define NFS_MOUNT_VER4 0x0800 /* 5 */ +#define NFS_MOUNT_STRICTLOCK 0x1000 /* 5 */ #define NFS_MOUNT_FLAGMASK 0xFFFF #endif - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/