fs/9p: set default readahead pages in cached mode
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Mon, 28 Feb 2011 11:34:03 +0000 (17:04 +0530)
committerEric Van Hensbergen <ericvh@gmail.com>
Tue, 15 Mar 2011 14:57:39 +0000 (09:57 -0500)
We want to enable readahead in cached mode

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
fs/9p/vfs_super.c

index 6c812d1c58f1213f520a705698cac4fa2aa067d2..f84d625b87907452771da24c5f148568c4376ece 100644 (file)
@@ -86,6 +86,8 @@ v9fs_fill_super(struct super_block *sb, struct v9fs_session_info *v9ses,
        } else
                sb->s_op = &v9fs_super_ops;
        sb->s_bdi = &v9ses->bdi;
+       if (v9ses->cache)
+               sb->s_bdi->ra_pages = (VM_MAX_READAHEAD * 1024)/PAGE_CACHE_SIZE;
 
        sb->s_flags = flags | MS_ACTIVE | MS_DIRSYNC | MS_NOATIME;
        if (!v9ses->cache)