From: Christoph Hellwig <hch@infradead.org>
To: Balaji Rao <balajirrao@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [RFC] NFS Support
Date: Mon, 30 Jun 2008 14:46:00 -0400 [thread overview]
Message-ID: <20080630184600.GA28679@infradead.org> (raw)
In-Reply-To: <200806290505.31641.balajirrao@gmail.com>
On Sun, Jun 29, 2008 at 05:05:31AM +0530, Balaji Rao wrote:
> len = 5;
> fh[0] = cpu_to_le32((u32)(objectid >> 32));
> fh[1] = cpu_to_le32((u32)(objectid & 0xffffffff));
> fh[2] = cpu_to_le32((u32)(root_objectid >> 32));
> fh[3] = cpu_to_le32((u32)(root_objectid & 0xffffffff));
> fh[4] = cpu_to_le32(generation);
Please use C struct types for the file handles. Take a look at
fs/xfs/linux-2.6/xfs_export.[ch] for an example.
> static struct dentry * btrfs_get_dentry(struct super_block *sb,
> u64 objectid, u64 root_objectid, u32 generation)
> {
> struct inode *inode;
> struct dentry *result;
>
> inode = btrfs_ilookup(sb, objectid, root_objectid);
> if (IS_ERR(inode))
> return (void *)inode;
This one will only find inodes when they already are in memory. You
need to something similar to btrfs_lookup minus the btrfs_inode_by_name
call here. In fact it would make a lot of sense to factor that part
of btrfs_lookup out into a btrfs_iget helper that takes a struct
btrfs_key pointer and returns the inode for you.
next prev parent reply other threads:[~2008-06-30 18:46 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-28 23:35 [RFC] NFS Support Balaji Rao
2008-06-30 14:50 ` Josef Bacik
2008-06-30 15:20 ` Balaji Rao R
2008-06-30 15:08 ` Josef Bacik
2008-07-01 7:01 ` Christoph Hellwig
2008-06-30 18:46 ` Christoph Hellwig [this message]
2008-08-12 13:46 ` [PATCH 1/3] Introduce btrfs_iget helper David Woodhouse
2008-08-12 18:46 ` Christoph Hellwig
2008-08-13 9:07 ` David Woodhouse
2008-08-13 9:41 ` David Woodhouse
2008-08-12 13:46 ` [PATCH 2/3] NFS support for btrfs - v2 David Woodhouse
2008-08-12 18:51 ` Christoph Hellwig
2008-08-13 8:53 ` David Woodhouse
2008-08-13 15:06 ` [PATCH 2/3] NFS support for btrfs - v3 David Woodhouse
2008-08-12 13:46 ` [PATCH 3/3] Implement our own copy of the nfsd readdir hack, for older kernels David Woodhouse
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=20080630184600.GA28679@infradead.org \
--to=hch@infradead.org \
--cc=balajirrao@gmail.com \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox