FIND_EXPORTED_DENTRY

Section: ()
Updated: 06 October 2005
Index Return to Main Contents

 

NAME

find_exported_dentry - helper routine to implement export_operations->decode_fh  

SYNOPSIS

"SYNOPSIS"

struct dentry * find_exported_dentry (struct super_block * sb, void * obj, void * parent, int (*acceptable) void *context, struct dentry *de, void * context);  

ARGUMENTS

sb
The &super_block identifying the filesystem
obj
An opaque identifier of the object to be found - passed to get_inode
parent
An optional opqaue identifier of the parent of the object.
acceptable
A function used to test possible &dentries to see if they are acceptable
context
A parameter to acceptable so that it knows on what basis to judge.
 

DESCRIPTION

find_exported_dentry is the central helper routine to enable file systems to provide the decode_fh export_operation. It's main task is to take an &inode, find or create an appropriate &dentry structure, and possibly splice this into the dcache in the correct place.

The decode_fh operation provided by the filesystem should call find_exported_dentry with the same parameters that it received except that instead of the file handle fragment, pointers to opaque identifiers for the object and optionally its parent are passed. The default decode_fh routine passes one pointer to the start of the filehandle fragment, and one 8 bytes into the fragment. It is expected that most filesystems will take this approach, though the offset to the parent identifier may well be different.

find_exported_dentry will call get_dentry to get an dentry pointer from the file system. If any &dentry in the d_alias list is acceptable, it will be returned. Otherwise find_exported_dentry will attempt to splice a new &dentry into the dcache using get_name and get_parent to find the appropriate place.


 

Index

NAME
SYNOPSIS
ARGUMENTS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 04:40:46 GMT, October 06, 2005