diff options
-rw-r--r-- | fs/nfs/internal.h | 8 | ||||
-rw-r--r-- | fs/nfs/super.c | 9 |
2 files changed, 8 insertions, 9 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h index a2346a2f8361..4b946e6a052f 100644 --- a/fs/nfs/internal.h +++ b/fs/nfs/internal.h | |||
@@ -16,14 +16,6 @@ extern const struct export_operations nfs_export_ops; | |||
16 | 16 | ||
17 | struct nfs_string; | 17 | struct nfs_string; |
18 | 18 | ||
19 | /* Maximum number of readahead requests | ||
20 | * FIXME: this should really be a sysctl so that users may tune it to suit | ||
21 | * their needs. People that do NFS over a slow network, might for | ||
22 | * instance want to reduce it to something closer to 1 for improved | ||
23 | * interactive response. | ||
24 | */ | ||
25 | #define NFS_MAX_READAHEAD (RPC_DEF_SLOT_TABLE - 1) | ||
26 | |||
27 | static inline void nfs_attr_check_mountpoint(struct super_block *parent, struct nfs_fattr *fattr) | 19 | static inline void nfs_attr_check_mountpoint(struct super_block *parent, struct nfs_fattr *fattr) |
28 | { | 20 | { |
29 | if (!nfs_fsid_equal(&NFS_SB(parent)->fsid, &fattr->fsid)) | 21 | if (!nfs_fsid_equal(&NFS_SB(parent)->fsid, &fattr->fsid)) |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 703f595dce90..c96194e28692 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -2627,6 +2627,13 @@ int nfs_clone_sb_security(struct super_block *s, struct dentry *mntroot, | |||
2627 | } | 2627 | } |
2628 | EXPORT_SYMBOL_GPL(nfs_clone_sb_security); | 2628 | EXPORT_SYMBOL_GPL(nfs_clone_sb_security); |
2629 | 2629 | ||
2630 | static void nfs_set_readahead(struct backing_dev_info *bdi, | ||
2631 | unsigned long iomax_pages) | ||
2632 | { | ||
2633 | bdi->ra_pages = VM_READAHEAD_PAGES; | ||
2634 | bdi->io_pages = iomax_pages; | ||
2635 | } | ||
2636 | |||
2630 | struct dentry *nfs_fs_mount_common(struct nfs_server *server, | 2637 | struct dentry *nfs_fs_mount_common(struct nfs_server *server, |
2631 | int flags, const char *dev_name, | 2638 | int flags, const char *dev_name, |
2632 | struct nfs_mount_info *mount_info, | 2639 | struct nfs_mount_info *mount_info, |
@@ -2669,7 +2676,7 @@ struct dentry *nfs_fs_mount_common(struct nfs_server *server, | |||
2669 | mntroot = ERR_PTR(error); | 2676 | mntroot = ERR_PTR(error); |
2670 | goto error_splat_super; | 2677 | goto error_splat_super; |
2671 | } | 2678 | } |
2672 | s->s_bdi->ra_pages = server->rpages * NFS_MAX_READAHEAD; | 2679 | nfs_set_readahead(s->s_bdi, server->rpages); |
2673 | server->super = s; | 2680 | server->super = s; |
2674 | } | 2681 | } |
2675 | 2682 | ||