647169f
--- nfs-utils-1.1.0/utils/mount/nfsmount.c.orig	2007-05-10 23:40:57.000000000 -0400
647169f
+++ nfs-utils-1.1.0/utils/mount/nfsmount.c	2007-07-25 11:25:33.000000000 -0400
647169f
@@ -733,6 +733,10 @@ parse_options(char *old_opts, struct nfs
647169f
 				data->flags &= ~NFS_MOUNT_SOFT;
647169f
 				if (val)
647169f
 					data->flags |= NFS_MOUNT_SOFT;
647169f
+			} else if (!strcmp(opt, "fsc")) {
647169f
+				data->flags &= ~NFS_MOUNT_FSCACHE;
647169f
+				if (val)
647169f
+					data->flags |= NFS_MOUNT_FSCACHE;
647169f
 			} else if (!strcmp(opt, "hard")) {
647169f
 				data->flags &= ~NFS_MOUNT_SOFT;
647169f
 				if (!val)
647169f
--- nfs-utils-1.1.0/utils/mount/nfs.man.orig	2007-05-10 23:40:57.000000000 -0400
647169f
+++ nfs-utils-1.1.0/utils/mount/nfs.man	2007-07-25 11:27:55.000000000 -0400
647169f
@@ -288,6 +288,10 @@ Mount the NFS filesystem using the UDP p
647169f
 Disables NFSv3 READDIRPLUS RPCs. Use this option when
647169f
 mounting servers that don't support or have broken
647169f
 READDIRPLUS implementations.
647169f
+.TP 1.5i
647169f
+.I fsc
647169f
+Enable the use of persistent caching to the local disk using
647169f
+the FS-Cache facility for the given mount point.
647169f
 .P
647169f
 All of the non-value options have corresponding nooption forms.
647169f
 For example, nointr means don't allow file operations to be
647169f
@@ -444,6 +448,10 @@ This extracts a
647169f
 server performance penalty but it allows two different NFS clients
647169f
 to get reasonable good results when both clients are actively
647169f
 writing to common filesystem on the server.
647169f
+.TP 1.5i
647169f
+.I fsc
647169f
+Enable the use of persistent caching to the local disk using
647169f
+the FS-Cache facility for the given mount point.
647169f
 .P
647169f
 All of the non-value options have corresponding nooption forms.
647169f
 For example, nointr means don't allow file operations to be
647169f
--- nfs-utils-1.1.0/utils/mount/nfs4mount.c.orig	2007-05-10 23:40:57.000000000 -0400
647169f
+++ nfs-utils-1.1.0/utils/mount/nfs4mount.c	2007-07-25 11:25:33.000000000 -0400
647169f
@@ -201,7 +201,7 @@ int nfs4mount(const char *spec, const ch
647169f
 	char *s;
647169f
 	int val;
647169f
 	int bg, soft, intr;
647169f
-	int nocto, noac;
647169f
+	int nocto, noac, fscache;
647169f
 	int retry;
647169f
 	int retval;
647169f
 	time_t timeout, t;
647169f
@@ -252,6 +252,7 @@ int nfs4mount(const char *spec, const ch
647169f
 	intr = NFS4_MOUNT_INTR;
647169f
 	nocto = 0;
647169f
 	noac = 0;
647169f
+	fscache = 0;
647169f
 	retry = 10000;		/* 10000 minutes ~ 1 week */
647169f
 
647169f
 	/*
647169f
@@ -332,6 +333,8 @@ int nfs4mount(const char *spec, const ch
647169f
 				soft = !val;
647169f
 			else if (!strcmp(opt, "intr"))
647169f
 				intr = val;
647169f
+			else if (!strcmp(opt, "fsc"))
647169f
+				fscache = val;
647169f
 			else if (!strcmp(opt, "cto"))
647169f
 				nocto = !val;
647169f
 			else if (!strcmp(opt, "ac"))
647169f
@@ -347,7 +350,8 @@ int nfs4mount(const char *spec, const ch
647169f
 	data.flags = (soft ? NFS4_MOUNT_SOFT : 0)
647169f
 		| (intr ? NFS4_MOUNT_INTR : 0)
647169f
 		| (nocto ? NFS4_MOUNT_NOCTO : 0)
647169f
-		| (noac ? NFS4_MOUNT_NOAC : 0);
647169f
+		| (noac ? NFS4_MOUNT_NOAC : 0)
647169f
+		| (fscache ? NFS4_MOUNT_FSCACHE : 0);
647169f
 
647169f
 	/*
647169f
 	 * Give a warning if the rpc.idmapd daemon is not running
647169f
--- nfs-utils-1.1.0/utils/mount/nfs4_mount.h.orig	2007-05-10 23:40:57.000000000 -0400
647169f
+++ nfs-utils-1.1.0/utils/mount/nfs4_mount.h	2007-07-25 11:27:07.000000000 -0400
647169f
@@ -65,7 +65,8 @@ struct nfs4_mount_data {
647169f
 #define NFS4_MOUNT_NOCTO	0x0010	/* 1 */
647169f
 #define NFS4_MOUNT_NOAC		0x0020	/* 1 */
647169f
 #define NFS4_MOUNT_STRICTLOCK	0x1000	/* 1 */
647169f
-#define NFS4_MOUNT_FLAGMASK	0xFFFF
647169f
+#define NFS4_MOUNT_FSCACHE	0x10000	/* 1 */
647169f
+#define NFS4_MOUNT_FLAGMASK	0x1FFFF
647169f
 
647169f
 /* pseudoflavors: */
647169f
 
647169f
--- nfs-utils-1.1.0/utils/mount/nfs_mount.h.orig	2007-05-10 23:40:57.000000000 -0400
647169f
+++ nfs-utils-1.1.0/utils/mount/nfs_mount.h	2007-07-25 11:26:39.000000000 -0400
647169f
@@ -64,6 +64,7 @@ struct nfs_mount_data {
647169f
 #define NFS_MOUNT_NOACL     0x0800  /* 4 */
647169f
 #define NFS_MOUNT_SECFLAVOUR	0x2000	/* 5 */
647169f
 #define NFS_MOUNT_NORDIRPLUS	0x4000	/* 5 */
647169f
+#define NFS_MOUNT_FSCACHE	0x10000	/* 5 */
647169f
 
647169f
 /* security pseudoflavors */
647169f