walters / rpms / nfs-utils

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