From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 Patch] GFS2: Add readahead to sequential directory traversal
Date: Tue, 25 Oct 2011 08:48:17 +0100 [thread overview]
Message-ID: <1319528897.2840.0.camel@menhir> (raw)
In-Reply-To: <adffb88d-cdd8-48cc-ac1a-f01ab8769816@zmail06.collab.prod.int.phx2.redhat.com>
Hi,
On Mon, 2011-10-24 at 15:56 -0400, Bob Peterson wrote:
> ----- Original Message -----
> | Hi,
> |
> | That looks much better, but why not create & pass a file_ra_state in
> | the
> | NFS getname function so that you don't have to check for it being
> | NULL?
> | Since that function always reads everything up until the name it is
> | looking for, it is an ideal place to do readahead as the access will
> | always be sequential.
> |
> | Otherwise, it looks good to me,
> |
> | Steve.
>
> Hi,
>
> There isn't a file struct passed in to the nfs get_name function, but
> I can do something like the following. Is this what you mean?
>
> diff --git a/fs/gfs2/export.c b/fs/gfs2/export.c
> index a581cd2..70ba891 100644
> --- a/fs/gfs2/export.c
> +++ b/fs/gfs2/export.c
> @@ -99,6 +99,7 @@ static int gfs2_get_name(struct dentry *parent, char *name,
> struct gfs2_holder gh;
> u64 offset = 0;
> int error;
> + struct file_ra_state f_ra = { .start = 0 };
>
> if (!dir)
> return -EINVAL;
> @@ -118,7 +119,7 @@ static int gfs2_get_name(struct dentry *parent, char *name,
> if (error)
> return error;
>
> - error = gfs2_dir_read(dir, &offset, &gnfd, get_name_filldir, NULL);
> + error = gfs2_dir_read(dir, &offset, &gnfd, get_name_filldir, &f_ra);
>
> gfs2_glock_dq_uninit(&gh);
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
Yes, thats the kind of things. Looks like we can use
file_ra_state_init() since it is exported too,
Steve.
next prev parent reply other threads:[~2011-10-25 7:48 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <db5d593f-00ad-45ad-b300-c018d8588a44@zmail06.collab.prod.int.phx2.redhat.com>
2011-10-04 16:39 ` [Cluster-devel] [GFS2 Patch] GFS2: Add readahead to sequential directory traversal Bob Peterson
2011-10-05 9:09 ` Steven Whitehouse
2011-10-06 16:15 ` Bob Peterson
2011-10-07 11:02 ` Steven Whitehouse
2011-10-07 16:01 ` Bob Peterson
2011-10-08 11:13 ` Steven Whitehouse
2011-10-10 8:49 ` Steven Whitehouse
2011-10-21 16:53 ` Bob Peterson
2011-10-24 8:17 ` Steven Whitehouse
2011-10-24 19:56 ` Bob Peterson
2011-10-25 7:48 ` Steven Whitehouse [this message]
2011-10-27 16:16 ` Bob Peterson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1319528897.2840.0.camel@menhir \
--to=swhiteho@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).