2009-12-10 Christos Zoulas <christos@zoulas.com>
+ * Right now AMD sets all timeout values to their defaults
+ even if you explicitly set them to zero. This patch
+ introduces separate flags that store if the respective
+ values have been set and the code path setting default
+ values checks these flags instead of testing the values
+ for zero. [Linux only]
+ From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
+
* Fix mntfs related lookup/(un)mount race conditions, by
introducing a new structure linking an mntfs to a node.
From: Krisztian Kovacs <Kris.Kovacs@morganstanley.com>
#ifdef MNT2_NFS_OPT_NOAC
if (!(mnt_data->flags & MNT2_NFS_OPT_NOAC)) {
- if (!mnt_data->acregmin)
+ if (!(mnt_data->flags & MNT2_NFS_OPT_ACREGMIN))
mnt_data->acregmin = 3;
- if (!mnt_data->acregmax)
+ if (!(mnt_data->flags & MNT2_NFS_OPT_ACREGMAX))
mnt_data->acregmax = 60;
- if (!mnt_data->acdirmin)
+ if (!(mnt_data->flags & MNT2_NFS_OPT_ACDIRMIN))
mnt_data->acdirmin = 30;
- if (!mnt_data->acdirmax)
+ if (!(mnt_data->flags & MNT2_NFS_OPT_ACDIRMAX))
mnt_data->acdirmax = 60;
}
#endif /* MNT2_NFS_OPT_NOAC */
print_nfs_args(mnt_data, 0);
}
+ mnt_data->flags &= MNT2_NFS_OPT_FLAGMASK;
+
errorcode = do_mount_linux(type, mnt, flags, data);
out:
};
typedef struct nfs_args nfs_args_t;
+/* HACK: these are not defined on Linux but we still need them
+ * internally. We have to be able to differentiate between having a
+ * timeout value set to zero and not having the option at all. These
+ * flags are masked off before passing the nfs_args structure to
+ * mount2() */
+
+#define MNT2_NFS_OPT_ACREGMIN 0x10000
+#define MNT2_NFS_OPT_ACREGMAX 0x20000
+#define MNT2_NFS_OPT_ACDIRMIN 0x40000
+#define MNT2_NFS_OPT_ACDIRMAX 0x80000
+#define MNT2_NFS_OPT_FLAGMASK 0xFFFF
+
/*
* Missing definitions on redhat alpha linux
*/