All of lore.kernel.org
 help / color / mirror / Atom feed
* Changes to NFS filesystem exporting in 2.5.9
@ 2002-04-24  5:45 Neil Brown
  2002-04-24 17:04 ` David Chow
  2002-04-25  0:07 ` Chris Wright
  0 siblings, 2 replies; 4+ messages in thread
From: Neil Brown @ 2002-04-24  5:45 UTC (permalink / raw)
  To: linux-fsdevel


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.

 Any questions - please ask.

NeilBrown

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-25  0:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-24  5:45 Changes to NFS filesystem exporting in 2.5.9 Neil Brown
2002-04-24 17:04 ` David Chow
2002-04-24 22:57   ` Neil Brown
2002-04-25  0:07 ` Chris Wright

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.