]> err.no Git - linux-2.6/commitdiff
NFS: use documenting macro constants for initializing ac{reg, dir}{min, max}
authorChuck Lever <chuck.lever@oracle.com>
Thu, 26 Jun 2008 21:47:12 +0000 (17:47 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 9 Jul 2008 16:09:40 +0000 (12:09 -0400)
Clean up.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfsroot.c
fs/nfs/super.c
include/linux/nfs_fs.h

index 15afe3a6c5be37548d9210b926b0cdb171c850c0..46763d1cd3976bca27f4d5dca5d3dd9e36d3453b 100644 (file)
@@ -295,10 +295,10 @@ static int __init root_nfs_name(char *name)
        nfs_data.flags    = NFS_MOUNT_NONLM;    /* No lockd in nfs root yet */
        nfs_data.rsize    = NFS_DEF_FILE_IO_SIZE;
        nfs_data.wsize    = NFS_DEF_FILE_IO_SIZE;
-       nfs_data.acregmin = 3;
-       nfs_data.acregmax = 60;
-       nfs_data.acdirmin = 30;
-       nfs_data.acdirmax = 60;
+       nfs_data.acregmin = NFS_DEF_ACREGMIN;
+       nfs_data.acregmax = NFS_DEF_ACREGMAX;
+       nfs_data.acdirmin = NFS_DEF_ACDIRMIN;
+       nfs_data.acdirmax = NFS_DEF_ACDIRMAX;
        strcpy(buf, NFS_ROOT);
 
        /* Process options received from the remote server */
index de424d2f3155aacb23110edbf9bd60e05ca1eef5..ebed63e0ff8e93f946a4135c9dd282d0e9192bed 100644 (file)
@@ -518,13 +518,13 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss,
        if (nfss->bsize != 0)
                seq_printf(m, ",bsize=%u", nfss->bsize);
        seq_printf(m, ",namlen=%u", nfss->namelen);
-       if (nfss->acregmin != 3*HZ || showdefaults)
+       if (nfss->acregmin != NFS_DEF_ACREGMIN*HZ || showdefaults)
                seq_printf(m, ",acregmin=%u", nfss->acregmin/HZ);
-       if (nfss->acregmax != 60*HZ || showdefaults)
+       if (nfss->acregmax != NFS_DEF_ACREGMAX*HZ || showdefaults)
                seq_printf(m, ",acregmax=%u", nfss->acregmax/HZ);
-       if (nfss->acdirmin != 30*HZ || showdefaults)
+       if (nfss->acdirmin != NFS_DEF_ACDIRMIN*HZ || showdefaults)
                seq_printf(m, ",acdirmin=%u", nfss->acdirmin/HZ);
-       if (nfss->acdirmax != 60*HZ || showdefaults)
+       if (nfss->acdirmax != NFS_DEF_ACDIRMAX*HZ || showdefaults)
                seq_printf(m, ",acdirmax=%u", nfss->acdirmax/HZ);
        for (nfs_infop = nfs_info; nfs_infop->flag; nfs_infop++) {
                if (nfss->flags & nfs_infop->flag)
@@ -1460,10 +1460,10 @@ static int nfs_validate_mount_data(void *options,
        args->flags             = (NFS_MOUNT_VER3 | NFS_MOUNT_TCP);
        args->rsize             = NFS_MAX_FILE_IO_SIZE;
        args->wsize             = NFS_MAX_FILE_IO_SIZE;
-       args->acregmin          = 3;
-       args->acregmax          = 60;
-       args->acdirmin          = 30;
-       args->acdirmax          = 60;
+       args->acregmin          = NFS_DEF_ACREGMIN;
+       args->acregmax          = NFS_DEF_ACREGMAX;
+       args->acdirmin          = NFS_DEF_ACDIRMIN;
+       args->acdirmax          = NFS_DEF_ACDIRMAX;
        args->mount_server.port = 0;    /* autobind unless user sets port */
        args->nfs_server.port   = 0;    /* autobind unless user sets port */
        args->nfs_server.protocol = XPRT_TRANSPORT_TCP;
@@ -2119,10 +2119,10 @@ static int nfs4_validate_mount_data(void *options,
 
        args->rsize             = NFS_MAX_FILE_IO_SIZE;
        args->wsize             = NFS_MAX_FILE_IO_SIZE;
-       args->acregmin          = 3;
-       args->acregmax          = 60;
-       args->acdirmin          = 30;
-       args->acdirmax          = 60;
+       args->acregmin          = NFS_DEF_ACREGMIN;
+       args->acregmax          = NFS_DEF_ACREGMAX;
+       args->acdirmin          = NFS_DEF_ACDIRMIN;
+       args->acdirmax          = NFS_DEF_ACDIRMAX;
        args->nfs_server.port   = NFS_PORT; /* 2049 unless user set port= */
 
        switch (data->version) {
index 830d9cc8cdce96edc0672ea92972a31a9c125595..29d26191873428cecde2b29f3fd68b855684f614 100644 (file)
 #define NFS_MAX_UDP_TIMEOUT    (60*HZ)
 #define NFS_MAX_TCP_TIMEOUT    (600*HZ)
 
+#define NFS_DEF_ACREGMIN       (3)
+#define NFS_DEF_ACREGMAX       (60)
+#define NFS_DEF_ACDIRMIN       (30)
+#define NFS_DEF_ACDIRMAX       (60)
+
 /*
  * When flushing a cluster of dirty pages, there can be different
  * strategies: