diff options
author | Chuck Lever <chuck.lever@oracle.com> | 2008-06-26 17:47:12 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2008-07-09 12:09:40 -0400 |
commit | 0e0cab744b17a70ef0f08d818d66935feade7cad (patch) | |
tree | 761a796ae9f0cdcaf15435699c293e30e711264d | |
parent | ed596a8adb7964cf9d2f7682f9cf2c37322a775d (diff) |
NFS: use documenting macro constants for initializing ac{reg, dir}{min, max}
Clean up.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
-rw-r--r-- | fs/nfs/nfsroot.c | 8 | ||||
-rw-r--r-- | fs/nfs/super.c | 24 | ||||
-rw-r--r-- | include/linux/nfs_fs.h | 5 |
3 files changed, 21 insertions, 16 deletions
diff --git a/fs/nfs/nfsroot.c b/fs/nfs/nfsroot.c index 15afe3a6c5be..46763d1cd397 100644 --- a/fs/nfs/nfsroot.c +++ b/fs/nfs/nfsroot.c | |||
@@ -295,10 +295,10 @@ static int __init root_nfs_name(char *name) | |||
295 | nfs_data.flags = NFS_MOUNT_NONLM; /* No lockd in nfs root yet */ | 295 | nfs_data.flags = NFS_MOUNT_NONLM; /* No lockd in nfs root yet */ |
296 | nfs_data.rsize = NFS_DEF_FILE_IO_SIZE; | 296 | nfs_data.rsize = NFS_DEF_FILE_IO_SIZE; |
297 | nfs_data.wsize = NFS_DEF_FILE_IO_SIZE; | 297 | nfs_data.wsize = NFS_DEF_FILE_IO_SIZE; |
298 | nfs_data.acregmin = 3; | 298 | nfs_data.acregmin = NFS_DEF_ACREGMIN; |
299 | nfs_data.acregmax = 60; | 299 | nfs_data.acregmax = NFS_DEF_ACREGMAX; |
300 | nfs_data.acdirmin = 30; | 300 | nfs_data.acdirmin = NFS_DEF_ACDIRMIN; |
301 | nfs_data.acdirmax = 60; | 301 | nfs_data.acdirmax = NFS_DEF_ACDIRMAX; |
302 | strcpy(buf, NFS_ROOT); | 302 | strcpy(buf, NFS_ROOT); |
303 | 303 | ||
304 | /* Process options received from the remote server */ | 304 | /* Process options received from the remote server */ |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index de424d2f3155..ebed63e0ff8e 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -518,13 +518,13 @@ static void nfs_show_mount_options(struct seq_file *m, struct nfs_server *nfss, | |||
518 | if (nfss->bsize != 0) | 518 | if (nfss->bsize != 0) |
519 | seq_printf(m, ",bsize=%u", nfss->bsize); | 519 | seq_printf(m, ",bsize=%u", nfss->bsize); |
520 | seq_printf(m, ",namlen=%u", nfss->namelen); | 520 | seq_printf(m, ",namlen=%u", nfss->namelen); |
521 | if (nfss->acregmin != 3*HZ || showdefaults) | 521 | if (nfss->acregmin != NFS_DEF_ACREGMIN*HZ || showdefaults) |
522 | seq_printf(m, ",acregmin=%u", nfss->acregmin/HZ); | 522 | seq_printf(m, ",acregmin=%u", nfss->acregmin/HZ); |
523 | if (nfss->acregmax != 60*HZ || showdefaults) | 523 | if (nfss->acregmax != NFS_DEF_ACREGMAX*HZ || showdefaults) |
524 | seq_printf(m, ",acregmax=%u", nfss->acregmax/HZ); | 524 | seq_printf(m, ",acregmax=%u", nfss->acregmax/HZ); |
525 | if (nfss->acdirmin != 30*HZ || showdefaults) | 525 | if (nfss->acdirmin != NFS_DEF_ACDIRMIN*HZ || showdefaults) |
526 | seq_printf(m, ",acdirmin=%u", nfss->acdirmin/HZ); | 526 | seq_printf(m, ",acdirmin=%u", nfss->acdirmin/HZ); |
527 | if (nfss->acdirmax != 60*HZ || showdefaults) | 527 | if (nfss->acdirmax != NFS_DEF_ACDIRMAX*HZ || showdefaults) |
528 | seq_printf(m, ",acdirmax=%u", nfss->acdirmax/HZ); | 528 | seq_printf(m, ",acdirmax=%u", nfss->acdirmax/HZ); |
529 | for (nfs_infop = nfs_info; nfs_infop->flag; nfs_infop++) { | 529 | for (nfs_infop = nfs_info; nfs_infop->flag; nfs_infop++) { |
530 | if (nfss->flags & nfs_infop->flag) | 530 | if (nfss->flags & nfs_infop->flag) |
@@ -1460,10 +1460,10 @@ static int nfs_validate_mount_data(void *options, | |||
1460 | args->flags = (NFS_MOUNT_VER3 | NFS_MOUNT_TCP); | 1460 | args->flags = (NFS_MOUNT_VER3 | NFS_MOUNT_TCP); |
1461 | args->rsize = NFS_MAX_FILE_IO_SIZE; | 1461 | args->rsize = NFS_MAX_FILE_IO_SIZE; |
1462 | args->wsize = NFS_MAX_FILE_IO_SIZE; | 1462 | args->wsize = NFS_MAX_FILE_IO_SIZE; |
1463 | args->acregmin = 3; | 1463 | args->acregmin = NFS_DEF_ACREGMIN; |
1464 | args->acregmax = 60; | 1464 | args->acregmax = NFS_DEF_ACREGMAX; |
1465 | args->acdirmin = 30; | 1465 | args->acdirmin = NFS_DEF_ACDIRMIN; |
1466 | args->acdirmax = 60; | 1466 | args->acdirmax = NFS_DEF_ACDIRMAX; |
1467 | args->mount_server.port = 0; /* autobind unless user sets port */ | 1467 | args->mount_server.port = 0; /* autobind unless user sets port */ |
1468 | args->nfs_server.port = 0; /* autobind unless user sets port */ | 1468 | args->nfs_server.port = 0; /* autobind unless user sets port */ |
1469 | args->nfs_server.protocol = XPRT_TRANSPORT_TCP; | 1469 | args->nfs_server.protocol = XPRT_TRANSPORT_TCP; |
@@ -2119,10 +2119,10 @@ static int nfs4_validate_mount_data(void *options, | |||
2119 | 2119 | ||
2120 | args->rsize = NFS_MAX_FILE_IO_SIZE; | 2120 | args->rsize = NFS_MAX_FILE_IO_SIZE; |
2121 | args->wsize = NFS_MAX_FILE_IO_SIZE; | 2121 | args->wsize = NFS_MAX_FILE_IO_SIZE; |
2122 | args->acregmin = 3; | 2122 | args->acregmin = NFS_DEF_ACREGMIN; |
2123 | args->acregmax = 60; | 2123 | args->acregmax = NFS_DEF_ACREGMAX; |
2124 | args->acdirmin = 30; | 2124 | args->acdirmin = NFS_DEF_ACDIRMIN; |
2125 | args->acdirmax = 60; | 2125 | args->acdirmax = NFS_DEF_ACDIRMAX; |
2126 | args->nfs_server.port = NFS_PORT; /* 2049 unless user set port= */ | 2126 | args->nfs_server.port = NFS_PORT; /* 2049 unless user set port= */ |
2127 | 2127 | ||
2128 | switch (data->version) { | 2128 | switch (data->version) { |
diff --git a/include/linux/nfs_fs.h b/include/linux/nfs_fs.h index 830d9cc8cdce..29d261918734 100644 --- a/include/linux/nfs_fs.h +++ b/include/linux/nfs_fs.h | |||
@@ -20,6 +20,11 @@ | |||
20 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) | 20 | #define NFS_MAX_UDP_TIMEOUT (60*HZ) |
21 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) | 21 | #define NFS_MAX_TCP_TIMEOUT (600*HZ) |
22 | 22 | ||
23 | #define NFS_DEF_ACREGMIN (3) | ||
24 | #define NFS_DEF_ACREGMAX (60) | ||
25 | #define NFS_DEF_ACDIRMIN (30) | ||
26 | #define NFS_DEF_ACDIRMAX (60) | ||
27 | |||
23 | /* | 28 | /* |
24 | * When flushing a cluster of dirty pages, there can be different | 29 | * When flushing a cluster of dirty pages, there can be different |
25 | * strategies: | 30 | * strategies: |