diff options
-rw-r--r-- | fs/nfs/inode.c | 8 | ||||
-rw-r--r-- | include/linux/nfs_fs_sb.h | 2 |
2 files changed, 10 insertions, 0 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 521d1dcb4cf0..48683d4bf0f6 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -396,6 +396,9 @@ nfs_create_client(struct nfs_server *server, const struct nfs_mount_data *data) | |||
396 | 396 | ||
397 | nfs_init_timeout_values(&timeparms, proto, data->timeo, data->retrans); | 397 | nfs_init_timeout_values(&timeparms, proto, data->timeo, data->retrans); |
398 | 398 | ||
399 | server->retrans_timeo = timeparms.to_initval; | ||
400 | server->retrans_count = timeparms.to_retries; | ||
401 | |||
399 | /* create transport and client */ | 402 | /* create transport and client */ |
400 | xprt = xprt_create_proto(proto, &server->addr, &timeparms); | 403 | xprt = xprt_create_proto(proto, &server->addr, &timeparms); |
401 | if (IS_ERR(xprt)) { | 404 | if (IS_ERR(xprt)) { |
@@ -629,6 +632,8 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt) | |||
629 | proto = buf; | 632 | proto = buf; |
630 | } | 633 | } |
631 | seq_printf(m, ",proto=%s", proto); | 634 | seq_printf(m, ",proto=%s", proto); |
635 | seq_printf(m, ",timeo=%lu", 10U * nfss->retrans_timeo / HZ); | ||
636 | seq_printf(m, ",retrans=%u", nfss->retrans_count); | ||
632 | seq_puts(m, ",addr="); | 637 | seq_puts(m, ",addr="); |
633 | seq_escape(m, nfss->hostname, " \t\n\\"); | 638 | seq_escape(m, nfss->hostname, " \t\n\\"); |
634 | return 0; | 639 | return 0; |
@@ -1800,6 +1805,9 @@ static int nfs4_fill_super(struct super_block *sb, struct nfs4_mount_data *data, | |||
1800 | 1805 | ||
1801 | nfs_init_timeout_values(&timeparms, data->proto, data->timeo, data->retrans); | 1806 | nfs_init_timeout_values(&timeparms, data->proto, data->timeo, data->retrans); |
1802 | 1807 | ||
1808 | server->retrans_timeo = timeparms.to_initval; | ||
1809 | server->retrans_count = timeparms.to_retries; | ||
1810 | |||
1803 | clp = nfs4_get_client(&server->addr.sin_addr); | 1811 | clp = nfs4_get_client(&server->addr.sin_addr); |
1804 | if (!clp) { | 1812 | if (!clp) { |
1805 | dprintk("%s: failed to create NFS4 client.\n", __FUNCTION__); | 1813 | dprintk("%s: failed to create NFS4 client.\n", __FUNCTION__); |
diff --git a/include/linux/nfs_fs_sb.h b/include/linux/nfs_fs_sb.h index 3d3a305488cf..a522ab97358d 100644 --- a/include/linux/nfs_fs_sb.h +++ b/include/linux/nfs_fs_sb.h | |||
@@ -26,6 +26,8 @@ struct nfs_server { | |||
26 | unsigned int acregmax; | 26 | unsigned int acregmax; |
27 | unsigned int acdirmin; | 27 | unsigned int acdirmin; |
28 | unsigned int acdirmax; | 28 | unsigned int acdirmax; |
29 | unsigned long retrans_timeo; /* retransmit timeout */ | ||
30 | unsigned int retrans_count; /* number of retransmit tries */ | ||
29 | unsigned int namelen; | 31 | unsigned int namelen; |
30 | char * hostname; /* remote hostname */ | 32 | char * hostname; /* remote hostname */ |
31 | struct nfs_fh fh; | 33 | struct nfs_fh fh; |