From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] GFS2: Make . and .. qstrs constant
Date: Thu, 09 Sep 2010 09:32:55 +0100 [thread overview]
Message-ID: <1284021175.2468.1.camel@localhost> (raw)
In-Reply-To: <20100909015754.GA5230@infradead.org>
Hi,
On Wed, 2010-09-08 at 21:57 -0400, Christoph Hellwig wrote:
> On Wed, Sep 08, 2010 at 04:35:20PM +0100, Steven Whitehouse wrote:
> > >From bc9fb728211162a24afd341c9ffb85e7b459fb8d Mon Sep 17 00:00:00 2001
> > From: Steven Whitehouse <swhiteho@redhat.com>
> > Date: Wed, 8 Sep 2010 16:02:13 +0100
> > Subject: GFS2: Make . and .. qstrs constant
> >
> > Rather than calculating the qstrs for . and .. each time
> > we need them, its better to keep a constant version of
> > these and just refer to them when required.
> >
> > Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
> >
> > +const struct qstr gfs2_qdot = { .name = ".", .len = 1, .hash = 0xed4e242};
> > +const struct qstr gfs2_qdotdot = { .name = "..", .len = 2, .hash = 0x9608161c};
>
> I don't think hardcoding the values for the current dcache hash is a
> good idea. We have already changed that hash in not too recent history
> and chances are we'll do again at some point.
>
The hash is (or can be, and is in GFS2's case) fs specific. The values
won't change for GFS2 and if the dcache ends up not supporting fs
specific hash values, we'll have to change a fair amount of our code.
> Just calculate it once at startup time using the normal hash function.
> Extra points for doing it in core code and finding places in other
> filesystems that have the same issue.
>
Yes, I did think about that, but being able to mark it const so that I
could be sure it wouldn't change seemed like a useful thing to do,
Steve.
next prev parent reply other threads:[~2010-09-09 8:32 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-08 15:35 [Cluster-devel] GFS2: Make . and .. qstrs constant Steven Whitehouse
2010-09-09 1:57 ` Christoph Hellwig
2010-09-09 8:32 ` Steven Whitehouse [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-09-17 12:18 Steven Whitehouse
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=1284021175.2468.1.camel@localhost \
--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).