linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Kendrick M. Smith" <kmsmith@umich.edu>
To: linux-kernel@vger.kernel.org, <nfs@lists.sourceforge.net>
Subject: REPOST patch 09/38: CLIENT: new fields in 'struct nfs_mount_data'
Date: Wed, 14 Aug 2002 16:40:33 -0400 (EDT)	[thread overview]
Message-ID: <Pine.SOL.4.44.0208141639580.1834-100000@vanguard.gpcc.itd.umich.edu> (raw)


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


                 reply	other threads:[~2002-08-14 20:38 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.SOL.4.44.0208141639580.1834-100000@vanguard.gpcc.itd.umich.edu \
    --to=kmsmith@umich.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).