nfs-utils/nfs-utils-1.0.9-mount-fsc.patch

72 lines
2.5 KiB
Diff
Raw Normal View History

--- nfs-utils-1.0.9/utils/mount/nfs4mount.c.orig 2006-07-07 20:04:32.000000000 -0400
+++ nfs-utils-1.0.9/utils/mount/nfs4mount.c 2006-07-28 13:08:10.000000000 -0400
@@ -200,7 +200,7 @@ int nfs4mount(const char *spec, const ch
char *s;
int val;
int bg, soft, intr;
- int nocto, noac;
+ int nocto, noac, fscache;
int retry;
int retval;
time_t timeout, t;
@@ -251,6 +251,7 @@ int nfs4mount(const char *spec, const ch
intr = NFS4_MOUNT_INTR;
nocto = 0;
noac = 0;
+ fscache = 0;
retry = 10000; /* 10000 minutes ~ 1 week */
/*
@@ -331,6 +332,8 @@ int nfs4mount(const char *spec, const ch
soft = !val;
else if (!strcmp(opt, "intr"))
intr = val;
+ else if (!strcmp(opt, "fsc"))
+ fscache = val;
else if (!strcmp(opt, "cto"))
nocto = !val;
else if (!strcmp(opt, "ac"))
@@ -346,7 +349,8 @@ int nfs4mount(const char *spec, const ch
data.flags = (soft ? NFS4_MOUNT_SOFT : 0)
| (intr ? NFS4_MOUNT_INTR : 0)
| (nocto ? NFS4_MOUNT_NOCTO : 0)
- | (noac ? NFS4_MOUNT_NOAC : 0);
+ | (noac ? NFS4_MOUNT_NOAC : 0)
+ | (fscache ? NFS4_MOUNT_FSCACHE : 0);
/*
* Give a warning if the rpc.idmapd daemon is not running
--- nfs-utils-1.0.9/utils/mount/nfs_mount.h.orig 2006-07-28 12:52:43.000000000 -0400
+++ nfs-utils-1.0.9/utils/mount/nfs_mount.h 2006-07-28 12:58:07.000000000 -0400
@@ -63,6 +63,7 @@ struct nfs_mount_data {
#define NFS_MOUNT_BROKEN_SUID 0x0400 /* 4 */
#define NFS_MOUNT_NOACL 0x0800 /* 4 */
#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */
+#define NFS_MOUNT_FSCACHE 0x4000 /* 6 */
/* security pseudoflavors */
--- nfs-utils-1.0.9/utils/mount/nfsmount.c.orig 2006-07-28 13:02:55.000000000 -0400
+++ nfs-utils-1.0.9/utils/mount/nfsmount.c 2006-07-28 13:03:11.000000000 -0400
@@ -694,6 +694,10 @@ parse_options(char *old_opts, struct nfs
data->flags &= ~NFS_MOUNT_SOFT;
if (val)
data->flags |= NFS_MOUNT_SOFT;
+ } else if (!strcmp(opt, "fsc")) {
+ data->flags &= ~NFS_MOUNT_FSCACHE;
+ if (val)
+ data->flags |= NFS_MOUNT_FSCACHE;
} else if (!strcmp(opt, "hard")) {
data->flags &= ~NFS_MOUNT_SOFT;
if (!val)
--- nfs-utils-1.0.9/utils/mount/nfs4_mount.h.orig 2006-07-07 20:04:32.000000000 -0400
+++ nfs-utils-1.0.9/utils/mount/nfs4_mount.h 2006-07-28 13:07:27.000000000 -0400
@@ -65,6 +65,7 @@ struct nfs4_mount_data {
#define NFS4_MOUNT_NOCTO 0x0010 /* 1 */
#define NFS4_MOUNT_NOAC 0x0020 /* 1 */
#define NFS4_MOUNT_STRICTLOCK 0x1000 /* 1 */
+#define NFS4_MOUNT_FSCACHE 0x4000 /* 1 */
#define NFS4_MOUNT_FLAGMASK 0xFFFF
/* pseudoflavors: */