From: Christoph Hellwig <hch@lst.de>
To: Edward Shishkin <edward@namesys.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Reiserfs-list <reiserfs-devel@vger.kernel.org>,
bfields@citi.umich.edu, Neil Brown <neilb@suse.de>,
Christoph Hellwig <hch@lst.de>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2/2] reiser4: new export ops
Date: Wed, 28 Nov 2007 10:43:01 +0100 [thread overview]
Message-ID: <20071128094301.GA7760@lst.de> (raw)
In-Reply-To: <474CBEEF.3060303@namesys.com>
This code looks a little confusing to me..
> */
> static char *decode_inode(struct super_block *s, char *addr,
> reiser4_object_on_wire * obj)
> @@ -41,7 +42,8 @@
> fplug = file_plugin_by_disk_id(reiser4_get_tree(s), (d16 *) addr);
> if (fplug != NULL) {
> addr += sizeof(d16);
> - obj->plugin = fplug;
> + if (obj)
> + obj->plugin = fplug;
You are adding quite a few of those if (obj) clauses. I can't see a
reason for that - care to explain? The new aops should not disallow for
any functionality that has been there before.
> static struct dentry *reiser4_decode_fh(struct super_block *super, __u32 *fh,
> + int len, int fhtype, int parent)
> {
> reiser4_context *ctx;
> reiser4_object_on_wire object;
> char *addr;
>
> ctx = reiser4_init_context(super);
> if (IS_ERR(ctx))
> @@ -80,25 +77,19 @@
> assert("vs-1482",
> fhtype == FH_WITH_PARENT || fhtype == FH_WITHOUT_PARENT);
>
> addr = (char *)fh;
>
> object_on_wire_init(&object);
> +
> + if (parent)
> + /* skip first onwire object */
> + addr = decode_inode(super, addr, NULL);
> if (!IS_ERR(addr)) {
> + addr = decode_inode(super, addr, &object);
> if (!IS_ERR(addr)) {
> struct dentry *d;
>
> + d = reiser4_get_dentry(super, &object);
I'd suggest to directly poke into the place where the parent handle
is stored. XFS used a similar construct to the decode_inode helper,
but with the new aops it's faster and easier to read if you just have
a helper on how many bytes to skip. Did you take a look at how the
various other filesystem handle the export ops?
> --- linux-2.6.23-mm1/fs/reiser4/dscale.c.orig
> +++ linux-2.6.23-mm1/fs/reiser4/dscale.c
> @@ -126,6 +126,24 @@
How are the changes to all these other files related to the export
operations changes?
next prev parent reply other threads:[~2007-11-28 9:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 23:48 - git-nfsd-broke-reiser4.patch removed from -mm tree akpm
2007-11-28 1:05 ` [patch 2/2] reiser4: new export ops Edward Shishkin
2007-11-28 9:43 ` Christoph Hellwig [this message]
2007-11-28 21:20 ` Edward Shishkin
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=20071128094301.GA7760@lst.de \
--to=hch@lst.de \
--cc=akpm@linux-foundation.org \
--cc=bfields@citi.umich.edu \
--cc=edward@namesys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=neilb@suse.de \
--cc=reiserfs-devel@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.