From: David Chow <davidchow@shaolinmicro.com>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: Changes to NFS filesystem exporting in 2.5.9
Date: Thu, 25 Apr 2002 01:04:12 +0800 [thread overview]
Message-ID: <3CC6E58C.3040404@shaolinmicro.com> (raw)
In-Reply-To: 15558.18023.887129.752121@notabene.cse.unsw.edu.au
Neil Brown wrote:
>Greetings.
>
> 2.5.9 brings with it some changes with how a filesystem co-operates
> with nfsd for exporting files, and particularly for converting
> between filehandles and dentries.
>
> There is some fairly extensive documentation in
> Documentation/filesystems/Exporting but I thought it would be useful
> to outline it here and explain the direction that I am taking.
>
> There is now a s_export_op field in struct super_block which can
> point to a "struct export_operations" structure.
> This structure contains functions that are used for converting
> filehandles to dentries, and back again.
>
> The plan is to require this structure to be present for a filesystem
> to be exportable. If nfsd finds that sb->s_export_op == NULL, it
> will not allow the filesystem to be exported.
> This means there is no risk of nfsd making assumptions about
> s_op->readinode that may not be valid.
>
> The new code that uses these operations takes a much cleaner approach
> to locking while messing with the dcache and so the
> s_nfsd_free_path_sem semaphore will not be needed anymore. Instead,
> a little more is required of the ->lookup routine of a filesystem
> which is exportable. The ->lookup routine must call d_splice_alias
> to attach a newly found inode to a dentry, so that if it is a
> directory and there is already a dentry attached, that one is used
> instead.
>
> I plan to change all filesystems that currently use fh_to_dentry and
> dentry_to_fh so that they use export_operations, and modify a few
> filesystems that currently are exportable through iget abuse to be
> exported properly. Then I will remove support for fh_to_dentry and
> for the iget abuse. This will make nfsfh.c much smaller.
>
> Note that there is a new module: fs/exportfs which provides support
> routines for exporting filesystems. The theory is that some
> protocols other the nfs might make use of these so they shouldn't be
> part of nfsd. nfsd depends on this module, but filesystems don't
> (though they might indirectly use some of the code.
>
Are you saying exporfs module is some kind of generic_fh_to_dentry() ops
for fs such as ext2/3 that can muck with iget() hacks?
We just properly implemented fh_to_dentry() in our fs for 2.4 and it
works fine, so we just move our fh_to_dentry() op to the new
sb->s_export_op->fh_to_dentry ??
What about compatibility and nature of fh_to_dentry() in 2.4? Is it
going to keep unchange or you are planning to make changes?
>
> Any questions - please ask.
>
>NeilBrown
>-
>To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
>
David
next prev parent reply other threads:[~2002-04-24 17:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-24 5:45 Changes to NFS filesystem exporting in 2.5.9 Neil Brown
2002-04-24 17:04 ` David Chow [this message]
2002-04-24 22:57 ` Neil Brown
2002-04-25 0:07 ` Chris Wright
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=3CC6E58C.3040404@shaolinmicro.com \
--to=davidchow@shaolinmicro.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=neilb@cse.unsw.edu.au \
/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.